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

[EV-5302] Add set licenseKeyContent file to helm upgrade #1716

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

dimitri-nicolo
Copy link
Contributor

@dimitri-nicolo dimitri-nicolo commented Oct 10, 2024

As part of our automation efforts, we eliminated the manual step of adding license.yaml and instead embedded the licenseKey directly into the helm install command. To ensure compatibility, a small template was added to convert the license from v3 to v1, since the CRD is installed before the API server is available. This change made the license resource Helm-managed. Consequently, if the license is not provided during any subsequent helm upgrade, Helm will delete the resource, assuming it's no longer needed.

To address this, the following line has been added to the helm upgrade command in our documentation:

--set-file licenseKeyContent=<path-to-license-file-yaml> \\

Going forward, the license file must be specified during upgrades.

I considered using the keep annotation, which instructs Helm to ignore specific files. However, this requires manually updating the license file prior to upgrade, and it introduces side effects—such as Helm disregarding the file during helm uninstall. Ultimately, updating our documentation proved to be the cleanest solution.

Product Version(s):

[Main][v3.20]
Issue:

https://tigera.atlassian.net/browse/EV-5302
Link to docs preview:

SME review:

  • An SME has approved this change.

DOCS review:

  • A member of the docs team has approved this change.

Additional information:

Merge checklist:

  • Deploy preview inspected wherever changes were made
  • Build completed successfully
  • Test have passed

@dimitri-nicolo dimitri-nicolo requested a review from a team as a code owner October 10, 2024 22:02
Copy link

netlify bot commented Oct 10, 2024

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 031dd8c
🔍 Latest deploy log https://app.netlify.com/sites/calico-docs-preview-next/deploys/670949f988578100082b8dc7
😎 Deploy Preview https://deploy-preview-1716--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 30 (🔴 down 13 from production)
Accessibility: 90 (no change from production)
Best Practices: 83 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 10, 2024

Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit 031dd8c
🔍 Latest deploy log https://app.netlify.com/sites/tigera/deploys/670949f89ec7050008485b3f
😎 Deploy Preview https://deploy-preview-1716--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 46 (🔴 down 1 from production)
Accessibility: 90 (no change from production)
Best Practices: 75 (no change from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@rene-dekker rene-dekker left a comment

Choose a reason for hiding this comment

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

lgtm

@dimitri-nicolo
Copy link
Contributor Author

@ctauchen could I please get your review?

There a number of failures, but from the looks of it they are unrelated to this change.

@@ -144,11 +144,13 @@ These steps differ based on your cluster type. If you are unsure of your cluster
? (
`helm upgrade calico-enterprise --reuse-values --values=<path-to-values-yaml> tigera-operator-v0.0.tgz \\
--set-file imagePullSecrets.tigera-pull-secret=<path-to-pull-secret>,tigera-prometheus-operator.imagePullSecrets.tigera-pull-secret=<path-to-pull-secret> \\
--set-file licenseKeyContent=<path/to/license/file/yaml> \\
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
--set-file licenseKeyContent=<path/to/license/file/yaml> \\
--set-file licenseKeyContent=<path-to-license-file-yaml> \\

Just to follow the convention already in this code block and elsewhere in the documentation. Otherwise LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ctauchen Thanks! The paths were updated to using the convention. The commits were squashed

@ctauchen
Copy link
Collaborator

LGTM. Ready to merge?

@dimitri-nicolo
Copy link
Contributor Author

LGTM. Ready to merge?

Yes please!

@ctauchen ctauchen merged commit 28c03af into tigera:main Oct 14, 2024
10 checks passed
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.

3 participants