mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-29 22:03:22 -02:30
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.
30 lines
1020 B
YAML
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
|