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

allow adding envs to k8s read #47

Merged
merged 5 commits into from
Nov 19, 2024
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
2 changes: 1 addition & 1 deletion charts/k8s-read/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: k8s-read
description: A Helm chart for miggo's k8s-read
type: application
version: 0.0.4
version: 0.0.5
appVersion: "0.0.1"
10 changes: 8 additions & 2 deletions charts/k8s-read/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,21 @@ spec:
- --metric-tls-skip-verify={{ default .Values.output.otlp.tlsSkipVerify $globalMetricTlsSkipVerify }}
- --metric-interval={{ coalesce .Values.config.metrics.interval $globalMetricInterval }}
- --interval={{ .Values.config.interval }}
{{- if .Values.output.otlp.existingSecret }}
envFrom:
{{- if .Values.output.otlp.existingSecret }}
- secretRef:
name: {{ .Values.output.otlp.existingSecret }}
{{- else }}
envFrom:
- secretRef:
name: k8s-read-otlp-secret
{{- end }}
{{- with .Values.extraEnvsFrom }}
{{- toYaml . | nindent 10 }}
{{- end }}
env:
{{- with .Values.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- containerPort: {{ .Values.healthcheck.port }}
livenessProbe:
Expand Down
2 changes: 2 additions & 0 deletions charts/k8s-read/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,5 @@ nodeSelector: {}
tolerations: []
affinity: {}

extraEnvs: []
extraEnvsFrom: []
2 changes: 1 addition & 1 deletion charts/static-sbom/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: static-sbom
description: A Helm chart for miggo's static-sbom
type: application
version: 0.0.7
version: 0.0.8
appVersion: "0.0.1"
10 changes: 8 additions & 2 deletions charts/static-sbom/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,21 @@ spec:
- --cache-cm-name={{ include "static-sbom.configMapCacheName" . }}
- --cache-cm-namespace={{ .Release.Namespace }}
{{ end }}
{{- if .Values.output.otlp.existingSecret }}
envFrom:
{{- if .Values.output.otlp.existingSecret }}
- secretRef:
name: {{ .Values.output.otlp.existingSecret }}
{{- else }}
envFrom:
- secretRef:
name: static-sbom-otlp-secret
{{- end }}
{{- with .Values.extraEnvsFrom }}
{{- toYaml . | nindent 10 }}
{{- end }}
env:
{{- with .Values.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- containerPort: {{ .Values.healthcheck.port }}
livenessProbe:
Expand Down
2 changes: 2 additions & 0 deletions charts/static-sbom/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ nodeSelector: {}
tolerations: []
affinity: {}

extraEnvs: []
extraEnvsFrom: []