terratest
terratest copied to clipboard
How to handle conflicting k8s.io/api dependencies
Hi, thank you for terratest. It's a great help for us to make sure our renderen Helm charts do what they are supposed to do.
Currently I am stuck at a point where I want to assert that certain manifests are rendered correctly by Helm. These manifests are Deployments, Ingresses, etc. which are dependent on the API that is available in the k8s cluster (e.g. networking.k8s.io/v1beta1
vs. networking.k8s.io/v1
for Ingresses).
If I understand correctly, terratest
pins the k8s.io/api
dependency to v0.20.6
(https://github.com/gruntwork-io/terratest/blob/3f8023697482025417a6e42f3a9643c5497910d9/go.mod#L46). If we now need to assert certain fields or APIs that are only available in later versions of the k8s API, how should we go about that? I'm not very familiar with the go ecosystem, so maybe I'm missing something here.
Any help would be greatly appreciated. Thank you.