Skip to content

Commit

Permalink
Merge pull request #2236 from Milisha-Gupta/release_1.5.1
Browse files Browse the repository at this point in the history
Fixed issues related to docker credentials and failing Kube Join Command on multiple executions
  • Loading branch information
sujit-jadhav committed Apr 16, 2024
2 parents 3df0e78 + 5328c87 commit ba94892
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions scheduler/roles/k8s_start_manager/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
changed_when: true
register: init_output
tags: init
when: "'master' not in k8s_nodes.stdout"
when: "'control-plane' not in k8s_nodes.stdout"

- name: Setup directory for Kubernetes environment for root
ansible.builtin.file:
Expand Down Expand Up @@ -202,7 +202,8 @@
when:
- hostvars['127.0.0.1']['docker_username'] and hostvars['127.0.0.1']['docker_password']
- "'dockerregcred' not in k8s_secret.stdout"

no_log: true

- name: Add docker secret to default service account
ansible.builtin.shell: >
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "dockerregcred"}]}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
ansible.builtin.shell: >
export PATH=/usr/local/bin:$PATH && helm repo add nfs-subdir-external-provisioner '{{ nfs_subdir_external_provisioner_url }}'
changed_when: true
when: "'nfs-client-provisioner' not in k8s_pods.stdout"
when: "'nfs-subdir-external-provisioner' not in k8s_pods.stdout"
tags: init

- name: Update local Helm chart repository cache
Expand All @@ -161,7 +161,7 @@
- name: Start NFS Client Provisioner using NFS on manager node
ansible.builtin.shell: "export PATH=/usr/local/bin:$PATH && helm install nfs-omnia nfs-subdir-external-provisioner/nfs-subdir-external-provisioner --set nfs.server='{{ nfs_server_manager_node }}' --set nfs.path='{{ hostvars['127.0.0.1']['omnia_usrhome_share'] }}/kubernetes'"
changed_when: true
when: "'nfs-client-provisioner' not in k8s_pods.stdout"
when: "'nfs-subdir-external-provisioner' not in k8s_pods.stdout"
tags: init

- name: Set NFS-Client Provisioner as DEFAULT StorageClass
Expand Down
2 changes: 1 addition & 1 deletion telemetry/roles/orchestrator/tasks/k8s_init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
changed_when: false
failed_when: false
register: k8s_pods
when: "'master' not in k8s_nodes.stdout"
when: "'control-plane' not in k8s_nodes.stdout"

- name: Setup directory for Kubernetes environment for root
ansible.builtin.file:
Expand Down

0 comments on commit ba94892

Please sign in to comment.