Skip to content

feat(deployment): gateway/dataservice feature parity#170

Open
camjay wants to merge 3 commits intoPortkey-AI:mainfrom
camjay:feat/gateway-dataservice-parity
Open

feat(deployment): gateway/dataservice feature parity#170
camjay wants to merge 3 commits intoPortkey-AI:mainfrom
camjay:feat/gateway-dataservice-parity

Conversation

@camjay
Copy link
Copy Markdown

@camjay camjay commented Mar 24, 2026

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 (for ESO, Vault CSI, etc.)
  • extraEnv: additional env vars after commonEnv
  • startupProbe: configurable startup health check

Dataservice (new — gateway already has terminationGracePeriodSeconds via #156):

  • envFrom: same pattern as gateway
  • terminationGracePeriodSeconds: configurable grace period for background job completion

All default to empty/disabled. No behavioral change when unconfigured.

We run Portkey Gateway in production on EKS and have been maintaining these patches in a fork. Upstreaming to reduce maintenance divergence.

See also #173 which adds CI to validate chart templates on PRs.

@camjay camjay force-pushed the feat/gateway-dataservice-parity branch from c453f22 to 3ddcbc4 Compare March 24, 2026 22:05
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 Portkey-AI#156):
- envFrom: same pattern as gateway
- terminationGracePeriodSeconds: configurable grace period

All default to empty/disabled. No behavioral change when unconfigured.
@camjay camjay force-pushed the feat/gateway-dataservice-parity branch from 3ddcbc4 to 2808472 Compare March 24, 2026 22:48
@camjay camjay changed the title feat(deployment): add envFrom, extraEnv, startupProbe to gateway; envFrom and terminationGracePeriodSeconds to dataservice feat(deployment): gateway/dataservice feature parity Mar 24, 2026
@camjay camjay marked this pull request as ready for review March 25, 2026 01:08
@sk-portkey sk-portkey requested a review from Copilot March 25, 2026 09:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the portkey-gateway Helm chart to align Gateway and Dataservice deployment configurability (env injection, probes, and termination behavior) so both components support the same operational features.

Changes:

  • Add envFrom and extraEnv support for the Gateway container.
  • Add configurable startupProbe support for the Gateway container.
  • Add envFrom and optional terminationGracePeriodSeconds support for the Dataservice deployment.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
charts/portkey-gateway/values.yaml Adds new values (envFrom, extraEnv, dataservice envFrom) and notes dataservice termination grace period configuration.
charts/portkey-gateway/templates/gateway/deployment.yaml Renders envFrom, appends extraEnv, and conditionally renders startupProbe for Gateway.
charts/portkey-gateway/templates/dataservice/deployment.yaml Adds optional terminationGracePeriodSeconds and envFrom rendering for Dataservice.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

deployment:
autoRestart: true
replicas: 1
# terminationGracePeriodSeconds: 30
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataservice.deployment.terminationGracePeriodSeconds is supported in the template, but values.yaml only contains a commented example and no actual key. Define terminationGracePeriodSeconds: under dataservice.deployment (empty by default) so it’s discoverable and can be set without relying on implicit/undocumented values.

Suggested change
# terminationGracePeriodSeconds: 30
terminationGracePeriodSeconds:

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional — this mirrors how the gateway template already handles it (added in #156). The commented example documents the field without setting a default that would override Kubernetes's own 30s default.

Comment on lines +84 to +87
{{- with .Values.startupProbe }}
startupProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

startupProbe is rendered from .Values.startupProbe, but values.yaml doesn’t define/document this value alongside the existing livenessProbe/readinessProbe settings. Add a startupProbe: section (or commented example) to values.yaml so users can discover/configure it consistently.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a commented example in values.yaml in 3593ac8.

Comment on lines +266 to +272
# 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: []
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chart now supports envFrom/extraEnv and (in the template) startupProbe, but startupProbe isn’t present in values.yaml near the other probe settings. Add a startupProbe: block (disabled by default) to keep values.yaml in sync with the template and improve discoverability.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same — added in 3593ac8 as a commented example, consistent with how livenessProbe and readinessProbe are already documented in this file.

@sk-portkey
Copy link
Copy Markdown
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants