Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract as constants all the controlplane env vars #141

Open
2 tasks
mlavacca opened this issue Jan 16, 2024 · 0 comments
Open
2 tasks

Extract as constants all the controlplane env vars #141

mlavacca opened this issue Jan 16, 2024 · 0 comments
Labels
area/maintenance migrated-from-archive Issues migrated from the archived KGO repository

Comments

@mlavacca
Copy link
Member

mlavacca commented Jan 16, 2024

Problem Statement

We use several environment variables to configure the controlplane, and all of them are hardcoded in this function body.
We need to extract them as constants into the /internal/consts/controlplane.go file and reference them.
Furthermore, as we re-use the same code block many times, we should create an helper and pass the proper env var to perform the needed checks and assignment

if _, isOverrideDisabled := dontOverride["CONTROLLER_PUBLISH_SERVICE"]; !isOverrideDisabled {
  publishServiceNN := dataplaneServiceNN(args.namespace, args.dataplaneIngressServiceName)
  if envValueByName(container.Env, "CONTROLLER_PUBLISH_SERVICE") != publishServiceNN {
    container.Env = updateEnv(container.Env, "CONTROLLER_PUBLISH_SERVICE", publishServiceNN)
    changed = true
  }
}

Acceptance Criteria

  • All the above env vars are extracted into proper constants.
  • the code block above is factorized as a function.
@mlavacca mlavacca added the migrated-from-archive Issues migrated from the archived KGO repository label Apr 19, 2024
@czeslavo czeslavo transferred this issue from another repository Apr 22, 2024
@czeslavo czeslavo transferred this issue from another repository Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maintenance migrated-from-archive Issues migrated from the archived KGO repository
Projects
None yet
Development

No branches or pull requests

1 participant