-
Notifications
You must be signed in to change notification settings - Fork 106
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
Implemented optional use of existing secret for mgmt token #175
Conversation
2195524
to
74c91a5
Compare
@eshepelyuk when you get a chance, can I get a review for this. Thanks! |
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.
Hello
This PR requires lint test cases and I also I would like to see a new e2e scenario showing that multiple instances can share the secret resource.
@eshepelyuk Thanks for taking a look. I have added the lint and e2e tests. |
09a9600
to
d7d9842
Compare
charts/opa-kube-mgmt/values.yaml
Outdated
# Used for setting the mgmt token used for authz instead of auto generated default | ||
# mgmtToken: | ||
# secretName: name of the secret | ||
# secretKey: key from the secret |
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.
I suggest to create a default value for secretKey
, so this field can be optional.
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.
Done
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.
Instead of introducing setup.sh
and changes to e2e pipeline, use special e2e helm template charts/opa-kube-mgmt/templates/ingressroute.yaml
.
Add there a new block that renders your secret, if a new, e2e only value is set, that you can add to values.yaml
of your e2e test.
I can see that would also work. But, using the e2e flag, will make it render for all the other tests which don't use this secret. However, I think the |
Apparently, as I already mentioned, you have to introduce another value that will trigger render of the secret. |
Sure, no problem. I have pushed changes. |
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.
LGTM
Plz rebase and squash into a single commit, if CI job is green - ready to merge.
Signed-off-by: Amente Bekele <[email protected]>
bb91679
to
cead98b
Compare
Hello @amentebekele-okta |
This PR adds an optional functionality to mount and use existing secret as mgmt-token for the helm chart, instead of generating a new one. This is useful when specifying more than 1 replica and we want them to use the same token.