chart-testing
chart-testing copied to clipboard
`ct` to help to test charts using `.Capabilities`
If this is a FEATURE REQUEST, please:
- I would like to have a way to test my charts API
Capabilities
This is an extended practice where Helm charts are created with the logic to render different versions of the resources or CRDs (eg. Prometheus Operator) instead of relaying on the user to set a boolean value to enable or disable them... more examples:
- Helm chart compatible with different K8s versions
-
networking.k8s.io/v1/Ingress=>networking.k8s.io/v1beta1/Ingress=>extensions/v1beta1/Ingress
-
- Render Prometheus operator, CertManager, other operators resources if the CRDs are available on the cluster
- K8s and Openshift compatibility
I'd like to test my charts against a combination of the specified APIs eg:
apis:
-
- networking.k8s.io/v1/Ingress
- networking.k8s.io/v1beta1/Ingress
- extensions/v1beta1/Ingress
-
- monitoring.coreos.com/v1
then ct will test against all the given combinations
-
networking.k8s.io/v1/Ingress + monitoring.coreos.com/v1 -
networking.k8s.io/v1beta1/Ingress + monitoring.coreos.com/v1 -
extensions/v1beta1/Ingress + monitoring.coreos.com/v1
Version of Helm and Kubernetes:
$ helm version
version.BuildInfo{Version:"v3.5.3", GitCommit:"041ce5a2c17a58be0fcd5f5e16fb3e7e95fea622", GitTreeState:"dirty", GoVersion:"go1.15.8"}
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:12:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19+", GitVersion:"v1.19.8-eks-96780e", GitCommit:"96780e1b30acbf0a52c38b6030d7853e575bcdf3", GitTreeState:"clean", BuildDate:"2021-03-10T21:32:29Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
$ ct version
Version: v3.3.1
Git commit: 71d0e1e82c5c8b66ce4d9704426dc13b7075829d
Date: 2020-11-30T20:10:04Z
License: Apache 2.0