Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Rancher v2.7.11 not found in chart index #14

Open
m-ildefons opened this issue Mar 22, 2024 · 1 comment
Open

[Bug] Rancher v2.7.11 not found in chart index #14

m-ildefons opened this issue Mar 22, 2024 · 1 comment

Comments

@m-ildefons
Copy link

Bug Description

Rancher VCluster plugin not able to install Rancher v2.7.11. Helm displays error stating that the helm chart for Rancher version v2.7.11 could not be found in the helm index

Despite the error, the Rancher VCluster plugin reports the deployment as successful:
Screenshot at 2024-03-22 15-11-04

Observed Behavior

  • The deployment of Rancher v2.7.11 was reported to be completed successfully
  • The deployment of Rancher v2.7.11 was not actually completed successfully

Expected Behavior

  • Rancher VCluster status report should indicate errors when they appear
  • Rancher v2.7.11 should have deployed successfully

Steps to reproduce

  • Deploy Harvester v1.2.1
  • Deploy Rancher VCluster Addon on Harvester:
  • Deployment doesn't finish successfully
Rancher VCluster Addon Manifest
apiVersion: harvesterhci.io/v1beta1
kind: Addon
metadata:
  creationTimestamp: '2024-03-22T13:53:18Z'
  generation: 1
  labels:
    addon.harvesterhci.io/experimental: 'true'
  managedFields:
  - apiVersion: harvesterhci.io/v1beta1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .: {}
          f:addon.harvesterhci.io/experimental: {}
      f:spec:
        .: {}
        f:chart: {}
        f:enabled: {}
        f:repo: {}
        f:valuesContent: {}
        f:version: {}
    manager: OpenAPI-Generator
    operation: Update
    time: '2024-03-22T13:53:18Z'
  name: rancher-vcluster
  namespace: rancher-vcluster
  resourceVersion: '15330'
  uid: 06a86ba9-66f9-498d-9885-5059b422d832
spec:
  chart: vcluster
  enabled: true
  repo: https://charts.loft.sh
  valuesContent: |-
    hostname: "rancher.172.19.108.35.nip.io"
    rancherVersion: "v2.7.11"
    bootstrapPassword: "password1234"
    vcluster:
      image: rancher/k3s:v1.27.10-k3s2
    sync:
      ingresses:
        enabled: "true"
    init:
      manifestsTemplate: |-
        apiVersion: v1
        kind: Namespace
        metadata:
          name: cattle-system
        ---
        apiVersion: v1
        kind: Namespace
        metadata:
          name: cert-manager
          labels:
            certmanager.k8s.io/disable-validation: "true"
        ---
        apiVersion: helm.cattle.io/v1
        kind: HelmChart
        metadata:
          name: cert-manager
          namespace: kube-system
        spec:
          targetNamespace: cert-manager
          repo: https://charts.jetstack.io
          chart: cert-manager
          version: v1.5.1
          helmVersion: v3
          set:
            installCRDs: "true"
        ---
        apiVersion: helm.cattle.io/v1
        kind: HelmChart
        metadata:
          name: rancher
          namespace: kube-system
        spec:
          targetNamespace: cattle-system
          repo: https://releases.rancher.com/server-charts/stable/
          chart: rancher
          version: {{ .Values.rancherVersion }}
          set:
            ingress.tls.source: rancher
            hostname: {{ .Values.hostname }}
            replicas: 1
            global.cattle.psp.enabled: "false"
            bootstrapPassword: {{ .Values.bootstrapPassword | quote }}
            fleet.apiServerURL: "https://rancher.172.19.108.35.nip.io/"
          helmVersion: v3
  version: v0.19.0

Environment

  • Bare-metal deployed with seeder on hp-199
  • Harvester v1.2.1
  • Rancher v2.7.11

Additional Context

Helm installation logs from rancher-vcluster namespace
> k -n rancher-vcluster logs pod/helm-install-rancher-qxdk9-x-kube-system-x-rancher-vcluster
if [[ ${KUBERNETES_SERVICE_HOST} =~ .*:.* ]]; then
        echo "KUBERNETES_SERVICE_HOST is using IPv6"
        CHART="${CHART//%\{KUBERNETES_API\}%/[${KUBERNETES_SERVICE_HOST}]:${KUBERNETES_SERVICE_PORT}}"
else
        CHART="${CHART//%\{KUBERNETES_API\}%/${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}}"
fi

set +v -x
+ [[ '' != \t\r\u\e ]]
+ export HELM_HOST=127.0.0.1:44134
+ HELM_HOST=127.0.0.1:44134
+ helm_v2 init --skip-refresh --client-only --stable-repo-url https://charts.helm.sh/stable/
+ tiller --listen=127.0.0.1:44134 --storage=secret
[main] 2024/03/22 14:05:28 Starting Tiller v2.17.0 (tls=false)
[main] 2024/03/22 14:05:28 GRPC listening on 127.0.0.1:44134
[main] 2024/03/22 14:05:28 Probes listening on :44135
[main] 2024/03/22 14:05:28 Storage driver is Secret
[main] 2024/03/22 14:05:28 Max history per release is 0
$HELM_HOME has been configured at /home/klipper-helm/.helm.
Not installing Tiller due to 'client-only' flag having been set
++ timeout -s KILL 30 helm_v2 ls --all '^rancher$' --output json
++ jq -r '.Releases | length'
[storage] 2024/03/22 14:05:28 listing all releases with filter
+ V2_CHART_EXISTS=
+ [[ '' == \1 ]]
+ [[ v3 == \v\2 ]]
+ shopt -s nullglob
+ [[ -f /config/ca-file.pem ]]
+ [[ -f /tmp/ca-file.pem ]]
+ [[ -n '' ]]
+ helm_content_decode
+ set -e
+ ENC_CHART_PATH=/chart/rancher.tgz.base64
+ CHART_PATH=/tmp/rancher.tgz
+ [[ ! -f /chart/rancher.tgz.base64 ]]
+ return
+ [[ install != \d\e\l\e\t\e ]]
+ helm_repo_init
+ grep -q -e 'https\?://'
+ [[ helm_v3 == \h\e\l\m\_\v\3 ]]
+ [[ rancher/rancher == stable/* ]]
+ [[ -n https://releases.rancher.com/server-charts/stable/ ]]
+ [[ -f /auth/username ]]
+ helm_v3 repo add rancher https://releases.rancher.com/server-charts/stable/
"rancher" already exists with the same configuration, skipping
+ helm_v3 repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "rancher" chart repository
Update Complete. ⎈Happy Helming!⎈
+ helm_update install --namespace cattle-system --version v2.7.11 --set-string bootstrapPassword=password1234 --set-string fleet.apiServerURL=https://rancher.172.19.108.35.nip.io/ --set global.cattle.psp.enabled=false --set-string hostname=rancher.172.19.108.35.nip.io --set-string ingress.tls.source=rancher --set replicas=1
+ [[ helm_v3 == \h\e\l\m\_\v\3 ]]
++ helm_v3 ls --all -f '^rancher$' --namespace cattle-system --output json
++ jq -r '"\(.[0].app_version),\(.[0].status)"'
++ tr '[:upper:]' '[:lower:]'
+ LINE=null,null
+ IFS=,
+ read -r INSTALLED_VERSION STATUS _
+ VALUES=
+ [[ install = \d\e\l\e\t\e ]]
+ [[ null =~ ^(|null)$ ]]
+ [[ null =~ ^(|null)$ ]]
+ echo 'Installing helm_v3 chart'
+ helm_v3 install --namespace cattle-system --version v2.7.11 --set-string bootstrapPassword=password1234 --set-string fleet.apiServerURL=https://rancher.172.19.108.35.nip.io/ --set global.cattle.psp.enabled=false --set-string hostname=rancher.172.19.108.35.nip.io --set-string ingress.tls.source=rancher --set replicas=1 rancher rancher/rancher
Error: INSTALLATION FAILED: chart "rancher" matching v2.7.11 not found in rancher index. (try 'helm repo update'): no chart version found for rancher-v2.7.11
@tserong
Copy link

tserong commented Jan 14, 2025

I ran into the same issue while checking #24. The problem is that rancher v2.7.11 is a Prime-only release (see https://github.com/rancher/rancher/releases/v2.7.11), which means it's not available via the public repos specified in the rancher-vcluster yaml. Really, we need to figure out how to propagate this error to the Harvester UI so the user knows WTF is going on without having to go digging...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants