-
Notifications
You must be signed in to change notification settings - Fork 323
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
set up individual secrets for what used to be HCPConfig secret #1608
Conversation
c1d45f3
to
b66e384
Compare
charts/consul/templates/_helpers.tpl
Outdated
|
||
Usage: {{ template "consul.validateCloudConfiguration" . }} | ||
Usage: {{ template "consul.validaterequiredCloudSecretsExist" . }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed name. this used to be one secret with 6 six keys (3 required and 3 optional). Now there are 6 secrets for more flexibility and the ability to allow optional values.
|
||
{{/* | ||
Fails global.cloud.enabled is true and one of the following secrets has either an empty secretName or secretKey. | ||
- global.cloud.resourceId.secretName / secretKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This simply checks all 6 secrets so that if either secretName
or secretKey
are provided, then both are provided.
|
||
if err := i.saveBootstrapTokenSecret(config); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got rid of the small helper functions like saveBootstrapTokenSecret()
because they really did not do much and I moved everything in line so its quicker to read and know that they are all behaving the same way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good! I have a few questions/suggestions but nothing in particular that I would block on.
NOTE: At first glance this looks huge, but its really because the same sets of bats tests and helm failure logic are in multiple files to check that for each secret, if one of the
secretName
or thesecretKey
is set, then both are set. Besides this, this actually a very small change.Motivation:
Changes proposed in this PR:
global.cloud.enabled=true
How I've tested this PR:
How I expect reviewers to test this PR:
👀
Checklist: