vmware-tanzu / helm-charts

Contains Helm charts for Kubernetes related open source tools
https://vmware-tanzu.github.io/helm-charts/
Apache License 2.0
251 stars 362 forks source link

use multi arch kubectl image #339

Open vchrisb opened 2 years ago

vchrisb commented 2 years ago

Describe the problem/challenge you have The default kubectl image used for upgrading the CRDs is bitnami/kubectl. This image is currently only available for amd64 architecture, therefore on a non amd64 cluster the crd upgrade will fail. https://github.com/bitnami/bitnami-docker-kubectl/issues/22

The velero image is multi arch.

Describe the solution you'd like Use a kubectl image that is multi arch.

Environment:

jaredallard commented 2 years ago

For anyone who needs a quick fix like I did (in jsonnet, but just goes to values.yaml as YAML). Just took the bitnami/kubectl image and made it multi-arch for amd64/arm64. (Docker Hub)

    kubectl: {
      image: {
        repository: 'jaredallard/velero-kubectl',
        tag: 'v1.23.3',
      },
    },
jenting commented 2 years ago

Thanks for the feedback.

Actually, I'm thinking that probably we should choose another approach to upgrade the Velero CRD instead of using a kubectl job to upgrade the Velero CRD.

jenting commented 2 years ago

The current way is to provide multi-arch is to use rancher/kubectl by customize the kubectl.image.repository and kubectl.image.tag as well.

We could change the default kubectl image to rancher/kubectl rather than bitnami/kubectl, however, the rancher/kubectl doesn't ship the kubectl 1.16.x version.

vchrisb commented 2 years ago

@jenting I tried using the rancher image, but it does not include cp used here: https://github.com/vmware-tanzu/helm-charts/blob/main/charts/velero/templates/upgrade-crds.yaml#L52 The image only includes kubectl: https://github.com/rancher/kubectl/blob/master/Dockerfile

Michaelpalacce commented 2 years ago

Having the same issue btw. I had to make my own image based on debian. +1 for changing the approach of this....

Michaelpalacce commented 2 years ago

For those interested: https://github.com/Michaelpalacce/HomeLab/blob/master/cluster/homelab/apps/velero/helm-release.yaml

qiuming-best commented 1 year ago

@jenting if enhance velero upgrade command, the kubectl binary is not used anymore, and we can use different arch images of velero directly

jenting commented 1 year ago

Leaving a note here, the bitnami/kubectl supports linux/arm64 from 1.25+ version.

levilugato commented 10 months ago

how about version 1.23 ?