diff --git a/charts/portkey-gateway/templates/dataservice/deployment.yaml b/charts/portkey-gateway/templates/dataservice/deployment.yaml index ba588e6..7c80d97 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 hasKey .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..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 @@ -263,6 +274,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 +337,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: {}