|
48 | 48 |
|
49 | 49 | - name: Deploy "magnum-cluster-api-proxy" |
50 | 50 | run_once: true |
| 51 | + vars: |
| 52 | + _magnum_cluster_api_proxy_pod_spec: |
| 53 | + containers: |
| 54 | + - name: magnum-cluster-api-proxy |
| 55 | + command: ["magnum-cluster-api-proxy"] |
| 56 | + image: "{{ atmosphere_images['magnum_cluster_api_proxy'] | vexxhost.kubernetes.docker_image('ref') }}" |
| 57 | + securityContext: |
| 58 | + privileged: true |
| 59 | + readOnlyRootFilesystem: true |
| 60 | + volumeMounts: |
| 61 | + - name: pod-tmp |
| 62 | + mountPath: /tmp |
| 63 | + - name: pod-run |
| 64 | + mountPath: /run |
| 65 | + - name: config |
| 66 | + mountPath: /etc/sudoers.d/magnum_capi_sudoers |
| 67 | + subPath: magnum_capi_sudoers |
| 68 | + readOnly: true |
| 69 | + - name: haproxy-state |
| 70 | + mountPath: /var/lib/magnum/.magnum-cluster-api-proxy |
| 71 | + - name: host-run-netns |
| 72 | + mountPath: /run/netns |
| 73 | + mountPropagation: Bidirectional |
| 74 | + nodeSelector: "{{ magnum_cluster_api_proxy_ovn_node_selector if atmosphere_network_backend == 'ovn' else magnum_cluster_api_proxy_ovs_node_selector }}" # noqa: yaml[line-length] |
| 75 | + securityContext: |
| 76 | + runAsUser: 42424 |
| 77 | + serviceAccountName: magnum-conductor |
| 78 | + volumes: |
| 79 | + - name: pod-tmp |
| 80 | + emptyDir: {} |
| 81 | + - name: pod-run |
| 82 | + emptyDir: {} |
| 83 | + - name: config |
| 84 | + configMap: |
| 85 | + name: magnum-cluster-api-proxy-config |
| 86 | + - name: haproxy-state |
| 87 | + emptyDir: {} |
| 88 | + - name: host-run-netns |
| 89 | + hostPath: |
| 90 | + path: /run/netns |
51 | 91 | kubernetes.core.k8s: |
52 | 92 | state: present |
53 | 93 | definition: |
|
80 | 120 | labels: |
81 | 121 | application: magnum |
82 | 122 | component: cluster-api-proxy |
83 | | - spec: |
84 | | - containers: |
85 | | - - name: magnum-cluster-api-proxy |
86 | | - command: ["magnum-cluster-api-proxy"] |
87 | | - image: "{{ atmosphere_images['magnum_cluster_api_proxy'] | vexxhost.kubernetes.docker_image('ref') }}" |
88 | | - securityContext: |
89 | | - privileged: true |
90 | | - readOnlyRootFilesystem: true |
91 | | - volumeMounts: |
92 | | - - name: pod-tmp |
93 | | - mountPath: /tmp |
94 | | - - name: pod-run |
95 | | - mountPath: /run |
96 | | - - name: config |
97 | | - mountPath: /etc/sudoers.d/magnum_capi_sudoers |
98 | | - subPath: magnum_capi_sudoers |
99 | | - readOnly: true |
100 | | - - name: haproxy-state |
101 | | - mountPath: /var/lib/magnum/.magnum-cluster-api-proxy |
102 | | - - name: host-run-netns |
103 | | - mountPath: /run/netns |
104 | | - mountPropagation: Bidirectional |
105 | | - nodeSelector: "{{ magnum_cluster_api_proxy_ovn_node_selector if atmosphere_network_backend == 'ovn' else magnum_cluster_api_proxy_ovs_node_selector }}" # noqa: yaml[line-length] |
106 | | - securityContext: |
107 | | - runAsUser: 42424 |
108 | | - serviceAccountName: magnum-conductor |
109 | | - volumes: |
110 | | - - name: pod-tmp |
111 | | - emptyDir: {} |
112 | | - - name: pod-run |
113 | | - emptyDir: {} |
114 | | - - name: config |
115 | | - configMap: |
116 | | - name: magnum-cluster-api-proxy-config |
117 | | - - name: haproxy-state |
118 | | - emptyDir: {} |
119 | | - - name: host-run-netns |
120 | | - hostPath: |
121 | | - path: /run/netns |
| 123 | + spec: "{{ _magnum_cluster_api_proxy_pod_spec | combine({'priorityClassName': magnum_cluster_api_proxy_priority_class_name} if magnum_cluster_api_proxy_priority_class_name else {}) }}" # noqa: yaml[line-length] |
122 | 124 |
|
123 | 125 | - name: Create Ingress |
124 | 126 | ansible.builtin.include_role: |
|
132 | 134 |
|
133 | 135 | - name: Deploy magnum registry |
134 | 136 | run_once: true |
| 137 | + vars: |
| 138 | + _magnum_registry_pod_spec: |
| 139 | + containers: |
| 140 | + - name: registry |
| 141 | + image: "{{ atmosphere_images['magnum_registry'] | vexxhost.kubernetes.docker_image('ref') }}" |
| 142 | + env: |
| 143 | + - name: REGISTRY_STORAGE_MAINTENANCE_READONLY |
| 144 | + value: '{"enabled": true}' |
| 145 | + ports: |
| 146 | + - name: registry |
| 147 | + containerPort: 5000 |
| 148 | + protocol: TCP |
| 149 | + livenessProbe: |
| 150 | + httpGet: |
| 151 | + path: / |
| 152 | + port: 5000 |
| 153 | + scheme: HTTP |
| 154 | + readinessProbe: |
| 155 | + httpGet: |
| 156 | + path: / |
| 157 | + port: 5000 |
| 158 | + scheme: HTTP |
| 159 | + nodeSelector: |
| 160 | + openstack-control-plane: enabled |
135 | 161 | kubernetes.core.k8s: |
136 | 162 | state: present |
137 | 163 | definition: |
|
154 | 180 | labels: |
155 | 181 | application: magnum |
156 | 182 | component: registry |
157 | | - spec: |
158 | | - containers: |
159 | | - - name: registry |
160 | | - image: "{{ atmosphere_images['magnum_registry'] | vexxhost.kubernetes.docker_image('ref') }}" |
161 | | - env: |
162 | | - - name: REGISTRY_STORAGE_MAINTENANCE_READONLY |
163 | | - value: '{"enabled": true}' |
164 | | - ports: |
165 | | - - name: registry |
166 | | - containerPort: 5000 |
167 | | - protocol: TCP |
168 | | - livenessProbe: |
169 | | - httpGet: |
170 | | - path: / |
171 | | - port: 5000 |
172 | | - scheme: HTTP |
173 | | - readinessProbe: |
174 | | - httpGet: |
175 | | - path: / |
176 | | - port: 5000 |
177 | | - scheme: HTTP |
178 | | - nodeSelector: |
179 | | - openstack-control-plane: enabled |
| 183 | + spec: "{{ _magnum_registry_pod_spec | combine({'priorityClassName': magnum_registry_priority_class_name} if magnum_registry_priority_class_name else {}) }}" # noqa: yaml[line-length] |
180 | 184 |
|
181 | 185 | - apiVersion: v1 |
182 | 186 | kind: Service |
|
0 commit comments