Fix typo;Fix readycheck;Add argocd applicationset
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
bd0b74ba19
commit
2cd2c4c6d0
@ -37,7 +37,7 @@
|
||||
|
||||
- name: Ensure gitea API availability
|
||||
ansible.builtin.uri:
|
||||
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/healtz
|
||||
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/healthz
|
||||
method: GET
|
||||
register: api_readycheck
|
||||
until: api_readycheck.json.status | default(false) | bool
|
||||
|
@ -29,9 +29,6 @@
|
||||
password: "{{ vapp['guestinfo.rootpw'] }}"
|
||||
register: argocd_api_token
|
||||
|
||||
# - name: Create umbrella application
|
||||
# ansible.builtin.template:
|
||||
#
|
||||
- name: Configure metacluster-gitops repository
|
||||
ansible.builtin.template:
|
||||
src: gitrepo.j2
|
||||
@ -48,6 +45,20 @@
|
||||
notify:
|
||||
- Apply manifests
|
||||
|
||||
- name: Create applicationset
|
||||
ansible.builtin.template:
|
||||
src: applicationset.j2
|
||||
dest: /var/lib/rancher/k3s/server/manifests/{{ _template.name }}-manifest.yaml
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
vars:
|
||||
_template:
|
||||
name: argocd-applicationset-metacluster
|
||||
namespace: argo-cd
|
||||
notify:
|
||||
- Apply manifests
|
||||
|
||||
- name: Trigger handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
|
@ -15,8 +15,10 @@
|
||||
ansible.builtin.uri:
|
||||
url: https://{{ vapp['guestinfo.ipaddress'] }}:6443/livez?verbose
|
||||
method: GET
|
||||
validate_certs: no
|
||||
status_code: [200, 401]
|
||||
register: api_readycheck
|
||||
until: api_readycheck.json.apiVersion | default(false) | bool
|
||||
until: api_readycheck.json.apiVersion is defined
|
||||
retries: 3
|
||||
delay: 30
|
||||
|
||||
|
@ -0,0 +1,28 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: {{ _template.name }}
|
||||
namespace: {{ _template.namespace }}
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
repoURL: https://git.{{ vapp['metacluster.fqdn'] }}/mc/ArgoCD.Config.git
|
||||
revision: HEAD
|
||||
directories:
|
||||
- path: metacluster-applicationset/*
|
||||
template:
|
||||
metadata:
|
||||
name: {% raw %}'{{ path.basename }}'{% endraw %}
|
||||
spec:
|
||||
project: default
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
source:
|
||||
repoURL: https://git.{{ vapp['metacluster.fqdn'] }}/mc/ArgoCD.Config.git
|
||||
targetRevision: HEAD
|
||||
path: {% raw %}'{{ path }}'{% endraw %}
|
||||
destination:
|
||||
server: https://{{ vapp['guestinfo.ipaddress'] }}:6443
|
||||
namespace: default
|
@ -112,7 +112,7 @@ components:
|
||||
|
||||
gitea:
|
||||
helm:
|
||||
version: v5.0.9 # (= Gitea v1.16.8)
|
||||
version: v6.0.0 # (= Gitea v1.17.1)
|
||||
chart: gitea-charts/gitea
|
||||
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | sed '/:/!s/$/:latest/'
|
||||
chart_values: !unsafe |
|
||||
|
Loading…
Reference in New Issue
Block a user