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

Kube version override #1662

Merged
merged 13 commits into from
May 15, 2023
Merged

Kube version override #1662

merged 13 commits into from
May 15, 2023

Conversation

brandtkeller
Copy link
Contributor

Description

Adding a flag to the zarf prepare find-images command such that helm charts that implement a minimum kubeVersion field in the Chart.yaml can specify an override target Kubernetes version. That will allow zarf prepare find-images to specify a --kube-version that emulates the same activity that helm uses for helm template.

Related Issue

Fixes #1607

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
@netlify
Copy link

netlify bot commented Apr 30, 2023

Deploy Preview for zarf-docs ready!

Name Link
🔨 Latest commit 1756d41
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/646261a13a687900089d3624
😎 Deploy Preview https://deploy-preview-1662--zarf-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@brandtkeller
Copy link
Contributor Author

example/cert-manager is a temporary addition to allow testing with (success) and without (failure) the use of the new --kube-version flag

Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

Overall looks good - one other change could be to line 160 of src/pkg/packager/prepare.go to change:

message.Errorf(err, "Problem rendering the helm template for %s", chart.URL)

to something like:

message.Errorf(err, "Problem rendering the helm template for %s: %s", chart.URL, err.Error())

That way people see the error in the warning message.
image

examples/cert-manager/zarf.yaml Outdated Show resolved Hide resolved
examples/cert-manager/zarf.yaml Outdated Show resolved Hide resolved
src/test/e2e/00_use_cli_test.go Outdated Show resolved Hide resolved
@brandtkeller brandtkeller marked this pull request as ready for review May 15, 2023 13:32
@brandtkeller brandtkeller requested a review from Racer159 May 15, 2023 13:32
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

lgtm!

@Racer159 Racer159 enabled auto-merge (squash) May 15, 2023 15:46
@Racer159 Racer159 merged commit 408cc52 into main May 15, 2023
@Racer159 Racer159 deleted the kube-version-override branch May 15, 2023 17:16
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.

helm kubeversion check fails if defined
3 participants