Skip to content

Commit

Permalink
feat(chart): add reloader for auto-reload trino pods on cm change (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
alee-x authored Oct 13, 2023
1 parent 05acbc0 commit 2ce6b98
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
32 changes: 32 additions & 0 deletions charts/teleport/templates/application/app-reloader.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{- if .Values.appReloader.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: reloader
namespace: {{ .Values.global.application.argocd.namespace }}
finalizers:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/sync-wave: "2"
spec:
destination:
namespace: "{{ .Values.global.namespacePrefix }}-{{ .Values.appReloader.namespace }}"
# this has to be installed alongside Trino, so we use the Trino cluster values
server: {{ eq .Values.appTrino.cluster "" | ternary .Values.global.application.address .Values.appTrino.cluster }}
project: {{ .Values.global.application.argocd.project }}
syncPolicy:
automated:
selfHeal: true
prune: true
syncOptions:
- CreateNamespace=true
source:
{{- .Values.appReloader.source | toYaml | nindent 4 }}
helm:
valueFiles:
- values.yaml
{{- if .Values.appReloader.values }}
values: |
{{- .Values.appReloader.values | toYaml | nindent 8 }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/teleport/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ appHive:
# renovate: datasource=helm depName=hive registryUrl=https://harbor.ukserp.ac.uk/dare/chart
targetRevision: 1.2.0

appReloader:
enabled: true
# this needs to be installed alongside Trino, so it uses the Trino cluster value
namespace: reloader
source:
repoURL: https://stakater.github.io/stakater-charts
chart: reloader
# renovate: datasource=helm depName=reloader registryUrl=https://stakater.github.io/stakater-charts
targetRevision: 1.0.43

appMinioTenant:
enabled: true
cluster: ""
Expand Down

0 comments on commit 2ce6b98

Please sign in to comment.