Comments (4)
@rikatz here is a link to the helm template
documentation where you can see:
-a, --api-versions stringArray Kubernetes api versions used for Capabilities.APIVersions
However, it looks like there is now a --kube-version
arg that was just released in helm 3.6.0 today where you can specify the kube version to use. With that in mind, it looks like this should just be a quick docs fix. @mteodori
from kubepug.
Hi @mteodori thanks for raising this.
Can you provide me some more specific steps to reproduce, so I can take a look here? I'm shamefully not much aware of helm behavior :)
Thank you!
from kubepug.
Or I can take a look into the original issue in helm :)
from kubepug.
Unfortunately, the helm --kube-version
argument does not work like kubepug --k8s-version
.
KubePug uses --k8s-version
to determine the swagger.json for the requested Kubernetes version and from there extracts all the supported API Versions.
Helm on the other hand simply uses --kube-version
as the value for .Capabilities.KubeVersion
. It does not determine all the supported API Versions for that Kubernetes Version and populate .Capabilities.ApiVersions
. Helm uses the API Versions for the compiled-in kubectl version
Unfortunately, this means that (using Helm 3.10.2) this command will template a chart with API Versions for kubernetes 1.25.2 (because of the compiled in version of kubectl) while KubePug will be validating for API Versions for kubernetes 1.22.0
helm template . | kubepug --k8s-version v1.22.0 --input-file=-
If we use helm template . --kube-version 1.22.0 | kubepug --k8s-version v1.22.0 --input-file=-
this only changes .Capabilities.KubeVersion
in the Helm templating - it does not affect the values of .Capabilities.APIVersions
.
In order to have helm use the API Versions for the desired kubernetes version, we must use helm template argument --api-versions
. For the current kubernetes cluster, that looks like
helm template $(kubectl api-versions | awk '{printf "--api-versions %s ",$0}') . | kubepug --k8s-version v1.22.0 --input-file=-
However, there is no mechanism to get the api-versions for a non-running cluster. We want to test our charts against the current cluster version and the next 2 minor versions, e.g. 1.22.0, 1.23.0, 1.24.0. But this is simply not possible with Helm unless you have a cluster of each version running.
It would be a great kubepug feature to output the api-versions for a given Kubernetes version so that we could feed that into helm template
because kubepug has already parsed this information from the swagger.json.
For example, it would be great if we could do this:
for K8S_VERSION in v1.22.0 v1.23.0 v1.24.0; do
helm template --kube-version=$K8S_VERSION \
$(kubepug api-versions --k8s-version $K8S_VERSION | awk '{printf "--api-versions %s ",$0}') . |
kubepug --k8s-version $K8S_VERSION --input-file=-
done
from kubepug.
Related Issues (20)
- No release of plugin for linux/arm64 HOT 2
- Support Snap package HOT 3
- panic on Windows in fixDeletedItemsList (invalid memory address or nil pointer dereference) HOT 4
- Error: could not download the swagger file HOT 3
- Error recognition for KubeProxyConfiguration HOT 3
- EKS cluster authentication issue HOT 1
- Pipe manifests to stdin for enhanced CI experience
- GitHub Actions formatter HOT 3
- Kubepug 2.0 - Planning
- policy/v1beta1 PodDisruptionBudget resources not reported HOT 2
- externaldns.k8s.io/v1alpha1 DNSEndpoint reported as deleted HOT 3
- CSIStorageCapacity deprecation not found HOT 3
- Use Kubernetes API markers as inputs
- Aggregated apiserver APIs are marked as removed HOT 3
- No output when using 1.6.0 HOT 5
- Is there a way to check upstream helm chart? HOT 1
- data.json hosted on Github HOT 2
- Standard output messes up prompt
- Move doc CI build to website repo HOT 1
- Documentation should show how to use kubepug installed by krew
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubepug.