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

Allow Pinning of versions for charts #200

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

Waterdrips
Copy link
Contributor

Description

We have had a case where cert-manager upgraded and we
had pinned the CRD to v0.12.0, we installed the
latest chart by default so we have 0.12.0 CRD and
0.13.0 chart. This caused issues.

We can now optionally pin a helm chart version.

Fixes #199

Motivation and Context

How Has This Been Tested?

Installed cert-manager (which now has pinned v0.12.0) and it installed that version
Installed OpenFaaS (no pinned version) and it installed latest

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

We have had a case where cert-manager upgraded and we
had pinned the CRD to v0.12.0, we installed the
latest chart by default so we have 0.12.0 CRD and
0.13.0 chart. This caused issues.

We can now optionally pin a helm chart version.

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
@@ -105,6 +105,7 @@ func MakeInstallCronConnector() *cobra.Command {
ns,
outputPath,
"values.yaml",
"",
Copy link
Owner

Choose a reason for hiding this comment

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

The empty value is a bit confusing. Should be a named variable I think?

@@ -107,14 +106,14 @@ schedule workloads to any Kubernetes cluster`,
}

err := helm3Upgrade(outputPath, "crossplane-alpha/crossplane",
namespace, "values.yaml", map[string]string{}, wait)
namespace, "values.yaml", "", map[string]string{})
Copy link
Owner

Choose a reason for hiding this comment

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

I’m a bit worried about updating every app at once. For instance this appears to introduce a bug where wait is being ignored as a parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wait was not used in the func, so i removed it from the signature and all func calls

Copy link
Owner

Choose a reason for hiding this comment

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

Then it should be used and/or left.

Copy link
Owner

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

Could you do a new single PR only to patch cert-manager please? Doing this exercise in bulk is a good idea, but too many changes at once are too hard to test.

@Waterdrips
Copy link
Contributor Author

Could you do a new single PR only to patch cert-manager please? Doing this exercise in bulk is a good idea, but too many changes at once are too hard to test.

it would be super hacky to try and pass in a version just for 1 chart, they all use the same runner code, and it builds a single string for the command. I actually can't see where I could pass it in to

(helm2)
Command: fmt.Sprintf("%s template %s --name %s --namespace %s --output-dir %s %s %s %s",......

(helm3)
args := []string{"upgrade", "--install", chartName, chart, "--namespace", namespace, }

Copy link
Owner

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

Will merge as is, please add back the wait parameter and consume it?

@alexellis alexellis merged commit 69517d6 into alexellis:master Feb 20, 2020
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.

Allow Pinning of helm chart versions
2 participants