Skip to content

Commit

Permalink
add extra volume + init container support to helm charts
Browse files Browse the repository at this point in the history
  • Loading branch information
sofuture committed Dec 9, 2024
1 parent a336408 commit 4e991f7
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 0 deletions.
10 changes: 10 additions & 0 deletions charts/edge-site/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ spec:
secret:
secretName: gcp-cloud-credential
optional: true
{{- if .Values.edgeController.extraVolumes }}
{{ toYaml .Values.edgeController.extraVolumes| indent 8 }}
{{- end }}
{{- if .Values.edgeController.initContainers }}
initContainers:
{{- toYaml .Values.edgeController.initContainers | indent 10 }}
{{- end }}
containers:
- name: edge-controller
image: us-central1-docker.pkg.dev/foxglove-images/images/edge-controller:{{ .Chart.AppVersion }}
Expand All @@ -44,6 +51,9 @@ spec:
memory: {{ .Values.edgeController.resources.limits.memory }}
cpu: {{ .Values.edgeController.resources.limits.cpu }}
volumeMounts:
{{- if .Values.edgeController.extraVolumeMounts }}
{{ toYaml .Values.edgeController.extraVolumeMounts | indent 12 }}
{{- end }}
{{ if eq .Values.recordingStorage.provider "local" }}
- mountPath: /data/storage
name: storage-root
Expand Down
5 changes: 5 additions & 0 deletions charts/edge-site/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@ edgeController:
podAnnotations: {}
serviceLabels: {}
env: []
# Customize init containers here
initContainers: {}
# Customize volumes here
extraVolumes: []
extraVolumeMounts: []
10 changes: 10 additions & 0 deletions charts/primary-site/templates/cronjobs/garbage-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,22 @@ spec:
secret:
secretName: gcp-cloud-credential
optional: true
{{- if .Values.garbageCollector.deployment.extraVolumes }}
{{ toYaml .Values.garbageCollector.deployment.extraVolumes | indent 12 }}
{{- end }}
{{- if .Values.garbageCollector.deployment.initContainers }}
initContainers:
{{ toYaml .Values.garbageCollector.deployment.initContainers | indent 12 }}
{{- end }}
containers:
- name: garbage-collector
image: us-central1-docker.pkg.dev/foxglove-images/images/garbage-collector:{{ .Chart.AppVersion }}
volumeMounts:
- mountPath: /secrets
name: cloud-credentials
{{- if .Values.garbageCollector.deployment.extraVolumeMounts }}
{{ toYaml .Values.garbageCollector.deployment.extraVolumeMounts | indent 16 }}
{{- end }}
envFrom:
- secretRef:
name: cloud-credentials
Expand Down
10 changes: 10 additions & 0 deletions charts/primary-site/templates/deployments/_inbox-container.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ template:
secret:
secretName: gcp-cloud-credential
optional: true
{{- if .Values.inboxListener.deployment.extraVolumes }}
{{ toYaml .Values.inboxListener.deployment.extraVolumes | indent 6 }}
{{- end }}
{{- if .Values.inboxListener.deployment.localScratch.enabled }}
- name: local-scratch
emptyDir:
Expand All @@ -30,6 +33,10 @@ template:
{{- if .Values.inboxListener.deployment.serviceAccount.enabled }}
serviceAccount: inbox-listener
{{- end}}
{{- if .Values.inboxListener.deployment.initContainers }}
initContainers:
{{- toYaml .Values.inboxListener.deployment.initContainers | indent 6 }}
{{- end }}
containers:
- name: inbox-listener
image: us-central1-docker.pkg.dev/foxglove-images/images/inbox-listener:{{ .Chart.AppVersion }}
Expand All @@ -53,6 +60,9 @@ template:
- mountPath: /local-scratch
name: local-scratch
{{- end }}
{{- if .Values.inboxListener.deployment.extraVolumeMounts }}
{{ toYaml .Values.inboxListener.deployment.extraVolumeMounts | indent 10 }}
{{- end }}
ports:
- name: metrics
containerPort: 6001
Expand Down
12 changes: 12 additions & 0 deletions charts/primary-site/templates/deployments/site-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ spec:
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if .Values.siteController.deployment.extraVolumes }}
volumes:
{{ toYaml .Values.siteController.deployment.extraVolumes | indent 8 }}
{{- end }}
{{- if .Values.siteController.deployment.initContainers }}
initContainers:
{{- toYaml .Values.siteController.deployment.initContainers | indent 8 }}
{{- end }}
containers:
- name: site-controller
image: us-central1-docker.pkg.dev/foxglove-images/images/site-controller:{{ .Chart.AppVersion }}
Expand All @@ -42,6 +50,10 @@ spec:
- secretRef:
name: foxglove-site-token
optional: true
{{- if .Values.siteController.deployment.extraVolumeMounts }}
volumeMounts:
{{ toYaml .Values.siteController.deployment.extraVolumeMounts | indent 12 }}
{{- end }}
env:
- name: FOXGLOVE_API_URL
value: {{ .Values.globals.foxgloveApiUrl }}
Expand Down
10 changes: 10 additions & 0 deletions charts/primary-site/templates/deployments/stream-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ spec:
secret:
secretName: gcp-cloud-credential
optional: true
{{- if .Values.streamService.deployment.extraVolumes }}
{{ toYaml .Values.streamService.deployment.extraVolumes | indent 8 }}
{{- end }}
{{- if .Values.streamService.deployment.initContainers }}
initContainers:
{{- toYaml .Values.streamService.deployment.initContainers | indent 8 }}
{{- end }}
containers:
- name: stream-service
image: us-central1-docker.pkg.dev/foxglove-images/images/stream-server:{{ .Chart.AppVersion }}
Expand All @@ -49,6 +56,9 @@ spec:
volumeMounts:
- mountPath: /secrets
name: cloud-credentials
{{- if .Values.streamService.deployment.extraVolumeMounts }}
{{ toYaml .Values.streamService.deployment.extraVolumeMounts | indent 12 }}
{{- end }}
envFrom:
- secretRef:
name: cloud-credentials
Expand Down
20 changes: 20 additions & 0 deletions charts/primary-site/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ ingress:
inboxListener:
deployment:
replicas: 1
# Customize init containers here
initContainers: {}
# Customize volumes here
extraVolumes: []
extraVolumeMounts: []
resources:
requests:
cpu: 1000m
Expand Down Expand Up @@ -133,6 +138,11 @@ streamService:
annotations: {}
deployment:
replicas: 1
# Customize init containers here
initContainers: {}
# Customize volumes here
extraVolumes: []
extraVolumeMounts: []
resources:
requests:
cpu: 1000m
Expand Down Expand Up @@ -161,6 +171,11 @@ siteController:
service:
annotations: {}
deployment:
# Customize init containers here
initContainers: {}
# Customize volumes here
extraVolumes: []
extraVolumeMounts: []
resources:
requests:
cpu: 250m
Expand All @@ -181,6 +196,11 @@ garbageCollector:
failedJobsHistoryLimit: 1
successfulJobsHistoryLimit: 3
deployment:
# Customize init containers here
initContainers: {}
# Customize volumes here
extraVolumes: []
extraVolumeMounts: []
env: []
nodeSelectors: {}
serviceAccount:
Expand Down

0 comments on commit 4e991f7

Please sign in to comment.