diff --git a/chart/templates/apps.yaml b/chart/templates/apps.yaml index 5398fd0..3194d5b 100644 --- a/chart/templates/apps.yaml +++ b/chart/templates/apps.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - name: {{ $app_name }} + name: {{ index (splitList "/" $app_name) 0 }} namespace: argocd finalizers: - resources-finalizer.argocd.argoproj.io @@ -13,15 +13,12 @@ spec: repoURL: https://gitea.arcodange.duckdns.org/arcodange-org/tools targetRevision: HEAD path: {{ $app_name }} - {{- if $app.patches }} helm: - patches: - {{- range $patch := $app.patches }} - - target: - {{- toYaml $patch.target | nindent 12 }} - patch: |- - {{ $patch.patch | nindent 12 }} - {{- end }} + valueFiles: + - values.yaml + {{- if $app.kustomize }} + kustomize: + {{- toYaml $app.kustomize | nindent 6 }} {{- end }} destination: server: https://kubernetes.default.svc diff --git a/chart/values.yaml b/chart/values.yaml index 3a105ef..5ab29a4 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -6,16 +6,7 @@ tools: crowdsec: {} redis: {} clickhouse: - patches: - - target: - kind: StatefulSet - name: clickhouse - patch: |- - - op: add - path: /spec/template/spec/containers/0/volumeMounts/- - value: - name: config-volume - mountPath: /etc/clickhouse-server/users.d/custom-users.xml - subPath: custom-users.xml - readOnly: true + kustomize: + patches: + - kustomize/patch-volumeMount.yaml grafana: {} \ No newline at end of file diff --git a/clickhouse/kustomize/patch-volumeMount.yaml b/clickhouse/kustomize/patch-volumeMount.yaml new file mode 100644 index 0000000..5ea7d07 --- /dev/null +++ b/clickhouse/kustomize/patch-volumeMount.yaml @@ -0,0 +1,14 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: clickhouse +spec: + template: + spec: + containers: + - name: clickhouse + volumeMounts: + - name: config-volume + mountPath: /etc/clickhouse-server/users.d/custom-users.xml + subPath: custom-users.xml + readOnly: true