Split CAPI cluster manifest;Remove debugging;Add dependency
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2023-03-14 14:28:24 +01:00
parent 925bc5be39
commit c0b2857be1
3 changed files with 23 additions and 4 deletions

View File

@ -136,11 +136,29 @@
chdir: /opt/metacluster/cluster-api
register: clusterctl_newcluster
# TODO: move to git repo
- name: Initialize tempfile
ansible.builtin.tempfile:
state: file
register: capi_clustermanifest
- name: Save workload cluster manifest
ansible.builtin.copy:
dest: /opt/metacluster/cluster-api/new-cluster.yaml
dest: "{{ capi_clustermanifest.path }}"
content: "{{ clusterctl_newcluster.stdout }}"
- name: Split manifest into separate files
ansible.builtin.shell:
cmd: >-
kubectl slice \
-f {{ capi_clustermanifest.path }} \
-o /opt/metacluster/cluster-api/new-cluster
- name: Cleanup tempfile
ansible.builtin.file:
path: "{{ capi_clustermanifest.path }}"
state: absent
when: capi_clustermanifest.path is defined
- name: WORKAROUND - Wait for ingress ACME requests to complete
ansible.builtin.shell:
cmd: >-
@ -151,6 +169,7 @@
until: certificate_subject is not failed
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
- name: Apply workload cluster manifest
kubernetes.core.k8s:
definition: >-

View File

@ -27,8 +27,6 @@
- name: Calculate crude storage benchmark
ansible.builtin.set_fact:
storage_benchmark: "{{ [storage_benchmark, (end_time | int - start_time | int)] | max }}"
- debug:
var: storage_benchmark
- name: Mount dynamic disk
ansible.posix.mount:

View File

@ -294,6 +294,8 @@ dependencies:
url: https://get.helm.sh/helm-v3.10.2-linux-amd64.tar.gz
archive: compressed
extra_opts: --strip-components=1
- filename: kubectl-slice
url: https://github.com/patrickdappollonio/kubectl-slice/releases/download/v1.2.5/kubectl-slice_linux_x86_64.tar.gz
- filename: npp-prepper
url: https://code.spamasaurus.com/api/packages/djpbessems/generic/npp-prepper/v0.5.1/npp-prepper
- filename: skopeo