Fix variable names;Add clusterctl config template
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
806bf24fc0
commit
9199809da5
@ -4,10 +4,10 @@
|
||||
state: directory
|
||||
loop:
|
||||
- /opt/metacluster/helm-charts
|
||||
- /opt/metacluster/manifests/bootstrap-kubeadm/{{ components.cluster-api.manifest.version.base }}
|
||||
- /opt/metacluster/manifests/cluster-api/{{ components.cluster-api.manifest.version.base }}
|
||||
- /opt/metacluster/manifests/control-plane-kubeadm/{{ components.cluster-api.manifest.version.base }}
|
||||
- /opt/metacluster/manifests/infrastructure-vsphere/{{ components.cluster-api.manifest.version.infrastructure-vsphere }}
|
||||
- /opt/metacluster/manifests/bootstrap-kubeadm/{{ 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/infrastructure-vsphere/{{ components.clusterapi.manifest.version.infrastructure_vsphere }}
|
||||
- /opt/metacluster/container-images
|
||||
|
||||
- name: Add helm repositories
|
||||
@ -86,6 +86,20 @@
|
||||
# ansible.builtin.set_fact:
|
||||
# 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
|
||||
ansible.builtin.shell:
|
||||
cmd: "{{ item.value.helm.parse_logic }}"
|
||||
|
26
ansible/roles/metacluster/templates/clusterctl.j2
Normal file
26
ansible/roles/metacluster/templates/clusterctl.j2
Normal 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"
|
@ -76,11 +76,11 @@ components:
|
||||
# chart_values: !unsafe |
|
||||
# installCRDs: true
|
||||
|
||||
cluster-api:
|
||||
clusterapi:
|
||||
manifest:
|
||||
version:
|
||||
base: v1.2.4
|
||||
infrastructure-vsphere: v1.3.5
|
||||
infrastructure_vsphere: v1.3.5
|
||||
|
||||
gitea:
|
||||
helm:
|
||||
|
Loading…
Reference in New Issue
Block a user