Add release uuid to pods and rc objects (prom)

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: I8d0ffac306258f940c63799e86e7e26b5c2c5add
This commit is contained in:
Matt McEuen 2018-09-14 15:53:34 -05:00
parent 20f27f6281
commit eae60aba15
17 changed files with 30 additions and 0 deletions

View File

@ -23,6 +23,8 @@ apiVersion: "extensions/v1beta1"
kind: DaemonSet
metadata:
name: {{ .Values.service.name }}-anchor
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
{{ tuple $envAll "kubernetes-apiserver-anchor" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
template:

View File

@ -22,6 +22,8 @@ metadata:
labels:
{{ .Values.service.name }}-service: enabled
{{ tuple $envAll "kubernetes" "apiserver" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
hostNetwork: true
containers:

View File

@ -23,6 +23,8 @@ apiVersion: "extensions/v1beta1"
kind: DaemonSet
metadata:
name: {{ .Values.service.name }}-anchor
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
{{ tuple $envAll "kubernetes-controller-manager-anchor" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
template:

View File

@ -22,6 +22,8 @@ metadata:
labels:
{{ .Values.service.name }}-service: enabled
{{ tuple $envAll "kubernetes" "controller-manager" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
hostNetwork: true
containers:

View File

@ -23,6 +23,8 @@ metadata:
labels:
{{ .Values.service.name }}: enabled
kubernetes.io/name: "CoreDNS"
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
replicas: {{ .Values.pod.replicas.coredns }}
strategy:

View File

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

View File

@ -26,6 +26,8 @@ apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: {{ .Values.service.name }}-anchor
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
{{ tuple $envAll "anchor" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
template:

View File

@ -28,6 +28,8 @@ metadata:
labels:
{{ .Values.service.name }}-service: enabled
{{ tuple $envAll $applicationName "etcd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
hostNetwork: true
containers:

View File

@ -26,6 +26,7 @@ metadata:
annotations:
"helm.sh/hook": "test-success"
scheduler.alpha.kubernetes.io/critical-pod: ''
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
labels:
{{ tuple $envAll $applicationName "etcd-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
spec:

View File

@ -20,6 +20,8 @@ apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: haproxy-anchor
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
{{ tuple $envAll "haproxy_anchor" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
template:

View File

@ -23,6 +23,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ tuple $envAll "haproxy" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
hostNetwork: true
containers:

View File

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

View File

@ -21,6 +21,8 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: promenade-api
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
replicas: {{ .Values.pod.replicas.api }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}

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 "promenade" "api-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
spec:

View File

@ -22,6 +22,8 @@ apiVersion: "extensions/v1beta1"
kind: DaemonSet
metadata:
name: kubernetes-proxy
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
{{ tuple $envAll "proxy" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
template:

View File

@ -24,6 +24,8 @@ metadata:
labels:
{{ .Values.service.name }}-service: enabled
{{ tuple $envAll "kubernetes" "scheduler" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
hostNetwork: true
containers:

View File

@ -20,6 +20,8 @@ apiVersion: "extensions/v1beta1"
kind: DaemonSet
metadata:
name: kubernetes-scheduler-anchor
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec:
{{ tuple $envAll "scheduler" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
template: