Skip to content

Commit

Permalink
Enable setting broker env vars, configMaps, and volumes in Configurat…
Browse files Browse the repository at this point in the history
…ion Helm templates (#478)
  • Loading branch information
kate-goldenring committed Jun 1, 2022
1 parent 45dcd53 commit a9195f8
Show file tree
Hide file tree
Showing 22 changed files with 262 additions and 33 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agent/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "agent"
version = "0.8.9"
version = "0.8.10"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>", "<bfjelds@microsoft.com>"]
edition = "2018"
rust-version = "1.58.1"
Expand Down
2 changes: 1 addition & 1 deletion controller/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "controller"
version = "0.8.9"
version = "0.8.10"
authors = ["<bfjelds@microsoft.com>", "<kagold@microsoft.com>"]
edition = "2018"
rust-version = "1.58.1"
Expand Down
4 changes: 2 additions & 2 deletions deployment/helm/Chart.yaml
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.8.9
version: 0.8.10

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.8.9
appVersion: 0.8.10
52 changes: 52 additions & 0 deletions deployment/helm/templates/custom-configuration.yaml
Expand Up @@ -18,6 +18,24 @@ spec:
{{- with .Values.custom.configuration.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- if .Values.custom.configuration.brokerPod.env }}
env:
{{- range $key, $val := .Values.custom.configuration.brokerPod.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
{{- if .Values.custom.configuration.brokerPod.envFrom }}
envFrom:
{{- range $val := .Values.custom.configuration.brokerPod.envFrom.secretRef }}
- secretRef:
name: {{ $val | quote }}
{{- end }}
{{- range $val := .Values.custom.configuration.brokerPod.envFrom.configMapRef }}
- configMapRef:
name: {{ $val | quote }}
{{- end }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
Expand All @@ -27,6 +45,14 @@ spec:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.custom.configuration.brokerPod.resources.memoryLimit }}
cpu: {{ .Values.custom.configuration.brokerPod.resources.cpuLimit }}
{{- with .Values.custom.configuration.brokerPod.volumeMounts}}
volumeMounts:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.custom.configuration.brokerPod.volumes}}
volumes:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
Expand All @@ -45,6 +71,24 @@ spec:
{{- with .Values.custom.configuration.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- if .Values.custom.configuration.brokerJob.env }}
env:
{{- range $key, $val := .Values.custom.configuration.brokerJob.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
{{- if .Values.custom.configuration.brokerJob.envFrom }}
envFrom:
{{- range $val := .Values.custom.configuration.brokerJob.envFrom.secretRef }}
- secretRef:
name: {{ $val | quote }}
{{- end }}
{{- range $val := .Values.custom.configuration.brokerJob.envFrom.configMapRef }}
- configMapRef:
name: {{ $val | quote }}
{{- end }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
Expand All @@ -54,6 +98,14 @@ spec:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.custom.configuration.brokerJob.resources.memoryLimit }}
cpu: {{ .Values.custom.configuration.brokerJob.resources.cpuLimit }}
{{- with .Values.custom.configuration.brokerJob.volumeMounts}}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.custom.configuration.brokerJob.volumes}}
volumes:
{{- toYaml . | nindent 10 }}
{{- end }}
restartPolicy: {{ .Values.custom.configuration.brokerJob.restartPolicy }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
52 changes: 52 additions & 0 deletions deployment/helm/templates/debug-echo-configuration.yaml
Expand Up @@ -24,6 +24,24 @@ spec:
{{- with .Values.debugEcho.configuration.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- if .Values.debugEcho.configuration.brokerPod.env }}
env:
{{- range $key, $val := .Values.debugEcho.configuration.brokerPod.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
{{- if .Values.debugEcho.configuration.brokerPod.envFrom }}
envFrom:
{{- range $val := .Values.debugEcho.configuration.brokerPod.envFrom.secretRef }}
- secretRef:
name: {{ $val | quote }}
{{- end }}
{{- range $val := .Values.debugEcho.configuration.brokerPod.envFrom.configMapRef }}
- configMapRef:
name: {{ $val | quote }}
{{- end }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
Expand All @@ -33,6 +51,14 @@ spec:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.debugEcho.configuration.brokerPod.resources.memoryLimit }}
cpu: {{ .Values.debugEcho.configuration.brokerPod.resources.cpuLimit }}
{{- with .Values.debugEcho.configuration.brokerPod.volumeMounts}}
volumeMounts:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.debugEcho.configuration.brokerPod.volumes}}
volumes:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
Expand All @@ -51,6 +77,24 @@ spec:
{{- with .Values.debugEcho.configuration.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- if .Values.debugEcho.configuration.brokerJob.env }}
env:
{{- range $key, $val := .Values.debugEcho.configuration.brokerJob.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
{{- if .Values.debugEcho.configuration.brokerJob.envFrom }}
envFrom:
{{- range $val := .Values.debugEcho.configuration.brokerJob.envFrom.secretRef }}
- secretRef:
name: {{ $val | quote }}
{{- end }}
{{- range $val := .Values.debugEcho.configuration.brokerJob.envFrom.configMapRef }}
- configMapRef:
name: {{ $val | quote }}
{{- end }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
Expand All @@ -60,6 +104,14 @@ spec:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.debugEcho.configuration.brokerJob.resources.memoryLimit }}
cpu: {{ .Values.debugEcho.configuration.brokerJob.resources.cpuLimit }}
{{- with .Values.debugEcho.configuration.brokerJob.volumeMounts}}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.debugEcho.configuration.brokerJob.volumes}}
volumes:
{{- toYaml . | nindent 10 }}
{{- end }}
restartPolicy: {{ .Values.debugEcho.configuration.brokerJob.restartPolicy }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
52 changes: 52 additions & 0 deletions deployment/helm/templates/onvif-configuration.yaml
Expand Up @@ -50,6 +50,24 @@ spec:
value: {{ $val | quote }}
{{- end }}
{{- end }}
{{- if .Values.onvif.configuration.brokerPod.env }}
env:
{{- range $key, $val := .Values.onvif.configuration.brokerPod.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
{{- if .Values.onvif.configuration.brokerPod.envFrom }}
envFrom:
{{- range $val := .Values.onvif.configuration.brokerPod.envFrom.secretRef }}
- secretRef:
name: {{ $val | quote }}
{{- end }}
{{- range $val := .Values.onvif.configuration.brokerPod.envFrom.configMapRef }}
- configMapRef:
name: {{ $val | quote }}
{{- end }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
Expand All @@ -59,6 +77,14 @@ spec:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.onvif.configuration.brokerPod.resources.memoryLimit }}
cpu: {{ .Values.onvif.configuration.brokerPod.resources.cpuLimit }}
{{- with .Values.onvif.configuration.brokerPod.volumeMounts}}
volumeMounts:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.onvif.configuration.brokerPod.volumes}}
volumes:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
Expand All @@ -77,6 +103,24 @@ spec:
{{- with .Values.onvif.configuration.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- if .Values.onvif.configuration.brokerJob.env }}
env:
{{- range $key, $val := .Values.onvif.configuration.brokerJob.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
{{- if .Values.onvif.configuration.brokerJob.envFrom }}
envFrom:
{{- range $val := .Values.onvif.configuration.brokerJob.envFrom.secretRef }}
- secretRef:
name: {{ $val | quote }}
{{- end }}
{{- range $val := .Values.onvif.configuration.brokerJob.envFrom.configMapRef }}
- configMapRef:
name: {{ $val | quote }}
{{- end }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
Expand All @@ -86,6 +130,14 @@ spec:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.onvif.configuration.brokerJob.resources.memoryLimit }}
cpu: {{ .Values.onvif.configuration.brokerJob.resources.cpuLimit }}
{{- with .Values.onvif.configuration.brokerJob.volumeMounts}}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.onvif.configuration.brokerJob.volumes}}
volumes:
{{- toYaml . | nindent 10 }}
{{- end }}
restartPolicy: {{ .Values.onvif.configuration.brokerJob.restartPolicy }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down

0 comments on commit a9195f8

Please sign in to comment.