Housekeeping;Add separate storage nodepool
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-06 13:29:29 +02:00
parent 5c18869d60
commit c385baf630
6 changed files with 138 additions and 61 deletions

View File

@ -39,7 +39,7 @@
mode: 0600
vars:
_template:
name: argocd-gitrepo-mc-gitopsconfig
name: gitrepo-mc-gitopsconfig
namespace: argo-cd
url: https://git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.Config.git
notify:

View File

@ -52,13 +52,12 @@
version: "{{ components.clusterapi.workload.version.k8s }}"
vip: "{{ vapp['workloadcluster.vip'] }}"
- name: Generate kustomization template
- name: Generate cluster-template kustomization manifest
ansible.builtin.template:
src: kustomization.cluster-template.j2
dest: /opt/metacluster/cluster-api/infrastructure-vsphere/{{ components.clusterapi.management.version.infrastructure_vsphere }}/kustomization.yaml
vars:
_template:
additionaldisk: "{{ vapp['workloadcluster.additionaldisk'] }}"
network:
fqdn: "{{ vapp['metacluster.fqdn'] }}"
dnsserver: "{{ vapp['guestinfo.dnsserver'] }}"
@ -105,7 +104,8 @@
clustersize: >-
{{ {
'controlplane': vapp['deployment.type'] | regex_findall('^cp(\d)+') | first,
'workers': vapp['deployment.type'] | regex_findall('w(\d)+$') | first
'worker': vapp['deployment.type'] | regex_findall('w(\d)+$') | first,
'workerstorage': vapp['deployment.type'] | regex_findall('ws(\d)+') | first
} }}
- name: Generate workload cluster manifest
@ -114,7 +114,7 @@
clusterctl generate cluster \
{{ vapp['workloadcluster.name'] | lower }} \
--control-plane-machine-count {{ clustersize.controlplane }} \
--worker-machine-count {{ clustersize.workers }} \
--worker-machine-count {{ clustersize.worker }} \
--from ./custom-cluster-template.yaml \
--config ./clusterctl.yaml \
--kubeconfig {{ kubeconfig.path }}
@ -138,6 +138,23 @@
-f {{ capi_clustermanifest.path }}/new-cluster.yaml \
-o {{ capi_clustermanifest.path }}/manifests
- name: Generate nodepool kustomization manifest
ansible.builtin.template:
src: kustomization.nodepool.j2
dest: "{{ capi_clustermanifest.path }}/kustomization.yaml"
vars:
_template:
cluster:
name: "{{ vapp['workloadcluster.name'] }}"
nodepool:
size: "{{ clustersize.workerstorage }}"
additionaldisk: "{{ vapp['workloadcluster.additionaldisk'] }}"
- name: Store nodepool manifest
ansible.builtin.copy:
dest: "{{ capi_clustermanifest.path }}/manifests/nodepool-worker-storage.yaml"
content: "{{ lookup('kubernetes.core.kustomize', dir=capi_clustermanifest.path) }}"
- name: Create in-cluster IpPool
ansible.builtin.template:
src: ippool.j2
@ -181,7 +198,7 @@
mode: 0600
vars:
_template:
name: argocd-gitrepo-mc-gitopsclusterapi
name: gitrepo-mc-gitopsclusterapi
namespace: argo-cd
url: https://git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.ClusterAPI.git
notify:

View File

@ -75,7 +75,7 @@
mode: 0600
vars:
_template:
name: argocd-gitrepo-wl-gitopsconfig
name: gitrepo-wl-gitopsconfig
namespace: argo-cd
url: https://git.{{ vapp['metacluster.fqdn'] }}/wl/GitOps.Config.git
notify: