build: Split nodepool manifest in separate documents
This commit is contained in:
parent
b21b8b5376
commit
b2ae56e54b
@ -140,7 +140,7 @@
|
|||||||
dest: "{{ capi_clustermanifest.path }}/new-cluster.yaml"
|
dest: "{{ capi_clustermanifest.path }}/new-cluster.yaml"
|
||||||
content: "{{ clusterctl_newcluster.stdout }}"
|
content: "{{ clusterctl_newcluster.stdout }}"
|
||||||
|
|
||||||
- name: Split manifest into separate files
|
- name: Split workload cluster manifest into separate files
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: >-
|
cmd: >-
|
||||||
kubectl slice \
|
kubectl slice \
|
||||||
@ -161,9 +161,16 @@
|
|||||||
|
|
||||||
- name: Store nodepool manifest
|
- name: Store nodepool manifest
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "{{ capi_clustermanifest.path }}/manifests/nodepool-worker-storage.yaml"
|
dest: "{{ capi_clustermanifest.path }}/nodepool-worker-storage.yaml"
|
||||||
content: "{{ lookup('kubernetes.core.kustomize', dir=capi_clustermanifest.path) }}"
|
content: "{{ lookup('kubernetes.core.kustomize', dir=capi_clustermanifest.path) }}"
|
||||||
|
|
||||||
|
- name: Split nodepool manifest into separate files
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: >-
|
||||||
|
kubectl slice \
|
||||||
|
-f {{ capi_clustermanifest.path }}/nodepool-worker-storage.yaml \
|
||||||
|
-o {{ capi_clustermanifest.path }}/manifests
|
||||||
|
|
||||||
- name: Create in-cluster IpPool
|
- name: Create in-cluster IpPool
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: ippool.j2
|
src: ippool.j2
|
||||||
@ -201,19 +208,6 @@
|
|||||||
GIT_COMMITTER_NAME: administrator
|
GIT_COMMITTER_NAME: administrator
|
||||||
GIT_COMMITTER_EMAIL: administrator@{{ vapp['metacluster.fqdn'] }}
|
GIT_COMMITTER_EMAIL: administrator@{{ vapp['metacluster.fqdn'] }}
|
||||||
|
|
||||||
# - name: Initialize/Push git repository
|
|
||||||
# ansible.builtin.shell:
|
|
||||||
# cmd: |
|
|
||||||
# git init
|
|
||||||
# git config --global user.email "administrator@{{ vapp['metacluster.fqdn'] }}"
|
|
||||||
# git config --global user.name "administrator"
|
|
||||||
# git checkout -b main
|
|
||||||
# git add ./manifests
|
|
||||||
# git commit -m "Upload manifests"
|
|
||||||
# git remote add origin https://git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.ClusterAPI.git
|
|
||||||
# git push https://administrator:{{ vapp['metacluster.password'] | urlencode }}@git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.ClusterAPI.git --all
|
|
||||||
# chdir: "{{ capi_clustermanifest.path }}"
|
|
||||||
|
|
||||||
# - name: Cleanup tempfolder
|
# - name: Cleanup tempfolder
|
||||||
# ansible.builtin.file:
|
# ansible.builtin.file:
|
||||||
# path: "{{ capi_clustermanifest.path }}"
|
# path: "{{ capi_clustermanifest.path }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user