Skip to content

Commit 739882f

Browse files
committed
Argo CD : checksum support for the install url
Fixes #12223
1 parent c7c3d2b commit 739882f

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

roles/kubernetes-apps/argocd/tasks/main.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,17 @@
2020
- name: namespace
2121
file: argocd-namespace.yml
2222
- name: install
23-
file: argocd-install.yml
23+
file: "{{ downloads.argocd_install.dest | basename }}"
2424
namespace: "{{ argocd_namespace }}"
25-
url: "{{ argocd_install_url }}"
25+
download: "{{ downloads.argocd_install }}"
2626
when:
2727
- "inventory_hostname == groups['kube_control_plane'][0]"
2828

2929
- name: Kubernetes Apps | Download ArgoCD remote manifests
3030
include_tasks: "../../../download/tasks/download_file.yml"
3131
vars:
32-
download_argocd:
33-
enabled: "{{ argocd_enabled }}"
34-
file: true
35-
dest: "{{ local_release_dir }}/{{ item.file }}"
36-
url: "{{ item.url }}"
37-
unarchive: false
38-
owner: "root"
39-
mode: "0644"
40-
sha256: ""
41-
download: "{{ download_defaults | combine(download_argocd) }}"
42-
with_items: "{{ argocd_templates | selectattr('url', 'defined') | list }}"
32+
download: "{{ download_defaults | combine(item.download) }}"
33+
with_items: "{{ argocd_templates | selectattr('download', 'defined') | list }}"
4334
loop_control:
4435
label: "{{ item.file }}"
4536
when:
@@ -54,15 +45,15 @@
5445
owner: false
5546
group: false
5647
delegate_to: "{{ inventory_hostname }}"
57-
with_items: "{{ argocd_templates | selectattr('url', 'defined') | list }}"
48+
with_items: "{{ argocd_templates | selectattr('download', 'defined') | list }}"
5849
when:
5950
- "inventory_hostname == groups['kube_control_plane'][0]"
6051

6152
- name: Kubernetes Apps | Set ArgoCD namespace for remote manifests
6253
become: true
6354
command: |
6455
{{ bin_dir }}/yq eval-all -i '.metadata.namespace="{{ argocd_namespace }}"' {{ kube_config_dir }}/{{ item.file }}
65-
with_items: "{{ argocd_templates | selectattr('url', 'defined') | list }}"
56+
with_items: "{{ argocd_templates | selectattr('download', 'defined') | list }}"
6657
loop_control:
6758
label: "{{ item.file }}"
6859
when:
@@ -74,7 +65,7 @@
7465
src: "{{ item.file }}.j2"
7566
dest: "{{ kube_config_dir }}/{{ item.file }}"
7667
mode: "0644"
77-
with_items: "{{ argocd_templates | selectattr('url', 'undefined') | list }}"
68+
with_items: "{{ argocd_templates | selectattr('download', 'undefined') | list }}"
7869
loop_control:
7970
label: "{{ item.file }}"
8071
when:

roles/kubespray_defaults/defaults/main/download.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ kubelet_binary_checksum: "{{ kubelet_checksums[image_arch][kube_version] }}"
200200
kubectl_binary_checksum: "{{ kubectl_checksums[image_arch][kube_version] }}"
201201
kubeadm_binary_checksum: "{{ kubeadm_checksums[image_arch][kube_version] }}"
202202
yq_binary_checksum: "{{ yq_checksums[image_arch][yq_version] }}"
203+
argocd_install_checksum: "{{ argocd_install_checksums.no_arch[argocd_version] }}"
203204
calicoctl_binary_checksum: "{{ calicoctl_binary_checksums[image_arch][calico_ctl_version] }}"
204205
ciliumcli_binary_checksum: "{{ ciliumcli_binary_checksums[image_arch][cilium_cli_version] }}"
205206
crictl_binary_checksum: "{{ crictl_checksums[image_arch][crictl_version] }}"
@@ -1108,6 +1109,19 @@ downloads:
11081109
groups:
11091110
- kube_control_plane
11101111

1112+
argocd_install:
1113+
enabled: "{{ argocd_enabled }}"
1114+
file: true
1115+
version: "{{ argocd_version }}"
1116+
dest: "{{ local_release_dir }}/argocd-install.yml"
1117+
checksum: "{{ argocd_install_checksum }}"
1118+
url: "{{ argocd_install_url }}"
1119+
unarchive: false
1120+
owner: "root"
1121+
mode: "0644"
1122+
groups:
1123+
- kube_control_plane
1124+
11111125
download_defaults:
11121126
container: false
11131127
file: false

roles/kubespray_defaults/vars/main/checksums.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,3 +1356,6 @@ gateway_api_experimental_crds_checksums:
13561356
1.2.0: sha256:4369188e63b9ab5a35b5a83032c94d871159dece086b908b6ea18ea321ca06a9
13571357
1.1.0: sha256:10f322744a005d4e73e2b067e95fecd4cfec619dc7564930b488c296bfa3bec1
13581358
1.0.0: sha256:6c601dced7872a940d76fa667ae126ba718cb4c6db970d0bab49128ecc1192a3
1359+
argocd_install_checksums:
1360+
no_arch:
1361+
2.14.5: sha256:247ccda29c9faac4e0c8598680f5ebefff9911e957e3aeaf838eb4bbf455f2f4

0 commit comments

Comments
 (0)