From 5e40994cd579e9ceb0e1a1f8f5cc2681e5426b93 Mon Sep 17 00:00:00 2001 From: khanhtc1202 Date: Mon, 4 Jul 2022 15:53:26 +0700 Subject: [PATCH] Make the piped agent pod force auto restart controllable via helm values --- manifests/piped/templates/deployment.yaml | 2 ++ manifests/piped/values.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/manifests/piped/templates/deployment.yaml b/manifests/piped/templates/deployment.yaml index d1c880d719..1f3fe1beae 100644 --- a/manifests/piped/templates/deployment.yaml +++ b/manifests/piped/templates/deployment.yaml @@ -17,7 +17,9 @@ spec: {{- include "piped.selectorLabels" . | nindent 8 }} annotations: sidecar.istio.io/inject: "false" + {{- if .Values.args.forceRestart }} rollme: {{ randAlphaNum 5 | quote }} + {{- end }} spec: serviceAccountName: {{ include "piped.serviceAccountName" . }} containers: diff --git a/manifests/piped/values.yaml b/manifests/piped/values.yaml index dc020083c2..77eddb1207 100644 --- a/manifests/piped/values.yaml +++ b/manifests/piped/values.yaml @@ -10,6 +10,8 @@ args: # Specifies whether it adds logged-in user to /etc/passwd at runtime. # This is typically for applications running as a random user ID, such as OpenShift less than 4.2. addLoginUserToPasswd: false + # Ensure that the pod will be restarted by random an annotation value to key rollme. + forceRestart: true launcher: enabled: false