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
This commit is contained in:
Matt McEuen 2018-09-14 15:51:27 -05:00
parent 582c4d8b20
commit 9c2686bea7
8 changed files with 15 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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