diff --git a/helm/template/Chart.yaml b/helm/template/Chart.yaml index 8204f2a..7598b85 100644 --- a/helm/template/Chart.yaml +++ b/helm/template/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: template description: A Helm library chart containing common templates, keeping application templates short type: library -version: 0.1.12 +version: 0.1.13 maintainers: - name: Jim Martens url: https://2martens.de @@ -12,6 +12,8 @@ annotations: artifacthub.io/changes: | - kind: fixed description: Fixed secret and ingress files + - kind: added + description: Added support for ArgoCD application configuration artifacthub.io/signKey: | fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8 url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc diff --git a/helm/template/_values.yaml b/helm/template/_values.yaml index 705663e..6d55aab 100644 --- a/helm/template/_values.yaml +++ b/helm/template/_values.yaml @@ -48,6 +48,7 @@ securityContext: {} application: port: 8080 actuatorPort: 8081 + namespace: template # update to match the desired namespace profile: prod isSpring: true @@ -102,10 +103,10 @@ ingress: paths: - path: / pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local + tls: + - secretName: chart-example-tls + hosts: + - chart-example.local resources: {} # limits: @@ -136,3 +137,10 @@ affinity: {} podSpec: {} # containerSpec: will be added at the bottom of the container specification in the pod template containerSpec: {} + +argocd: + enabled: false + project: default + repoURL: https://github.com/exampleUser/exampleRepo + targetRevision: HEAD + pathInRepo: / diff --git a/helm/template/templates/_application.yaml b/helm/template/templates/_application.yaml new file mode 100644 index 0000000..f84306f --- /dev/null +++ b/helm/template/templates/_application.yaml @@ -0,0 +1,20 @@ +{{- define "template.application" -}} +{{- if .Values.argocd.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: {{ include "template.fullname" . }} + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: {{ .Values.argocd.project }} + source: + repoURL: {{ .Values.argocd.repoURL }} + targetRevision: {{ .Values.argocd.targetRevision }} + path: {{ .Values.argocd.pathInRepo }} + destination: + server: https://kubernetes.default.svc + namespace: {{ .Values.application.namespace }} +{{- end }} +{{- end }}