Add explicit version;Add cni plugin;Add vApp properties to node template
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2022-11-28 10:25:25 +01:00
parent 146887e9e1
commit edca98549c
5 changed files with 27 additions and 1 deletions

View File

@ -46,6 +46,9 @@
# Additionally, cert-manager is a prerequisite
- url: https://github.com/cert-manager/cert-manager/releases/download/{{ components.clusterapi.management.version.cert_manager }}/cert-manager.yaml
dest: cert-manager/{{ components.clusterapi.management.version.cert_manager }}/cert-manager.yaml
# Finally, workload clusters will need a CNI plugin
- url: https://raw.githubusercontent.com/projectcalico/calico/{{ components.clusterapi.workload.version.calico }}/manifests/calico.yaml
dest: cni-calico/{{ components.clusterapi.workload.version.calico }}/calico.yaml
loop_control:
label: "{{ item.url | basename }}"
retries: 5
@ -54,7 +57,7 @@
- name: Parse manifests
ansible.builtin.shell:
cmd: cat {{ item.dest }} | yq --no-doc eval '.. | .image? | select(.)' | awk '!/ /' | sort
cmd: cat {{ item.dest }} | yq --no-doc eval '.. | .image? | select(.)' | awk '!/ /' | sort -u
register: parsedmanifests
loop: "{{ clusterapi_manifests.results }}"
loop_control:

View File

@ -6,6 +6,7 @@
- /opt/metacluster/cluster-api/bootstrap-kubeadm/{{ components.clusterapi.management.version.base }}
- /opt/metacluster/cluster-api/cert-manager/{{ components.clusterapi.management.version.cert_manager }}
- /opt/metacluster/cluster-api/cluster-api/{{ components.clusterapi.management.version.base }}
- /opt/metacluster/cluster-api/cni-calico/{{ components.clusterapi.workload.version.calico }}
- /opt/metacluster/cluster-api/control-plane-kubeadm/{{ components.clusterapi.management.version.base }}
- /opt/metacluster/cluster-api/infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}
- /opt/metacluster/container-images

View File

@ -37,6 +37,26 @@
loop_control:
index_var: index
- name: Add vApp properties (required for Network Protocol Profiles)
community.vmware.vmware_guest:
name: "{{ (item | basename | split('.'))[:-1] | join('.') }}"
vapp_properties:
- id: guestinfo.dns.servers
value: ${dns:{{ vcenter_info.network }}}
- id: guestinfo.dns.domains
value: ${searchPath:{{ vcenter_info.network }}}
- id: guestinfo.interface.0.ip.0.address
value: ip:{{ vcenter_info.network }}
- id: guestinfo.interface.0.ip.0.netmask
value: ${netmask:{{ vcenter_info.network }}}
- id: guestinfo.interface.0.route.0.gateway
value: ${gateway:{{ vcenter_info.network }}}
when: existing_ova.results[index] is failed
loop: "{{ ova_deploy.results }}"
loop_control:
index_var: index
label: "{{ item.item }}"
- name: Create snapshot on deployed VM's
community.vmware.vmware_guest_snapshot:
folder: "{{ vcenter_info.folder }}"

View File

@ -14,6 +14,7 @@ providers:
cert-manager:
url: "/opt/metacluster/cluster-api/cert-manager/{{ _template.version.cert_manager }}/cert-manager.yaml"
version: "{{ _template.version.cert_manager }}"
## -- Controller settings -- ##
VSPHERE_SERVER: "{{ _template.hv.fqdn }}"

View File

@ -86,6 +86,7 @@ components:
infrastructure_vsphere: v1.5.0
workload:
version:
calico: v3.24.5
k8s: v1.23.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