Add missing kustomize patch;Switch to query filter
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
2b56677e9a
commit
db090ac564
@ -20,7 +20,7 @@
|
||||
chdir: /opt/metacluster/helm-charts/{{ item.key }}
|
||||
register: chartimages_metacluster
|
||||
when: item.value.helm is defined
|
||||
loop: "{{ lookup('ansible.builtin.dict', components) }}"
|
||||
loop: "{{ query('ansible.builtin.dict', components) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
cmd: "{{ item.value.parse_logic }}"
|
||||
chdir: /opt/workloadcluster/helm-charts/{{ item.value.namespace }}/{{ item.key }}
|
||||
register: chartimages_workloadcluster
|
||||
loop: "{{ lookup('ansible.builtin.dict', downstream.helm_charts) }}"
|
||||
loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
chdir: /opt/metacluster/helm-charts
|
||||
when: item.value.helm is defined
|
||||
register: helmcharts_metacluster
|
||||
loop: "{{ lookup('ansible.builtin.dict', components) }}"
|
||||
loop: "{{ query('ansible.builtin.dict', components) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
retries: 5
|
||||
@ -23,7 +23,7 @@
|
||||
cmd: helm fetch {{ item.value.chart }} --untardir ./{{ item.value.namespace }} --untar --version {{ item.value.version }}
|
||||
chdir: /opt/workloadcluster/helm-charts
|
||||
register: helmcharts_workloadcluster
|
||||
loop: "{{ lookup('ansible.builtin.dict', downstream.helm_charts) }}"
|
||||
loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
retries: 5
|
||||
|
@ -4,7 +4,7 @@
|
||||
ansible.builtin.set_fact:
|
||||
metacluster_chartvalues: "{{ metacluster_chartvalues | default({}) | combine({ item.key: { 'chart_values': (item.value.helm.chart_values | from_yaml) } }) }}"
|
||||
when: item.value.helm.chart_values is defined
|
||||
loop: "{{ lookup('ansible.builtin.dict', components) }}"
|
||||
loop: "{{ query('ansible.builtin.dict', components) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
ansible.builtin.set_fact:
|
||||
workloadcluster_chartvalues: "{{ workloadcluster_chartvalues | default({}) | combine({ item.key: { 'chart_values': (item.value.chart_values | from_yaml) } }) }}"
|
||||
when: item.value.chart_values is defined
|
||||
loop: "{{ lookup('ansible.builtin.dict', downstream.helm_charts) }}"
|
||||
loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
@ -104,6 +104,6 @@
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: 0600
|
||||
# loop: "{{ lookup('ansible.builtin.dict', components) | map(attribute='value.manifests') | list | select('defined') | flatten }}"
|
||||
# loop: "{{ query('ansible.builtin.dict', components) | map(attribute='value.manifests') | list | select('defined') | flatten }}"
|
||||
# loop_control:
|
||||
# label: "{{ item.type ~ '/' ~ item.name }}"
|
||||
|
@ -17,7 +17,7 @@
|
||||
ansible.builtin.file:
|
||||
path: /opt/workloadcluster/git-repositories/gitops/values/{{ item.key }}
|
||||
state: directory
|
||||
loop: "{{ lookup('ansible.builtin.dict', downstream_components) }}"
|
||||
loop: "{{ query('ansible.builtin.dict', downstream_components) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
ansible.builtin.copy:
|
||||
dest: /opt/workloadcluster/git-repositories/gitops/values/{{ item.key }}/values.yaml
|
||||
content: "{{ item.value.chart_values | default('# Empty') }}"
|
||||
loop: "{{ lookup('ansible.builtin.dict', downstream_components) }}"
|
||||
loop: "{{ query('ansible.builtin.dict', downstream_components) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
|
@ -219,3 +219,12 @@ patchesJson6902:
|
||||
- op: replace
|
||||
path: /spec/machineTemplate/infrastructureRef/name
|
||||
value: ${CLUSTER_NAME}-master
|
||||
- target:
|
||||
group: cluster.x-k8s.io
|
||||
version: v1beta1
|
||||
kind: Cluster
|
||||
name: \${CLUSTER_NAME}
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/controlPlaneRef/name
|
||||
value: ${CLUSTER_NAME}-master
|
||||
|
@ -22,6 +22,6 @@
|
||||
spec:
|
||||
numberOfReplicas: {{ (lookup('kubernetes.core.k8s', kind='node', kubeconfig=(kubeconfig.path)) | length | int) - 1 }}
|
||||
kubeconfig: "{{ kubeconfig.path }}"
|
||||
loop: "{{ lookup('kubernetes.core.k8s', api_version='longhorn.io/v1beta2', kind='volume', namespace='longhorn-system', kubeconfig=(kubeconfig.path)) }}"
|
||||
loop: "{{ query('kubernetes.core.k8s', api_version='longhorn.io/v1beta2', kind='volume', namespace='longhorn-system', kubeconfig=(kubeconfig.path)) }}"
|
||||
loop_control:
|
||||
label: "{{ item.metadata.name }}"
|
||||
|
@ -11,7 +11,7 @@
|
||||
spec:
|
||||
numberOfReplicas: {{ lookup('kubernetes.core.k8s', kind='node', kubeconfig=(kubeconfig.path)) | length | int }}
|
||||
kubeconfig: "{{ kubeconfig.path }}"
|
||||
loop: "{{ lookup('kubernetes.core.k8s', api_version='longhorn.io/v1beta2', kind='volume', namespace='longhorn-system', kubeconfig=(kubeconfig.path)) }}"
|
||||
loop: "{{ query('kubernetes.core.k8s', api_version='longhorn.io/v1beta2', kind='volume', namespace='longhorn-system', kubeconfig=(kubeconfig.path)) }}"
|
||||
loop_control:
|
||||
label: "{{ item.metadata.name }}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user