From c2219a5ddc93c7cd084f45e051e5aeafa15cda0b Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Tue, 17 Jan 2023 11:45:25 +0100 Subject: [PATCH] Upgrade CAPV images;Add readycheck --- ansible/roles/assets/tasks/nodetemplates.yml | 2 +- .../roles/workloadcluster/tasks/clusterapi.yml | 15 +++++++++++++++ ansible/vars/metacluster.yml | 5 ++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ansible/roles/assets/tasks/nodetemplates.yml b/ansible/roles/assets/tasks/nodetemplates.yml index 53119b3..eb7b93c 100644 --- a/ansible/roles/assets/tasks/nodetemplates.yml +++ b/ansible/roles/assets/tasks/nodetemplates.yml @@ -1,4 +1,4 @@ - name: Download node-template image ansible.builtin.uri: url: "{{ components.clusterapi.workload.node_template.url }}" - dest: /opt/workloadcluster/node-templates/{{ components.clusterapi.workload.node_template.name }} + dest: /opt/workloadcluster/node-templates/{{ components.clusterapi.workload.node_template.url | basename}} diff --git a/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml b/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml index f8ccbf3..99bc1d5 100644 --- a/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml +++ b/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml @@ -71,6 +71,21 @@ --kubeconfig {{ kubeconfig.path }} chdir: /opt/metacluster/cluster-api +- name: Ensure CAPI/CAPV controller availability + kubernetes.core.k8s_info: + kind: Deployment + name: "{{ item.name }}" + namespace: "{{ item.namespace }}" + wait: true + kubeconfig: "{{ kubeconfig.path }}" + loop: + - name: capi-controller-manager + namespace: capi-system + - name: capv-controller-manager + namespace: capv-system + loop_control: + label: "{{ item.name }}" + - name: Parse vApp for workload cluster sizing ansible.builtin.set_fact: clustersize: >- diff --git a/ansible/vars/metacluster.yml b/ansible/vars/metacluster.yml index aac2881..bd64d9a 100644 --- a/ansible/vars/metacluster.yml +++ b/ansible/vars/metacluster.yml @@ -87,11 +87,10 @@ components: workload: version: calico: v3.24.5 - k8s: v1.23.5 + k8s: v1.25.5 node_template: # Refer to `https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/v1.3.5/README.md#kubernetes-versions-with-published-ovas` for a list of supported node templates - url: https://storage.googleapis.com/capv-images/release/v1.23.5/ubuntu-2004-kube-v1.23.5.ova - name: ubuntu-2004-kube-v1.23.5.ova + url: https://storage.googleapis.com/capv-templates/v1.25.5/ubuntu-2004-kube-v1.25.5.ova gitea: helm: