Skip to content

Commit

Permalink
feat: Allow to pass secrets and environment variables to transformati…
Browse files Browse the repository at this point in the history
…on service (#2632)

Signed-off-by: Alvaro Duran Tovar <hermesdt@gmail.com>

Co-authored-by: Alvaro Duran Tovar <hermest@gmail.com>
  • Loading branch information
hermesdt and Alvaro Duran Tovar authored May 10, 2022
1 parent 1e02066 commit ffa33ad
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion infra/charts/feast/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Feature store for machine learning
name: feast
version: 0.20.0
version: 0.20.1
keywords:
- machine learning
- big data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,44 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}

volumes:
{{- range $secret := .Values.secrets }}
- name: {{ $secret }}
secret:
secretName: {{ $secret }}
{{- end }}

containers:
- name: {{ .Chart.Name }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: grpc
containerPort: {{ .Values.service.grpc.targetPort }}


volumeMounts:
{{- range $secret := .Values.secrets }}
- name: {{ $secret }}
mountPath: "/etc/secrets/{{ $secret }}"
readOnly: true
{{- end }}

env:
- name: FEATURE_TRANSFORMATION_SERVER_PORT
value: {{ .Values.service.grpc.targetPort | quote }}
- name: FEATURE_STORE_YAML_BASE64
value: {{ tpl (.Files.Get "config/feature_store.yaml") . | b64enc | quote }}


{{- range $key, $value := .Values.envOverrides }}
- name: {{ printf "%s" $key | replace "." "_" | upper | quote }}
{{- if eq (kindOf $value) "map" }}
valueFrom:
{{- toYaml $value | nindent 12 }}
{{- else }}
value: {{ $value | quote }}
{{- end }}
{{- end }}

resources:
{{- toYaml .Values.resources | nindent 10 }}
3 changes: 3 additions & 0 deletions infra/charts/feast/charts/transformation-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ nodeSelector: {}
# envOverrides -- Extra environment variables to set
envOverrides: {}

# secrets -- List of Kubernetes secrets to be mounted. These secrets will be mounted on /etc/secrets/<secret name>.
secrets: []

# podLabels -- Labels to be added to Feast Serving pods
podLabels: {}

0 comments on commit ffa33ad

Please sign in to comment.