Skip to content
Browse files

Add more capabilities to the detault set used by helm template

- These are the capabilities as of k8s 1.14
- They are generated because getting them at runtime uses so much
  memory it causes CI errors

Signed-off-by: Matt Farina <>
  • Loading branch information...
mattfarina committed Jun 17, 2019
1 parent 6c88a42 commit 79235eef11a311e400e9c27ad2df55932390c01d
@@ -141,6 +141,10 @@ docker-test-style: check-docker
$(MAKE) -C _proto/ all

.PHONY: generate
$(GO) generate ./...

.PHONY: docs
docs: build
@@ -27,7 +27,7 @@ helm template [flags] CHART
-x, --execute stringArray Only execute the given templates
-h, --help help for template
--is-upgrade Set .Release.IsUpgrade instead of .Release.IsInstall
--kube-version string Kubernetes version used as Capabilities.KubeVersion.Major/Minor (default "1.9")
--kube-version string Kubernetes version used as Capabilities.KubeVersion.Major/Minor (default "1.14")
-n, --name string Release name (default "release-name")
--name-template string Specify template used to name the release
--namespace string Namespace to install the release into
@@ -55,4 +55,4 @@ helm template [flags] CHART

* [helm]( - The Helm package manager for Kubernetes.

###### Auto generated by spf13/cobra on 16-May-2019
###### Auto generated by spf13/cobra on 17-Jun-2019
@@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
//go:generate go run generator/capabilities_default_versions_generate.go

package chartutil

@@ -24,14 +25,15 @@ import (

var (
// DefaultVersionSet is the default version set, which includes only Core V1 ("v1").
DefaultVersionSet = NewVersionSet("v1")
// DefaultVersionSet is the default version set in included in Kubernetes for workloads
// Default versions as of Kubernetes 1.14
DefaultVersionSet = NewVersionSet(defaultVersions()...)

// DefaultKubeVersion is the default kubernetes version
DefaultKubeVersion = &version.Info{
Major: "1",
Minor: "9",
GitVersion: "v1.9.0",
Minor: "14",
GitVersion: "v1.14.0",
GoVersion: runtime.Version(),
Compiler: runtime.Compiler,
Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH),
@@ -38,9 +38,6 @@ func TestDefaultVersionSet(t *testing.T) {
if !DefaultVersionSet.Has("v1") {
t.Error("Expected core v1 version set")
if d := len(DefaultVersionSet); d != 1 {
t.Errorf("Expected only one version, got %d", d)

func TestCapabilities(t *testing.T) {
@@ -51,4 +48,8 @@ func TestCapabilities(t *testing.T) {
if !cap.APIVersions.Has("v1") {
t.Error("APIVersions should have v1")

if !cap.APIVersions.Has("apps/v1/Deployment") {
t.Error("APIVersions should have apps/v1/Deployment")

0 comments on commit 79235ee

Please sign in to comment.
You can’t perform that action at this time.