Skip to content

Commit

Permalink
use env instead of envFrom in exporter deployment (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanMelnyk113 authored Sep 5, 2023
1 parent f2f74d2 commit c07d4aa
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions charts/egressd/templates/exporter/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,20 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
envFrom:
- secretRef:
{{- if or .Values.castai.apiKey .Values.castai.apiKeySecretRef }}
- name: API_KEY
valueFrom:
secretKeyRef:
{{- if .Values.castai.apiKey }}
{{- if ne .Values.castai.apiKeySecretRef "" }}
{{- fail "apiKey and apiKeySecretRef are mutually exclusive" }}
{{- end }}
name: "{{- include "egressd.fullname" . }}"
{{- else }}
name: {{ required "apiKey or apiKeySecretRef must be provided" .Values.castai.apiKeySecretRef }}
key: API_KEY
{{- else if .Values.castai.apiKeySecretRef }}
name: {{ .Values.castai.apiKeySecretRef }}
key: API_KEY
{{- end }}
{{- else }}
{{- fail "apiKey or apiKeySecretRef must be provided" }}
{{- end }}
ports:
- name: http-server
containerPort: {{ .Values.exporter.httpListenPort }}
Expand Down

0 comments on commit c07d4aa

Please sign in to comment.