Revert readycheck for step-ca;Revert retries;DRY;Upgrade components;Fix syntax
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
85dcbb73a4
commit
edc19464e2
@ -54,8 +54,8 @@
|
|||||||
dest: ipam-in-cluster/{{ components.clusterapi.management.version.ipam_incluster }}/metadata.yaml
|
dest: ipam-in-cluster/{{ components.clusterapi.management.version.ipam_incluster }}/metadata.yaml
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.url | basename }}"
|
label: "{{ item.url | basename }}"
|
||||||
retries: 5
|
retries: "{{ playbook.retries }}"
|
||||||
delay: 5
|
delay: "{{ playbook.delays.short }}"
|
||||||
until: clusterapi_manifests is not failed
|
until: clusterapi_manifests is not failed
|
||||||
|
|
||||||
# - name: Inject manifests
|
# - name: Inject manifests
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
connection: local
|
connection: local
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
vars_files:
|
vars_files:
|
||||||
|
- defaults.yml
|
||||||
- metacluster.yml
|
- metacluster.yml
|
||||||
# become: true
|
# become: true
|
||||||
roles:
|
roles:
|
||||||
|
@ -7,6 +7,6 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item | basename }}"
|
label: "{{ item | basename }}"
|
||||||
# Probably should add a task before that ensures K3s node is fully initialized before starting imports; currently K3s goes away briefly during this loop
|
# Probably should add a task before that ensures K3s node is fully initialized before starting imports; currently K3s goes away briefly during this loop
|
||||||
retries: 9
|
retries: "{{ playbook.retries }}"
|
||||||
delay: 10
|
delay: "{{ playbook.delays.short }}"
|
||||||
until: import_result is not failed
|
until: import_result is not failed
|
||||||
|
@ -6,21 +6,11 @@
|
|||||||
chart_ref: /opt/metacluster/helm-charts/step-certificates
|
chart_ref: /opt/metacluster/helm-charts/step-certificates
|
||||||
release_namespace: step-ca
|
release_namespace: step-ca
|
||||||
create_namespace: yes
|
create_namespace: yes
|
||||||
wait: no
|
# Unable to use REST api based readycheck due to missing ingress
|
||||||
|
wait: yes
|
||||||
kubeconfig: "{{ kubeconfig.path }}"
|
kubeconfig: "{{ kubeconfig.path }}"
|
||||||
values: "{{ components.stepcertificates.chart_values }}"
|
values: "{{ components.stepcertificates.chart_values }}"
|
||||||
|
|
||||||
- name: Ensure step-ca API availability
|
|
||||||
ansible.builtin.uri:
|
|
||||||
url: https://ca.{{ vapp['metacluster.fqdn'] }}/health
|
|
||||||
method: GET
|
|
||||||
register: api_readycheck
|
|
||||||
until:
|
|
||||||
- api_readycheck.json.status is defined
|
|
||||||
- api_readycheck.json.status == 'ok'
|
|
||||||
retries: 9
|
|
||||||
delay: 60
|
|
||||||
|
|
||||||
- name: Retrieve configmap w/ root certificate
|
- name: Retrieve configmap w/ root certificate
|
||||||
kubernetes.core.k8s_info:
|
kubernetes.core.k8s_info:
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
until:
|
until:
|
||||||
- api_readycheck.json.status is defined
|
- api_readycheck.json.status is defined
|
||||||
- api_readycheck.json.status == 'pass'
|
- api_readycheck.json.status == 'pass'
|
||||||
retries: 9
|
retries: "{{ playbook.retries }}"
|
||||||
delay: 60
|
delay: "{{ playbook.delays.long }}"
|
||||||
|
|
||||||
- name: Configure additional SSH ingress
|
- name: Configure additional SSH ingress
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
register: api_readycheck
|
register: api_readycheck
|
||||||
until:
|
until:
|
||||||
- api_readycheck.json.Version is defined
|
- api_readycheck.json.Version is defined
|
||||||
retries: 9
|
retries: "{{ playbook.retries }}"
|
||||||
delay: 60
|
delay: "{{ playbook.delays.long }}"
|
||||||
|
|
||||||
- name: Generate argo-cd API token
|
- name: Generate argo-cd API token
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
status_code: [200, 401]
|
status_code: [200, 401]
|
||||||
register: api_readycheck
|
register: api_readycheck
|
||||||
until: api_readycheck.json.apiVersion is defined
|
until: api_readycheck.json.apiVersion is defined
|
||||||
retries: 5
|
retries: "{{ playbook.retries }}"
|
||||||
delay: 30
|
delay: "{{ playbook.delays.medium }}"
|
||||||
|
|
||||||
- name: Install kubectl tab-completion
|
- name: Install kubectl tab-completion
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
until:
|
until:
|
||||||
- api_readycheck.json.status is defined
|
- api_readycheck.json.status is defined
|
||||||
- api_readycheck.json.status == 'healthy'
|
- api_readycheck.json.status == 'healthy'
|
||||||
retries: 9
|
retries: "{{ playbook.retries }}"
|
||||||
delay: 60
|
delay: "{{ playbook.delays.long }}"
|
||||||
|
|
||||||
- name: Push images to registry
|
- name: Push images to registry
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
@ -39,8 +39,8 @@
|
|||||||
loop: "{{ query('ansible.builtin.fileglob', '/opt/metacluster/container-images/*.tar') | sort }}"
|
loop: "{{ query('ansible.builtin.fileglob', '/opt/metacluster/container-images/*.tar') | sort }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item | basename }}"
|
label: "{{ item | basename }}"
|
||||||
retries: 5
|
retries: "{{ playbook.retries }}"
|
||||||
delay: 10
|
delay: "{{ playbook.delays.short }}"
|
||||||
until: push_result is not failed
|
until: push_result is not failed
|
||||||
|
|
||||||
- name: Get all stored container images (=artifacts)
|
- name: Get all stored container images (=artifacts)
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
register: api_readycheck
|
register: api_readycheck
|
||||||
until:
|
until:
|
||||||
- api_readycheck is not failed
|
- api_readycheck is not failed
|
||||||
retries: 9
|
retries: "{{ playbook.retries }}"
|
||||||
delay: 60
|
delay: "{{ playbook.delays.long }}"
|
||||||
|
|
||||||
module_defaults:
|
module_defaults:
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
- name: Store custom cluster-template
|
- name: Store custom cluster-template
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /opt/metacluster/cluster-api/custom-cluster-template.yaml
|
dest: /opt/metacluster/cluster-api/custom-cluster-template.yaml
|
||||||
content: "{{ lookup('kubernetes.core.kustomize', dir='/opt/metacluster/cluster-api/infrastructure-vsphere/' + {{ components.clusterapi.management.version.infrastructure_vsphere }}) }}"
|
content: "{{ lookup('kubernetes.core.kustomize', dir='/opt/metacluster/cluster-api/infrastructure-vsphere/' + components.clusterapi.management.version.infrastructure_vsphere ) }}"
|
||||||
|
|
||||||
- name: Initialize Cluster API management cluster
|
- name: Initialize Cluster API management cluster
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
playbook:
|
||||||
|
retries: 5
|
||||||
|
delays:
|
||||||
|
long: 60
|
||||||
|
medium: 30
|
||||||
|
short: 10
|
@ -1,9 +1,7 @@
|
|||||||
platform:
|
platform:
|
||||||
|
|
||||||
k3s:
|
k3s:
|
||||||
# version: v1.26.0+k3s1
|
version: v1.26.0+k3s1
|
||||||
# max supported version by Longhorn is <v1.25.0
|
|
||||||
version: v1.24.9+k3s1
|
|
||||||
|
|
||||||
gitops:
|
gitops:
|
||||||
repository:
|
repository:
|
||||||
@ -151,7 +149,7 @@ components:
|
|||||||
|
|
||||||
longhorn:
|
longhorn:
|
||||||
helm:
|
helm:
|
||||||
version: 1.3.2
|
version: 1.4.0
|
||||||
chart: longhorn/longhorn
|
chart: longhorn/longhorn
|
||||||
parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag'
|
parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag'
|
||||||
chart_values: !unsafe |
|
chart_values: !unsafe |
|
||||||
@ -167,7 +165,8 @@ components:
|
|||||||
|
|
||||||
step-certificates:
|
step-certificates:
|
||||||
helm:
|
helm:
|
||||||
version: 1.18.2+20220324
|
# version: 1.18.2+20220324
|
||||||
|
version: 1.23.0
|
||||||
chart: smallstep/step-certificates
|
chart: smallstep/step-certificates
|
||||||
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sed '/:/!s/$/:latest/' | sort -u
|
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sed '/:/!s/$/:latest/' | sort -u
|
||||||
chart_values: !unsafe |
|
chart_values: !unsafe |
|
||||||
|
Loading…
Reference in New Issue
Block a user