From 28084722f46cf9a102ba5b4fd97c3a20ecbd83bb Mon Sep 17 00:00:00 2001 From: Campbell Pool Date: Tue, 24 Mar 2026 13:13:36 -0700 Subject: [PATCH 1/3] feat(deployment): gateway/dataservice feature parity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brings gateway and dataservice to parity on deployment features that already exist on one component but not the other: Gateway (new — already exists on dataservice): - envFrom: bulk inject env vars from secrets/configmaps - extraEnv: additional env vars after commonEnv - startupProbe: configurable startup health check Dataservice (new — gateway already has these via #156): - envFrom: same pattern as gateway - terminationGracePeriodSeconds: configurable grace period All default to empty/disabled. No behavioral change when unconfigured. --- .../templates/dataservice/deployment.yaml | 9 ++++++++- .../portkey-gateway/templates/gateway/deployment.yaml | 11 +++++++++++ charts/portkey-gateway/values.yaml | 10 ++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/charts/portkey-gateway/templates/dataservice/deployment.yaml b/charts/portkey-gateway/templates/dataservice/deployment.yaml index ba588e6..3c2dec9 100644 --- a/charts/portkey-gateway/templates/dataservice/deployment.yaml +++ b/charts/portkey-gateway/templates/dataservice/deployment.yaml @@ -41,7 +41,10 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - imagePullSecrets: + {{- if .Values.dataservice.deployment.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.dataservice.deployment.terminationGracePeriodSeconds }} + {{- end }} + imagePullSecrets: {{- range .Values.imageCredentials }} - name: {{ .name }} {{- end }} @@ -54,6 +57,10 @@ spec: command: {{- toYaml . | nindent 12 }} {{- end }} + {{- if .Values.dataservice.envFrom }} + envFrom: + {{- toYaml .Values.dataservice.envFrom | nindent 12 }} + {{- end }} env: - name: GATEWAY_BASE_URL value: http://{{ include "portkeyenterprise.fullname" . }}:{{ .Values.service.port }} diff --git a/charts/portkey-gateway/templates/gateway/deployment.yaml b/charts/portkey-gateway/templates/gateway/deployment.yaml index bdeec09..7a83285 100644 --- a/charts/portkey-gateway/templates/gateway/deployment.yaml +++ b/charts/portkey-gateway/templates/gateway/deployment.yaml @@ -68,12 +68,23 @@ spec: containerPort: {{ include "mcp.containerPort" . }} protocol: TCP {{- end }} + {{- if .Values.envFrom }} + envFrom: + {{- toYaml .Values.envFrom | nindent 12 }} + {{- end }} env: {{- if .Values.dataservice.enabled }} - name: DATASERVICE_BASEPATH value: http://{{ include "portkeyenterprise.fullname" . }}-{{ .Values.dataservice.name }}:{{ .Values.dataservice.service.port }} {{- end }} {{- include "portkeyenterprise.commonEnv" . | nindent 12 }} + {{- with .Values.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.startupProbe }} + startupProbe: + {{- toYaml . | nindent 12 }} + {{- end }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/charts/portkey-gateway/values.yaml b/charts/portkey-gateway/values.yaml index f489504..4f7b192 100644 --- a/charts/portkey-gateway/values.yaml +++ b/charts/portkey-gateway/values.yaml @@ -263,6 +263,14 @@ volumeMounts: [] extraContainerConfig: {} +# envFrom allows loading all keys from secrets/configmaps as environment variables. +# Useful for external secret managers (ESO, Vault CSI, AWS Secrets Manager). +# Variables in env (from environment.data) take precedence over envFrom. +envFrom: [] + +# Additional environment variables appended after commonEnv. +extraEnv: [] + # Additional sidecar containers injected into the gateway pod. # Each entry is a full Kubernetes container spec. # Example: nginx TLS-termination sidecar @@ -318,12 +326,14 @@ dataservice: containerPort: 8081 finetuneBucket: "" logexportsBucket: "" + envFrom: [] env: DEBUG_ENABLED: false SERVICE_NAME: "portkeyenterprise-dataservice" deployment: autoRestart: true replicas: 1 + # terminationGracePeriodSeconds: 30 labels: {} selectorLabels: {} annotations: {} From 4058d9485fe20a30a2da4f1b1beb31a5054762e6 Mon Sep 17 00:00:00 2001 From: Campbell Pool Date: Wed, 25 Mar 2026 13:01:36 -0700 Subject: [PATCH 2/3] Update charts/portkey-gateway/templates/dataservice/deployment.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- charts/portkey-gateway/templates/dataservice/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/portkey-gateway/templates/dataservice/deployment.yaml b/charts/portkey-gateway/templates/dataservice/deployment.yaml index 3c2dec9..7c80d97 100644 --- a/charts/portkey-gateway/templates/dataservice/deployment.yaml +++ b/charts/portkey-gateway/templates/dataservice/deployment.yaml @@ -41,7 +41,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - {{- if .Values.dataservice.deployment.terminationGracePeriodSeconds }} + {{- if hasKey .Values.dataservice.deployment "terminationGracePeriodSeconds" }} terminationGracePeriodSeconds: {{ .Values.dataservice.deployment.terminationGracePeriodSeconds }} {{- end }} imagePullSecrets: From 3593ac8edcced41207f175385f4e904c2162efa1 Mon Sep 17 00:00:00 2001 From: Campbell Pool Date: Wed, 25 Mar 2026 13:40:15 -0700 Subject: [PATCH 3/3] docs(values): add startupProbe commented example for gateway --- charts/portkey-gateway/values.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/charts/portkey-gateway/values.yaml b/charts/portkey-gateway/values.yaml index 4f7b192..ab1a16d 100644 --- a/charts/portkey-gateway/values.yaml +++ b/charts/portkey-gateway/values.yaml @@ -214,6 +214,17 @@ resources: {} # cpu: 100m # memory: 128Mi +# startupProbe is optional and rendered only when defined. +# Useful for slow-starting containers to avoid premature liveness kills. +# Example: +# startupProbe: +# httpGet: +# path: /v1/health +# port: 8787 +# initialDelaySeconds: 10 +# periodSeconds: 5 +# failureThreshold: 30 + livenessProbe: httpGet: path: /v1/health