X-Git-Url: https://gerrit.nordix.org/gitweb?p=infra%2Fstack%2Fkubernetes.git;a=blobdiff_plain;f=apps%2Fspinnaker%2Fkubespray%2Fplaybooks%2Froles%2Finstall%2Ftasks%2Fmain.yml;h=e90fbade1d4ea4c7d3e2151f8a76e97e7ae45eec;hp=ddff98ee5885da9f9c86432eb4767c3195540677;hb=3f7a6e04758ac28aa51bd66b67f600534f646ff0;hpb=631610211e5295a48dd309b5cbc6da2a506ba9df diff --git a/apps/spinnaker/kubespray/playbooks/roles/install/tasks/main.yml b/apps/spinnaker/kubespray/playbooks/roles/install/tasks/main.yml index ddff98e..e90fbad 100644 --- a/apps/spinnaker/kubespray/playbooks/roles/install/tasks/main.yml +++ b/apps/spinnaker/kubespray/playbooks/roles/install/tasks/main.yml @@ -36,6 +36,10 @@ src: "index.yaml.j2" dest: "{{ engine_workspace }}/offline/charts/stable/index.yaml" force: true + + - name: Create local repo index (empty initially) + command: "helm repo index {{ engine_workspace }}/offline/charts/local/" + creates: "{{ engine_workspace }}/offline/charts/local/index.yaml" when: execution_mode == "offline-deployment" - name: Initialize Helm @@ -59,6 +63,15 @@ and execution_mode == "online-deployment" and helm_repo_list_result is not search(stable_repo_url) +- name: Add local helm repo (helm v3+) + command: "helm repo add local {{ local_repo_url }}" + register: helm_repo_add_local_result + changed_when: true + when: > + helm_version is version('v3.0.0', '>=') + and execution_mode == "offline-deployment" + and helm_repo_list_result is not search(local_repo_url) + - name: Clone Helm Charts repository git: repo: "{{ helm_charts_git_url }}"