ref(pkg/chartutil): remove k8s version object dependency#5601
ref(pkg/chartutil): remove k8s version object dependency#5601adamreese merged 1 commit intohelm:dev-v3from
Conversation
pkg/chartutil/testdata/subpop/charts/subchart1/templates/service.yaml
Outdated
Show resolved
Hide resolved
729b91c to
9ca4788
Compare
| // GitVersion returns the Kubernetes version string. | ||
| // | ||
| // Depreciated: use KubeVersion.Version. | ||
| func (kv *KubeVersion) GitVersion() string { return kv.Version } |
9ca4788 to
664b446
Compare
mattfarina
left a comment
There was a problem hiding this comment.
I tried to use this branch to install a configmap into a cluster to see the values for GitVersion and Version. The cluster was 1.12. The values for both were 1.14.0. It looks like it's using the default values rather than the actual values for the cluster. We need the cluster values for this to be useful.
| type KubeVersion struct { | ||
| Version string // Kubernetes version | ||
| Major string // Kubernetes major version | ||
| Minor string // Kubernetes minor version |
There was a problem hiding this comment.
This is where we get into the ugliness of versions and how they are misused.
I have a gke test cluster with a version of 1.12.7-gke.10. It's the reason you can see things like if semverCompare "^1.7-0" .Capabilities.KubeVersion.GitVersion all over the charts repo. The -0 on the end tells semver to look at pre-releases. gke is misusing the pre-release part of semver.
Anything after minor is no longer available. On one hand, that will simplify a what many chart authors have to do. On the other hand, do we know of anywhere the lost information will have an impact?
I just wanted to ask the question and document this.
239b579 to
ac26554
Compare
mattfarina
left a comment
There was a problem hiding this comment.
@adamreese This looks good but needs a rebase. My only outstanding issue with this was fixed via the other PR that caused the need for the rebase.
Flattens the `.Capabilities` built-in and removes useless kubernetes runtime metadata. Signed-off-by: Adam Reese <adam@reese.io>
see helm/helm#5601 for more details
* bump helm version to helm 3.4.1 * update doc to make helm 3 the recommended version * update helm commands arguments for helm 3 * remove helm init and tiller install commands * add stable repo for metricbeat dependencies * remove the charts dance in helmignore (related to #127) * optimize docker images * replace deprecated gitversion capability (related to helm/helm#5601) * remove some heritage labels in immutable fields
* bump helm version to helm 3.4.1 * update doc to make helm 3 the recommended version * update helm commands arguments for helm 3 * remove helm init and tiller install commands * add stable repo for metricbeat dependencies * remove the charts dance in helmignore (related to elastic#127) * optimize docker images * replace deprecated gitversion capability (related to helm/helm#5601) * remove some heritage labels in immutable fields
* bump helm version to helm 3.4.1 * update doc to make helm 3 the recommended version * update helm commands arguments for helm 3 * remove helm init and tiller install commands * add stable repo for metricbeat dependencies * remove the charts dance in helmignore (related to elastic#127) * optimize docker images * replace deprecated gitversion capability (related to helm/helm#5601) * remove some heritage labels in immutable fields
* bump helm version to helm 3.4.1 * update doc to make helm 3 the recommended version * update helm commands arguments for helm 3 * remove helm init and tiller install commands * add stable repo for metricbeat dependencies * remove the charts dance in helmignore (related to #127) * optimize docker images * replace deprecated gitversion capability (related to helm/helm#5601) * remove some heritage labels in immutable fields
* bump helm version to helm 3.4.1 * update doc to make helm 3 the recommended version * update helm commands arguments for helm 3 * remove helm init and tiller install commands * add stable repo for metricbeat dependencies * remove the charts dance in helmignore (related to #127) * optimize docker images * replace deprecated gitversion capability (related to helm/helm#5601) * remove some heritage labels in immutable fields
* bump helm version to helm 3.4.1 * update doc to make helm 3 the recommended version * update helm commands arguments for helm 3 * remove helm init and tiller install commands * add stable repo for metricbeat dependencies * remove the charts dance in helmignore (related to elastic/helm-charts#127) * optimize docker images * replace deprecated gitversion capability (related to helm/helm#5601) * remove some heritage labels in immutable fields
* bump helm version to helm 3.4.1 * update doc to make helm 3 the recommended version * update helm commands arguments for helm 3 * remove helm init and tiller install commands * add stable repo for metricbeat dependencies * remove the charts dance in helmignore (related to elastic/helm-charts#127) * optimize docker images * replace deprecated gitversion capability (related to helm/helm#5601) * remove some heritage labels in immutable fields
* bump helm version to helm 3.4.1 * update doc to make helm 3 the recommended version * update helm commands arguments for helm 3 * remove helm init and tiller install commands * add stable repo for metricbeat dependencies * remove the charts dance in helmignore (related to elastic/helm-charts#127) * optimize docker images * replace deprecated gitversion capability (related to helm/helm#5601) * remove some heritage labels in immutable fields
Flattens the
.Capabilitiesbuilt-in and removes useless kubernetesruntime metadata.