Fix variable names;Add clusterctl config template
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2022-11-06 14:21:35 +01:00
parent 806bf24fc0
commit 9199809da5
3 changed files with 46 additions and 6 deletions

View File

@ -4,10 +4,10 @@
state: directory state: directory
loop: loop:
- /opt/metacluster/helm-charts - /opt/metacluster/helm-charts
- /opt/metacluster/manifests/bootstrap-kubeadm/{{ components.cluster-api.manifest.version.base }} - /opt/metacluster/manifests/bootstrap-kubeadm/{{ components.clusterapi.manifest.version.base }}
- /opt/metacluster/manifests/cluster-api/{{ components.cluster-api.manifest.version.base }} - /opt/metacluster/manifests/cluster-api/{{ components.clusterapi.manifest.version.base }}
- /opt/metacluster/manifests/control-plane-kubeadm/{{ components.cluster-api.manifest.version.base }} - /opt/metacluster/manifests/control-plane-kubeadm/{{ components.clusterapi.manifest.version.base }}
- /opt/metacluster/manifests/infrastructure-vsphere/{{ components.cluster-api.manifest.version.infrastructure-vsphere }} - /opt/metacluster/manifests/infrastructure-vsphere/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}
- /opt/metacluster/container-images - /opt/metacluster/container-images
- name: Add helm repositories - name: Add helm repositories
@ -86,6 +86,20 @@
# ansible.builtin.set_fact: # ansible.builtin.set_fact:
# clusterapi_containerimages: "{{ parsedmanifests | json_query('results[*].stdout') }}" # clusterapi_containerimages: "{{ parsedmanifests | json_query('results[*].stdout') }}"
# - name: Configure clusterctl
# ansible.builtin.template:
# src: clusterctl.j2
# dest: /opt/metacluster/manifests/clusterctl.yaml
# vars:
# _template:
# hv:
# username:
# password:
# fqdn:
# version:
# base:
# infrastructure_vsphere:
- name: Parse helm charts for container images - name: Parse helm charts for container images
ansible.builtin.shell: ansible.builtin.shell:
cmd: "{{ item.value.helm.parse_logic }}" cmd: "{{ item.value.helm.parse_logic }}"

View File

@ -0,0 +1,26 @@
providers:
- name: "kubeadm"
url: "/opt/metacluster/manifests/bootstrap-kubeadm/{{ _template.version.base }}/bootstrap-components.yaml"
type: "BootstrapProvider"
- name: "cluster-api"
url: "/opt/metacluster/manifests/cluster-api/{{ _template.version.base }}/core-components.yaml"
type: "CoreProvider"
- name: "kubeadm"
url: "/opt/metacluster/manifests/control-plane-kubeadm/{{ _template.version.base }}/control-plane-components.yaml"
type: "ControlPlaneProvider"
- name: "vsphere"
url: "/opt/metacluster/manifests/infrastructure-vsphere/{{ _template.version.infrastructure-vsphere }}/infrastructure-components.yaml"
type: "InfrastructureProvider"
## -- Controller settings -- ##
VSPHERE_USERNAME: "{{ _template.hv.username }}"
VSPHERE_PASSWORD: "{{ _template.hv.password }}"
## -- Required workload cluster default settings -- ##
VSPHERE_SERVER: "{{ _template.hv.fqdn }}"
VSPHERE_DATACENTER: "{{ _template.hv.datacenter }}"
VSPHERE_DATASTORE: "{{ _template.hv.datastore }}"
VSPHERE_NETWORK: "{{ _template.hv.network }}"
#VSPHERE_RESOURCE_POOL: ""
#VSPHERE_FOLDER: ""
#VSPHERE_TEMPLATE: "centos-7-kube-v1.18.2"
#VSPHERE_SSH_AUTHORIZED_KEY: "output of cat /root/.ssh/id_rsa.pub"

View File

@ -76,11 +76,11 @@ components:
# chart_values: !unsafe | # chart_values: !unsafe |
# installCRDs: true # installCRDs: true
cluster-api: clusterapi:
manifest: manifest:
version: version:
base: v1.2.4 base: v1.2.4
infrastructure-vsphere: v1.3.5 infrastructure_vsphere: v1.3.5
gitea: gitea:
helm: helm: