Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

πŸ› Fix clash between k8s svc discovery and rig env var#25

Merged
blacksails merged 1 commit intorigdev:mainfrom
blacksails:fix-k8s-rig-service-discovery-bug
Sep 3, 2023
Merged

πŸ› Fix clash between k8s svc discovery and rig env var#25
blacksails merged 1 commit intorigdev:mainfrom
blacksails:fix-k8s-rig-service-discovery-bug

Conversation

@blacksails
Copy link
Copy Markdown
Contributor

Kubernetes service discovery creates an environment variable called
<service-name>-PORT for each service in the namespace where a pod
runs. The main service in the chart used the fullname helper as name.
When using rig as release name this resulted in the service being called
rig. This then means that each pod in the namespace would get an
environment variable called RIG_PORT. This clashes with the
environment override of port in the rig config.

This fix changes the service name by adding -svc as suffix. The
service discovery variable will hence be RIG_SVC_PORT and no longer
cause a clash.

Kubernetes service discovery creates an environment variable called
`<service-name>-PORT` for each service in the namespace where a pod
runs. The main service in the chart used the fullname helper as name.
When using rig as release name this resulted in the service being called
`rig`. This then means that each pod in the namespace would get an
environment variable called `RIG_PORT`. This clashes with the
environment override of `port` in the rig config.

This fix changes the service name by adding `-svc` as suffix. The
service discovery variable will hence be `RIG_SVC_PORT` and no longer
cause a clash.
@blacksails blacksails marked this pull request as ready for review September 3, 2023 22:22
@blacksails blacksails merged commit 1a38bae into rigdev:main Sep 3, 2023
@blacksails blacksails deleted the fix-k8s-rig-service-discovery-bug branch September 3, 2023 22:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant