From 5a4707ff212e44479aab72b6ec9b8b358486d28e Mon Sep 17 00:00:00 2001 From: Xin Gu Date: Thu, 19 Feb 2026 16:18:41 -0500 Subject: [PATCH] feat: add optional strategy and terminationGracePeriodSeconds to gateway deployment Add support for zero-downtime deployments: - strategy: configurable deployment strategy (e.g., RollingUpdate) - terminationGracePeriodSeconds: configurable grace period for pod termination --- .../templates/gateway/deployment.yaml | 7 +++++++ charts/portkey-gateway/values.yaml | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/charts/portkey-gateway/templates/gateway/deployment.yaml b/charts/portkey-gateway/templates/gateway/deployment.yaml index dcf5d81..1a7582f 100644 --- a/charts/portkey-gateway/templates/gateway/deployment.yaml +++ b/charts/portkey-gateway/templates/gateway/deployment.yaml @@ -18,6 +18,10 @@ spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} + {{- with .Values.strategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "portkeyenterprise.selectorLabels" . | nindent 6 }} @@ -39,6 +43,9 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: + {{- if .Values.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- end }} imagePullSecrets: {{- range .Values.imageCredentials }} - name: {{ .name }} diff --git a/charts/portkey-gateway/values.yaml b/charts/portkey-gateway/values.yaml index 7be5582..b39db44 100644 --- a/charts/portkey-gateway/values.yaml +++ b/charts/portkey-gateway/values.yaml @@ -4,6 +4,15 @@ replicaCount: 1 +# Deployment strategy configuration +# Example: +# strategy: +# type: RollingUpdate +# rollingUpdate: +# maxSurge: 1 +# maxUnavailable: 0 +strategy: {} + images: gatewayImage: repository: "docker.io/portkeyai/gateway_enterprise" @@ -265,6 +274,10 @@ hostAlias: [] # if you want to restart instance automatically autoRestart: false +# Optional: Grace period for pod termination (in seconds) +# terminationGracePeriodSeconds: 30 +terminationGracePeriodSeconds: + dataservice: name: "dataservice"