Added support for application config to template

This commit is contained in:
2023-10-29 19:50:37 +01:00
parent 66c10b31af
commit ccf5b2bacd
3 changed files with 35 additions and 5 deletions
+3 -1
View File
@@ -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
+12 -4
View File
@@ -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: /
+20
View File
@@ -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 }}