Add fileflob filter; Housekeeping;Add dependency;Upgrade binary
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Danny Bessems 2022-11-07 13:28:44 +01:00
parent f27dea92e3
commit 5c75452315
7 changed files with 23 additions and 15 deletions

View File

@ -1,7 +1,7 @@
- name: Compress tarballs - name: Compress tarballs
community.general.archive: community.general.archive:
dest: /opt/metacluster/container-images/image-tarballs.tgz dest: /opt/metacluster/container-images/image-tarballs.tgz
path: /opt/metacluster/container-images/* path: /opt/metacluster/container-images/*.tar
format: gz format: gz
remove: yes remove: yes

View File

@ -41,7 +41,7 @@
method: GET method: GET
register: api_readycheck register: api_readycheck
until: api_readycheck.json.status is defined until: api_readycheck.json.status is defined
retries: 3 retries: 5
delay: 30 delay: 30
- name: Generate gitea API token - name: Generate gitea API token

View File

@ -16,7 +16,7 @@
method: GET method: GET
register: api_readycheck register: api_readycheck
until: api_readycheck.json.Version is defined until: api_readycheck.json.Version is defined
retries: 3 retries: 5
delay: 30 delay: 30
- name: Generate argo-cd API token - name: Generate argo-cd API token

View File

@ -19,7 +19,7 @@
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: 3 retries: 5
delay: 30 delay: 30
- name: Install kubectl tab-completion - name: Install kubectl tab-completion

View File

@ -1,12 +1,12 @@
- name: Configure clusterctl with hypervisor details - name: Configure clusterctl with hypervisor details
ansible.builtin.blockinfile: ansible.builtin.blockinfile:
path: /opt/metacluster/manifests/clusterctl.yml path: /opt/metacluster/manifests/clusterctl.yaml
block: | block: |
## -- Controller settings -- ## ## -- Controller settings -- ##
VSPHERE_USERNAME: {{ vapp['hv.username'] }} VSPHERE_USERNAME: {{ vapp['hv.username'] }}
VSPHERE_PASSWORD: {{ vapp['hv.password'] }} VSPHERE_PASSWORD: {{ vapp['hv.password'] }}
## -- Required workload cluster default settings -- ## ## -- Required workload cluster default settings -- ##
VSPHERE_SERVER: "{{ vapp['hv.fqdn'] }} VSPHERE_SERVER: {{ vapp['hv.fqdn'] }}
VSPHERE_DATACENTER: {{ vcenter_info.datacenter }} VSPHERE_DATACENTER: {{ vcenter_info.datacenter }}
VSPHERE_DATASTORE: {{ vcenter_info.datastore }} VSPHERE_DATASTORE: {{ vcenter_info.datastore }}
VSPHERE_NETWORK: {{ vcenter_info.network }} VSPHERE_NETWORK: {{ vcenter_info.network }}

View File

@ -5,6 +5,7 @@
loop: loop:
- /opt/metacluster/helm-charts - /opt/metacluster/helm-charts
- /opt/metacluster/manifests/bootstrap-kubeadm/{{ components.clusterapi.manifest.version.base }} - /opt/metacluster/manifests/bootstrap-kubeadm/{{ components.clusterapi.manifest.version.base }}
- /opt/metacluster/manifests/cert-manager/{{ components.clusterapi.manifest.version.cert_manager }}
- /opt/metacluster/manifests/cluster-api/{{ components.clusterapi.manifest.version.base }} - /opt/metacluster/manifests/cluster-api/{{ components.clusterapi.manifest.version.base }}
- /opt/metacluster/manifests/control-plane-kubeadm/{{ components.clusterapi.manifest.version.base }} - /opt/metacluster/manifests/control-plane-kubeadm/{{ components.clusterapi.manifest.version.base }}
- /opt/metacluster/manifests/infrastructure-vsphere/{{ components.clusterapi.manifest.version.infrastructure_vsphere }} - /opt/metacluster/manifests/infrastructure-vsphere/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}
@ -45,29 +46,32 @@
- name: Download ClusterAPI manifests - name: Download ClusterAPI manifests
ansible.builtin.get_url: ansible.builtin.get_url:
url: https://github.com/kubernetes-sigs/{{ item.url }} url: "{{ item.url }}"
dest: /opt/metacluster/manifests/{{ item.dest }} dest: /opt/metacluster/manifests/{{ item.dest }}
register: clusterapi_manifests register: clusterapi_manifests
loop: loop:
# This list is based on `clusterctl config repositories` # This list is based on `clusterctl config repositories`
# Note: Each manifest also needs a metadata.yaml file stored in the respective folder # Note: Each manifest also needs a metadata.yaml file stored in the respective folder
- url: cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/bootstrap-components.yaml - url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/bootstrap-components.yaml
dest: bootstrap-kubeadm/{{ components.clusterapi.manifest.version.base }}/bootstrap-components.yaml dest: bootstrap-kubeadm/{{ components.clusterapi.manifest.version.base }}/bootstrap-components.yaml
- url: cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/core-components.yaml - url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/core-components.yaml
dest: cluster-api/{{ components.clusterapi.manifest.version.base }}/core-components.yaml dest: cluster-api/{{ components.clusterapi.manifest.version.base }}/core-components.yaml
- url: cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/control-plane-components.yaml - url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/control-plane-components.yaml
dest: control-plane-kubeadm/{{ components.clusterapi.manifest.version.base }}/control-plane-components.yaml dest: control-plane-kubeadm/{{ components.clusterapi.manifest.version.base }}/control-plane-components.yaml
- url: cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}/infrastructure-components.yaml - url: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}/infrastructure-components.yaml
dest: infrastructure-vsphere/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}/infrastructure-components.yaml dest: infrastructure-vsphere/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}/infrastructure-components.yaml
- url: cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}/metadata.yaml - url: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}/metadata.yaml
dest: infrastructure-vsphere/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}/metadata.yaml dest: infrastructure-vsphere/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}/metadata.yaml
# This downloads the same metadata.yaml file to three separate folders # This downloads the same metadata.yaml file to three separate folders
- url: cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/metadata.yaml - url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/metadata.yaml
dest: bootstrap-kubeadm/{{ components.clusterapi.manifest.version.base }}/metadata.yaml dest: bootstrap-kubeadm/{{ components.clusterapi.manifest.version.base }}/metadata.yaml
- url: cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/metadata.yaml - url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/metadata.yaml
dest: cluster-api/{{ components.clusterapi.manifest.version.base }}/metadata.yaml dest: cluster-api/{{ components.clusterapi.manifest.version.base }}/metadata.yaml
- url: cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/metadata.yaml - url: https://github.com/kubernetes-sigs/cluster-api/releases/download/{{ components.clusterapi.manifest.version.base }}/metadata.yaml
dest: control-plane-kubeadm/{{ components.clusterapi.manifest.version.base }}/metadata.yaml dest: control-plane-kubeadm/{{ components.clusterapi.manifest.version.base }}/metadata.yaml
# Additionally, cert-manager is a prerequisite
- url: https://github.com/cert-manager/cert-manager/releases/download/{{ components.clusterapi.manifest.version.cert_manager }}/cert-manager.yaml
dest: cert-manager/{{ components.clusterapi.manifest.version.cert_manager }}/cert-manager.yaml
loop_control: loop_control:
label: "{{ item.url | basename }}" label: "{{ item.url | basename }}"
@ -91,6 +95,7 @@
_template: _template:
version: version:
base: "{{ components.clusterapi.manifest.version.base }}" base: "{{ components.clusterapi.manifest.version.base }}"
cert_manager: "{{ components.clusterapi.manifest.version.cert_manager }}"
infrastructure_vsphere: "{{ components.clusterapi.manifest.version.infrastructure_vsphere }}" infrastructure_vsphere: "{{ components.clusterapi.manifest.version.infrastructure_vsphere }}"
- name: Parse helm charts for container images - name: Parse helm charts for container images

View File

@ -11,3 +11,6 @@ providers:
- name: "vsphere" - name: "vsphere"
url: "/opt/metacluster/manifests/infrastructure-vsphere/{{ _template.version.infrastructure_vsphere }}/infrastructure-components.yaml" url: "/opt/metacluster/manifests/infrastructure-vsphere/{{ _template.version.infrastructure_vsphere }}/infrastructure-components.yaml"
type: "InfrastructureProvider" type: "InfrastructureProvider"
cert-manager:
url: "/opt/metacluster/manifests/cert-manager/v{{ _template.version.cert_manager }}/cert-manager.yaml"