-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(kubernetes platform): Implement improvements to the Pod recreatio…
…n on Helm release upgrades (#5525) * Add podRollmeAnnotation option Signed-off-by: MOZGIII <[email protected]> * Correct the comments at labels Signed-off-by: MOZGIII <[email protected]> * Generate the Kubernetes YAMLs Signed-off-by: MOZGIII <[email protected]> * Extract the configTemplateChecksumAnnotation to shared templates Signed-off-by: MOZGIII <[email protected]> * Update the generated Kubernetes YAMLs Signed-off-by: MOZGIII <[email protected]> * Correct the global default assignment logic at libvector.rollmeAnnotation Signed-off-by: MOZGIII <[email protected]> * Add the values checksum annotation Signed-off-by: MOZGIII <[email protected]> * Update the generated Kubernetes YAMLs Signed-off-by: MOZGIII <[email protected]> * Aggregate all of the reroll related annotations into libvector.rerollAnnotations Signed-off-by: MOZGIII <[email protected]> * Update the generated Kubernetes YAMLs Signed-off-by: MOZGIII <[email protected]> * Evaluate the config for sha256sum calculation Signed-off-by: MOZGIII <[email protected]> * Disable podValuesChecksumAnnotation by default Signed-off-by: MOZGIII <[email protected]> * Update the generated Kubernetes YAMLs Signed-off-by: MOZGIII <[email protected]>
- Loading branch information
Showing
10 changed files
with
96 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{/* | ||
Rollme annotation. | ||
*/}} | ||
{{- define "libvector.rollmeAnnotation" -}} | ||
{{- $global := default (dict) .Values.global }} | ||
{{- $global := default (dict) $global.vector }} | ||
{{- $enabled := .Values.podRollmeAnnotation }} | ||
{{- if hasKey $global "podRollmeAnnotation" }} | ||
{{- $enabled = $global.podRollmeAnnotation }} | ||
{{- end }} | ||
{{- if $enabled }} | ||
rollme: {{ randAlphaNum 5 | quote }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
`ConfigMap` template checksum annotation. | ||
*/}} | ||
{{- define "libvector.configTemplateChecksumAnnotation" -}} | ||
{{- if not .Values.externalConfigMap }} | ||
checksum/config: {{ tpl (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Values checksum annotation. | ||
*/}} | ||
{{- define "libvector.valuesChecksumAnnotation" -}} | ||
{{- $global := default (dict) .Values.global }} | ||
{{- $global := default (dict) $global.vector }} | ||
{{- $enabled := .Values.podValuesChecksumAnnotation }} | ||
{{- if hasKey $global "podValuesChecksumAnnotation" }} | ||
{{- $enabled = $global.podValuesChecksumAnnotation }} | ||
{{- end }} | ||
{{- if $enabled }} | ||
checksum/values: {{ toJson .Values | sha256sum }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
All reroll annotations. | ||
*/}} | ||
{{- define "libvector.rerollAnnotations" -}} | ||
{{- include "libvector.configTemplateChecksumAnnotation" . }} | ||
{{- include "libvector.valuesChecksumAnnotation" . }} | ||
{{- include "libvector.rollmeAnnotation" . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters