Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporter deployment configuration updates #58

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions charts/egressd/templates/exporter/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,20 @@ spec:
{{- end }}
{{- end }}
env:
{{- if .Values.castai.apiKey }}
- name: CASTAI_API_KEY
valueFrom:
secretKeyRef:
name: "{{- include "egressd.fullname" . }}"
key: API_KEY
{{- end }}
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
envFrom:
- secretRef:
RomanMelnyk113 marked this conversation as resolved.
Show resolved Hide resolved
{{- 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 }}
{{- end }}
ports:
- name: http-server
containerPort: {{ .Values.exporter.httpListenPort }}
Expand Down Expand Up @@ -89,3 +92,15 @@ spec:
configMap:
name: {{ include "egressd.exporter.fullname" . }}
{{- end }}
{{- with .Values.exporter.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.exporter.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.exporter.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/egressd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ exporter:
log:
level: "debug"
sinks:
{{- if .Values.castai.apiKey }}
{{- if or .Values.castai.apiKey .Values.castai.apiKeySecretRef }}
castai:
http:
url: "{{.Values.castai.apiURL}}/v1/kubernetes/clusters/{{.Values.castai.clusterID}}/egressd-metrics"
compression: gzip
encoding: protobuf
method: POST
headers:
X-API-Key: "${CASTAI_API_KEY}"
X-API-Key: "${API_KEY}"
{{- end }}

# Exporter global configuration for convenient overrides without changing the whole config yaml file. Final config is merged from both config and structuredConfig.
Expand Down
Loading