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

[kong] migrate controller to envvar-based configuration #99

Merged
merged 3 commits into from
Apr 2, 2020

Conversation

rainest
Copy link
Contributor

@rainest rainest commented Mar 30, 2020

What this PR does / why we need it:

  • Migrate controller env block generation to the dict-based system used by the Kong container.
  • Move static controller arguments to equivalent environment variables.
  • Place kong_admin_tls_skip_verify default and example kong_admin_token in values.yaml.

Special notes for your reviewer:

  • POD_NAMESPACE and POD_NAME remain outside the new system (they're still part of the kong.controller-container template). Users cannot override them (user variables all receive the CONTROLLER_ prefix) and we'd need an additional (albeit simple) template to handle fieldRefs, so I think it's reasonable to omit them.
  • Although kong_admin_tls_skip_verify is now a user-set variable with a default in values.yaml, it also has a default inside the template. This is to account for users with an existing values.yaml that specifies env: {}.

Checklist

  • PR is based off the current tip of the next branch and targets next, not master
  • Title of the PR and commit headers start with chart name (e.g. [kong])

Move the default TLS verify setting out of the controller helper
template and into its env block in values.yaml.

Add a commented example section for the specifying the controller's
admin token.
Remove the static command-line arguments from the controller template
and replace them with equivalent environment variables. This breaks
compatibility with controller versions <0.7.

Separate the render section of the existing kong.env template into its
own kong.renderEnv template, which is now used for both the Kong and
controller container env blocks.
Set kong_admin_tls_skip_verify to true by default when generating the
controller env block. Although this is now set in the standard
values.yaml, since the previous values.yaml set env to the empty object,
upgraded instances would default to false unless that section was
omitted or updated.

The setting in values.yaml will still take precedence if present.
@rainest rainest merged commit 4eea03f into next Apr 2, 2020
@hbagdi hbagdi deleted the feat/controller-env branch April 10, 2020 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants