vmware-archive / gangway

An application that can be used to easily enable authentication flows via OIDC for a kubernetes cluster.
Apache License 2.0
410 stars 112 forks source link

Collision between Kubernetes injected env variables and Gangway #176

Closed p-v-a closed 3 years ago

p-v-a commented 3 years ago

If deployment named just gangway, then kubernetes will inject its standard environment variables, causing GANGWAY_PORT variable to be something like below, which in turn cause deployment fails to start.

kubectl logs -n mgmt-system  gangway-94676b98c-h22rl
time="2020-10-22T03:43:55Z" level=error msg="Could not parse config file: envconfig.Process: assigning GANGWAY_PORT to Port: converting 'tcp://172.28.48.148:80' to type int. details: strconv.ParseInt: parsing \"tcp://172.28.48.148:80\": invalid syntax"

This can be easily avoided by choosing different name for the deployment, however might be good idea to mention that somewhere.

p-v-a commented 3 years ago

Actually it's service with a name 'gangway' that were causing this issue, as per https://kubernetes.io/docs/concepts/containers/container-environment/#cluster-information

p-v-a commented 3 years ago

Found this issue in one of commit discussion few years back.