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

feat(secret): Support reading the license key from secret #95

Merged
merged 8 commits into from
Mar 13, 2024

Conversation

jsirianni
Copy link
Member

@jsirianni jsirianni commented Mar 12, 2024

Description of Changes

Added a new option, config.licenseUseSecret. When true, the license will be read from the "bindplane" secret. This option is only considered if config.license is not set. If both options are not set, the license will not be set in the environment (this is the existing behavior).

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • CI passes

@@ -51,6 +51,11 @@ jobs:
sleep 30
kubectl -n ingress-nginx get all

- name: Create secret
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test suite uses the values files in test/cases/. Instead of hardcoding a license there, we can create the "bindplane" secret with only the license key. I added a license to the repo's secrets.

@@ -6,6 +6,7 @@ config:
sessions_secret: 4484766F-5016-4077-B8E0-0DE1D637854B
server_url: http://bindplane.local:3001
remote_url: ws://bindplane.local:3001
licenseUseSecret: true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test case will mount the license from the secret created in the CI workflow.

@jsirianni jsirianni marked this pull request as ready for review March 12, 2024 20:40
@jsirianni jsirianni requested a review from a team as a code owner March 12, 2024 20:40
@jsirianni jsirianni requested review from andykellr and dpaasman00 and removed request for dpaasman00 March 12, 2024 20:40
andykellr
andykellr previously approved these changes Mar 13, 2024
@jsirianni jsirianni merged commit 2563f74 into main Mar 13, 2024
10 checks passed
@jsirianni jsirianni deleted the secret/license branch March 13, 2024 19:42
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.

2 participants