helm / chart-testing

CLI tool for linting and testing Helm charts
Apache License 2.0
1.34k stars 215 forks source link

`ct install` grabs wrong deployment name on 1.25.4+k3s1 cluster? #509

Closed stavros-k closed 11 months ago

stavros-k commented 1 year ago

Is this a request for help?:

No, ehm maybe yes?


Is this a BUG REPORT or FEATURE REQUEST? (choose one): Probably bug?

Running on Github actions, when using the below cluster, while ct install I see the bellow error

        uses: nolar/setup-k3d-k3s@293b8e5822a20bc0d5bcdd4826f1a665e72aba96 # tag=v1.0.9
        with:
          version: v1.25.4+k3s1
client.go:128: [debug] creating 3 resource(s)
wait.go:66: [debug] beginning wait for 3 resources with timeout of 10m0s
ready.go:277: [debug] Deployment is not ready: common-test-cvoe1s29ku/common-test-cvoe1s29ku. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-cvoe1s29ku/common-test-cvoe1s29ku. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-cvoe1s29ku/common-test-cvoe1s29ku. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-cvoe1s29ku/common-test-cvoe1s29ku. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-cvoe1s29ku/common-test-cvoe1s29ku. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-cvoe1s29ku/common-test-cvoe1s29ku. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-cvoe1s29ku/common-test-cvoe1s29ku. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-cvoe1s29ku/common-test-cvoe1s29ku. 0 out of 1 expected pods are ready
>>> kubectl --request-timeout=30s get deployments --namespace common-test-cvoe1s29ku --selector  --output jsonpath={.items[*].metadata.name}
>>> kubectl --request-timeout=30s rollout status deployment E0103 --namespace common-test-cvoe1s29ku
E0103 19:46:53.523776    5235 memcache.go:255] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
E0103 19:46:53.539034    5235 memcache.go:106] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
E0103 19:46:53.541050    5235 memcache.go:106] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
E0103 19:46:53.542814    5235 memcache.go:106] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
Error from server (NotFound): deployments.apps "E0103" not found

Notice the deployments.apps E0103? It's the error code above... Which results in a failing ct install run.

When running with:

        uses: nolar/setup-k3d-k3s@293b8e5822a20bc0d5bcdd4826f1a665e72aba96 # tag=v1.0.9
        with:
          version: v1.22.4+k3s1

Everything is fine:

client.go:128: [debug] creating 3 resource(s)
wait.go:66: [debug] beginning wait for 3 resources with timeout of 10m0s
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-tbz97ul4k8/common-test-tbz97ul4k8. 0 out of 1 expected pods are ready
>>> kubectl --request-timeout=30s get deployments --namespace common-test-tbz97ul4k8 --selector  --output jsonpath={.items[*].metadata.name}
>>> kubectl --request-timeout=30s rollout status deployment common-test-tbz97ul4k8 --namespace common-test-tbz97ul4k8
deployment "common-test-tbz97ul4k8" successfully rolled out

Not really sure if this an issue with the cluster setup or ct install

Version of Helm and Kubernetes: Helm: 3.10.3 Kubernetes: v1.25.4+k3s1

What happened:

ct install fails with newer k3s version

What you expected to happen:

ct install to not fail

How to reproduce it (as minimally and precisely as possible):

Not really sure. You can see some of the latest commits that I'm juggling between versions and it fails here https://github.com/stavros-k/ix-charts/pull/1

Anything else we need to know:

Even tried the v1.24 which does not show the E0103 errors, but still grabs wrong deployment name (This version is working on another repo tho.. eg: ) https://github.com/truecharts/charts/blob/master/.github/workflows/charts-test.yaml#L252


client.go:128: [debug] creating 3 resource(s)
wait.go:66: [debug] beginning wait for 3 resources with timeout of 10m0s
ready.go:277: [debug] Deployment is not ready: common-test-mp1fzvlu0d/common-test-mp1fzvlu0d. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-mp1fzvlu0d/common-test-mp1fzvlu0d. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-mp1fzvlu0d/common-test-mp1fzvlu0d. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-mp1fzvlu0d/common-test-mp1fzvlu0d. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-mp1fzvlu0d/common-test-mp1fzvlu0d. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-mp1fzvlu0d/common-test-mp1fzvlu0d. 0 out of 1 expected pods are ready
ready.go:277: [debug] Deployment is not ready: common-test-mp1fzvlu0d/common-test-mp1fzvlu0d. 0 out of 1 expected pods are ready
>>> kubectl --request-timeout=30s get deployments --namespace common-test-mp1fzvlu0d --selector  --output jsonpath={.items[*].metadata.name}
>>> kubectl --request-timeout=30s rollout status deployment E0103 --namespace common-test-mp1fzvlu0d
github-actions[bot] commented 11 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 11 months ago

This issue was closed because it has been stalled for 5 days with no activity.