From 91ad82947c65cbfa2216e42a9681383bc36a48a8 Mon Sep 17 00:00:00 2001 From: AviorSchreiber <80765239+AviorSchreiber@users.noreply.github.com> Date: Fri, 3 Jan 2025 16:07:27 +0200 Subject: [PATCH] feat(argo-rollouts): Add lifecyle and terminationGracePeriodSeconds settings for controller (#3100) * feat(argo-rollouts): Add lifecyle and terminationGracePeriodSeconds settings for controller Signed-off-by: AviorSchreiber <80765239+AviorSchreiber@users.noreply.github.com> * Update charts/argo-rollouts/templates/controller/deployment.yaml Co-authored-by: Aikawa Signed-off-by: AviorSchreiber <80765239+AviorSchreiber@users.noreply.github.com> * Update charts/argo-rollouts/templates/controller/deployment.yaml Co-authored-by: JM (Jason Meridth) Signed-off-by: AviorSchreiber <80765239+AviorSchreiber@users.noreply.github.com> --------- Signed-off-by: AviorSchreiber <80765239+AviorSchreiber@users.noreply.github.com> Co-authored-by: Aikawa Co-authored-by: JM (Jason Meridth) --- charts/argo-rollouts/Chart.yaml | 8 +++++--- charts/argo-rollouts/README.md | 2 ++ charts/argo-rollouts/templates/controller/deployment.yaml | 6 ++++++ charts/argo-rollouts/values.yaml | 4 ++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/charts/argo-rollouts/Chart.yaml b/charts/argo-rollouts/Chart.yaml index 33d77781b..757a63296 100644 --- a/charts/argo-rollouts/Chart.yaml +++ b/charts/argo-rollouts/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v1.7.2 description: A Helm chart for Argo Rollouts name: argo-rollouts -version: 2.38.1 +version: 2.38.2 home: https://github.com/argoproj/argo-helm icon: https://argoproj.github.io/argo-rollouts/assets/logo.png keywords: @@ -18,5 +18,7 @@ annotations: fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252 url: https://argoproj.github.io/argo-helm/pgp_keys.asc artifacthub.io/changes: | - - kind: fixed - description: Correct outdated URL for ingress + - kind: added + description: Add lifecycle settings for controller + - kind: added + description: Add terminationGracePeriodSeconds for controller diff --git a/charts/argo-rollouts/README.md b/charts/argo-rollouts/README.md index 927a2098c..aa09ca142 100644 --- a/charts/argo-rollouts/README.md +++ b/charts/argo-rollouts/README.md @@ -98,6 +98,7 @@ For full list of changes please check ArtifactHub [changelog]. | controller.image.repository | string | `"argoproj/argo-rollouts"` | Repository to use | | controller.image.tag | string | `""` | Overrides the image tag (default is the chart appVersion) | | controller.initContainers | list | `[]` | Init containers to add to the rollouts controller pod | +| controller.lifecycle | object | `{}` | Specify lifecycle hooks for the controller | | controller.livenessProbe | object | See [values.yaml] | Configure liveness [probe] for the controller | | controller.logging.format | string | `"text"` | Set the logging format (one of: `text`, `json`) | | controller.logging.kloglevel | string | `"0"` | Set the klog logging level | @@ -125,6 +126,7 @@ For full list of changes please check ArtifactHub [changelog]. | controller.readinessProbe | object | See [values.yaml] | Configure readiness [probe] for the controller | | controller.replicas | int | `2` | The number of controller pods to run | | controller.resources | object | `{}` | Resource limits and requests for the controller pods. | +| controller.terminationGracePeriodSeconds | int | `30` | terminationGracePeriodSeconds for container lifecycle hook | | controller.tolerations | list | `[]` | [Tolerations] for use with node taints | | controller.topologySpreadConstraints | list | `[]` | Assign custom [TopologySpreadConstraints] rules to the controller | | controller.trafficRouterPlugins | list | `[]` | Configures 3rd party traffic router plugins for controller | diff --git a/charts/argo-rollouts/templates/controller/deployment.yaml b/charts/argo-rollouts/templates/controller/deployment.yaml index df5dc4db3..7aea72a41 100644 --- a/charts/argo-rollouts/templates/controller/deployment.yaml +++ b/charts/argo-rollouts/templates/controller/deployment.yaml @@ -78,6 +78,9 @@ spec: {{- toYaml .Values.controller.readinessProbe | nindent 10 }} securityContext: {{- toYaml .Values.containerSecurityContext | nindent 10 }} + {{- with .Values.controller.lifecycle }} + lifecycle: {{ toYaml . | nindent 10 }} + {{- end }} resources: {{- toYaml .Values.controller.resources | nindent 10 }} volumeMounts: @@ -101,6 +104,9 @@ spec: {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- with .Values.controller.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ . }} + {{- end }} {{- if .Values.controller.tolerations }} tolerations: {{- toYaml .Values.controller.tolerations | nindent 8 }} diff --git a/charts/argo-rollouts/values.yaml b/charts/argo-rollouts/values.yaml index c95f88bf6..266334551 100644 --- a/charts/argo-rollouts/values.yaml +++ b/charts/argo-rollouts/values.yaml @@ -79,6 +79,10 @@ controller: # topologyKey: topology.kubernetes.io/zone # whenUnsatisfiable: DoNotSchedule + # -- terminationGracePeriodSeconds for container lifecycle hook + terminationGracePeriodSeconds: 30 + # -- Specify lifecycle hooks for the controller + lifecycle: {} # -- [priorityClassName] for the controller priorityClassName: "" # -- The number of controller pods to run