jx3-gitops-repositories / jx3-kubernetes-vault

Jenkins X 3.x GitOps repository for a vanilla Kubernetes cluster with vault
Apache License 2.0
0 stars 2 forks source link

Used Vault chart incompatible with Kubernetes 1.23+ (or even earlier versions) #5

Open fabian-kramer opened 1 year ago

fabian-kramer commented 1 year ago

Hi,

I'm getting errors when running helm sync as described here: https://jenkins-x.io/v3/admin/platforms/on-premises/vault/ Using kubernetes 1.23.4 the command fails because of chart "vault-instance" using old API "apiextensions.k8s.io/v1beta1"

This output was only possible after updating the chart repository from jx3 to jxgh ("new" github repo) jxgh https://jenkins-x-charts.github.io/repo

Adding repo banzaicloud-stable https://kubernetes-charts.banzaicloud.com "banzaicloud-stable" has been added to your repositories

Adding repo jxgh https://jenkins-x-charts.github.io/repo "jxgh" has been added to your repositories

Upgrading release=vault-operator, chart=banzaicloud-stable/vault-operator Upgrading release=vault-instance, chart=jxgh/vault-instance Release "vault-instance" does not exist. Installing it now.

Release "vault-operator" does not exist. Installing it now.

FAILED RELEASES: NAME vault-instance vault-operator in ./helmfile.yaml: 2 errors: err 0: failed processing release vault-instance: command "/usr/sbin/helm" exited with non-zero status:

PATH: /usr/sbin/helm

ARGS: 0: helm (4 bytes) 1: upgrade (7 bytes) 2: --install (9 bytes) 3: vault-instance (14 bytes) 4: jxgh/vault-instance (19 bytes) 5: --version (9 bytes) 6: 1.0.15 (6 bytes) 7: --create-namespace (18 bytes) 8: --namespace (11 bytes) 9: jx-vault (8 bytes) 10: --reset-values (14 bytes) 11: --history-max (13 bytes) 12: 10 (2 bytes)

ERROR: exit status 1

EXIT STATUS 1

STDERR: Error: chart "vault-instance" matching 1.0.15 not found in jxgh index. (try 'helm repo update'): no chart version found for vault-instance-1.0.15

COMBINED OUTPUT: Release "vault-instance" does not exist. Installing it now. Error: chart "vault-instance" matching 1.0.15 not found in jxgh index. (try 'helm repo update'): no chart version found for vault-instance-1.0.15 err 1: failed processing release vault-operator: command "/usr/sbin/helm" exited with non-zero status:

PATH: /usr/sbin/helm

ARGS: 0: helm (4 bytes) 1: upgrade (7 bytes) 2: --install (9 bytes) 3: vault-operator (14 bytes) 4: banzaicloud-stable/vault-operator (33 bytes) 5: --version (9 bytes) 6: 1.10.0 (6 bytes) 7: --create-namespace (18 bytes) 8: --namespace (11 bytes) 9: jx-vault (8 bytes) 10: --reset-values (14 bytes) 11: --history-max (13 bytes) 12: 10 (2 bytes)

ERROR: exit status 1

EXIT STATUS 1

STDERR: Error: failed to install CRD crds/crd.yaml: resource mapping not found for name: "vaults.vault.banzaicloud.com" namespace: "" from "": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1" ensure CRDs are installed first

COMBINED OUTPUT: Release "vault-operator" does not exist. Installing it now. Error: failed to install CRD crds/crd.yaml: resource mapping not found for name: "vaults.vault.banzaicloud.com" namespace: "" from "": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1" ensure CRDs are installed first

With the latest version here vault-instance chart version 1.0.15 is used and oldest available in the new repo is 1.0.20. Latest would be as of 10.11.2022 1.0.27

mohideen commented 10 months ago

I had the same issue, and I was able to fix it with the changes in #7