Files
kubespray/roles/kubernetes-apps/argocd/tasks/main.yml
T
Max Gautier 1011c240b4 downloads: split file and containers (#13581)
Splits the definitions into two dicts, while joining then for now to
preserve the downloads dict.

Update all consumers of the variables, which are roughly:
- manual includes of the download role (which will be removed in the
  short future)
- install tasks using the resolved 'dest' to find the artefacts

This will make further division of the downloads role easier.
2026-10-13 09:58:21 +00:00

30 lines
1020 B
YAML

---
- name: Kubernetes Apps | Install ArgoCD
vars:
ns_object:
apiVersion: v1
kind: Namespace
metadata:
name: "{{ argocd_namespace }}"
labels:
app: argocd
command:
cmd: >
{{ kubectl }} apply -n {{ argocd_namespace }}
--server-side=true --force-conflicts --field-manager=kubespray
-f - -f {{ downloads_file.argocd_install.dest }}
stdin: "{{ ns_object | to_json }}"
# https://github.com/argoproj/argo-cd/blob/master/docs/faq.md#i-forgot-the-admin-password-how-do-i-reset-it
- name: Kubernetes Apps | Set ArgoCD custom admin password
vars:
password_patch:
stringData:
'admin.password': "{{ argocd_admin_password | password_hash('bcrypt') }}"
'admin.passwordMtime': "{{ now(utc=true, fmt='%Y-%m-%dT%H:%M:%SZ') }}"
command:
cmd: "{{ kubectl }} -n {{ argocd_namespace }} patch secret argocd-secret --patch-file=/dev/stdin"
stdin: "{{ password_patch | to_json }}"
when:
- argocd_admin_password is defined