Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Function domain is hardcoded as .svc.cluster.local and this is not correct for all clusters #9

Open
Jc2k opened this issue Jun 18, 2020 · 2 comments

Comments

@Jc2k
Copy link

Jc2k commented Jun 18, 2020

Is this a BUG REPORT or FEATURE REQUEST?:

Bug report

What happened:

When generating a request to a function it assumes the domain name is .svc.cluster.local. See here.

What you expected to happen:

One of:

  • The suffix is just .svc - the dns service will automatically expand it to the full form
  • nats-trigger automatically works out the correct FQDN
  • there is a config option to set it.

How to reproduce it (as minimally and precisely as possible):

I have a kubeadm cluster where the networking/dnsDomain setting of ClusterConfigration was set to a domain, not cluster.local.

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): 1.16
  • Kubeless version (use kubeless version): 1.0.6
  • Cloud provider or physical cluster: bare metal
@jdmeyer3
Copy link

I was able to get around this issue by editing the yaml file like so

---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    kubeless: nats-trigger-controller
  name: nats-trigger-controller
  namespace: kubeless
spec:
  selector:
    matchLabels:
      kubeless: nats-trigger-controller
  template:
    metadata:
      labels:
        kubeless: nats-trigger-controller
    spec:
      containers:  
      - env:
        - name: "NATS_URL"            # domain override here
          value: "nats://nats.<namespace>.<custom domain>:4222"

adding the "NATS_URL" env value allowed me override the default cluster domain

@jdmeyer3
Copy link

A quick correction, the trigger controller comes online with my workaround. However, the trigger is still sending requests to "svc.cluster.local" domains. So a fix would still be needed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants