Browse Source

Add release uuid to pods and rc objects (maas)

This PS adds the ability to attach a release uuid to pods and rc
objects as desired.  This can be used, for example, to force an
artificial manifest change in CICD scenarios, for upgradability
testing purposes.

Change-Id: I994f9eb9cd75947ee36276a542fa23cc547065e0
Matt McEuen 7 months ago
parent
commit
9c2686bea7

+ 2
- 0
charts/maas/templates/job-bootstrap-admin-user.yaml View File

@@ -23,6 +23,8 @@ apiVersion: batch/v1
23 23
 kind: Job
24 24
 metadata:
25 25
   name: maas-bootstrap-admin-user
26
+  annotations:
27
+    {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
26 28
 spec:
27 29
   template:
28 30
     metadata:

+ 2
- 0
charts/maas/templates/job-db-init.yaml View File

@@ -23,6 +23,8 @@ apiVersion: batch/v1
23 23
 kind: Job
24 24
 metadata:
25 25
   name: maas-db-init
26
+  annotations:
27
+    {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
26 28
 spec:
27 29
   template:
28 30
     metadata:

+ 2
- 0
charts/maas/templates/job-db-sync.yaml View File

@@ -23,6 +23,8 @@ apiVersion: batch/v1
23 23
 kind: Job
24 24
 metadata:
25 25
   name: maas-db-sync
26
+  annotations:
27
+    {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
26 28
 spec:
27 29
   template:
28 30
     metadata:

+ 2
- 0
charts/maas/templates/job-export-api-key.yaml View File

@@ -25,6 +25,8 @@ kind: RoleBinding
25 25
 metadata:
26 26
   name: {{ $envAll.Release.Name }}-{{ $serviceAccountName }}-job
27 27
   namespace: {{ $envAll.Release.Namespace }}
28
+  annotations:
29
+    {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
28 30
 roleRef:
29 31
   apiGroup: rbac.authorization.k8s.io
30 32
   kind: Role

+ 2
- 0
charts/maas/templates/job-import.yaml View File

@@ -23,6 +23,8 @@ apiVersion: batch/v1
23 23
 kind: Job
24 24
 metadata:
25 25
   name: maas-import-resources
26
+  annotations:
27
+    {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
26 28
 spec:
27 29
   template:
28 30
     metadata:

+ 2
- 0
charts/maas/templates/statefulset-rack.yaml View File

@@ -30,6 +30,8 @@ apiVersion: apps/v1beta1
30 30
 kind: StatefulSet
31 31
 metadata:
32 32
   name: maas-rack
33
+  annotations:
34
+    {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
33 35
 spec:
34 36
   serviceName: maas-rack
35 37
   replicas: {{ .Values.pod.replicas.rack }}

+ 2
- 0
charts/maas/templates/statefulset-region.yaml View File

@@ -24,6 +24,8 @@ apiVersion: apps/v1beta1
24 24
 kind: StatefulSet
25 25
 metadata:
26 26
   name: maas-region
27
+  annotations:
28
+    {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
27 29
 spec:
28 30
   serviceName: maas-region-ui
29 31
   replicas: {{ .Values.pod.replicas.region }}

+ 1
- 0
charts/maas/templates/tests/test-maas-init.yaml View File

@@ -25,6 +25,7 @@ metadata:
25 25
   name: "{{ .Release.Name }}-api-test"
26 26
   annotations:
27 27
     "helm.sh/hook": "test-success"
28
+    {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
28 29
   labels:
29 30
 {{ tuple $envAll "maas" "init-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
30 31
 spec:

Loading…
Cancel
Save