Skip to content

Commit

Permalink
allow adding envs to k8s read (#47)
Browse files Browse the repository at this point in the history
* allow adding envs to k8s read

* [AUTO GITHUB] Bump chart versions

* allow pass envs to static sbom

* [AUTO GITHUB] Bump chart versions

---------

Co-authored-by: dvdlevanon-miggo <[email protected]>
  • Loading branch information
dvdlevanon-miggo and dvdlevanon-miggo authored Nov 19, 2024
1 parent be170fd commit a205625
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
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: []

0 comments on commit a205625

Please sign in to comment.