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 name: template
description: A Helm library chart containing common templates, keeping application templates short description: A Helm library chart containing common templates, keeping application templates short
type: library type: library
version: 0.1.12 version: 0.1.13
maintainers: maintainers:
- name: Jim Martens - name: Jim Martens
url: https://2martens.de url: https://2martens.de
@@ -12,6 +12,8 @@ annotations:
artifacthub.io/changes: | artifacthub.io/changes: |
- kind: fixed - kind: fixed
description: Fixed secret and ingress files description: Fixed secret and ingress files
- kind: added
description: Added support for ArgoCD application configuration
artifacthub.io/signKey: | artifacthub.io/signKey: |
fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8 fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8
url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc
+12 -4
View File
@@ -48,6 +48,7 @@ securityContext: {}
application: application:
port: 8080 port: 8080
actuatorPort: 8081 actuatorPort: 8081
namespace: template # update to match the desired namespace
profile: prod profile: prod
isSpring: true isSpring: true
@@ -102,10 +103,10 @@ ingress:
paths: paths:
- path: / - path: /
pathType: ImplementationSpecific pathType: ImplementationSpecific
tls: [] tls:
# - secretName: chart-example-tls - secretName: chart-example-tls
# hosts: hosts:
# - chart-example.local - chart-example.local
resources: {} resources: {}
# limits: # limits:
@@ -136,3 +137,10 @@ affinity: {}
podSpec: {} podSpec: {}
# containerSpec: will be added at the bottom of the container specification in the pod template # containerSpec: will be added at the bottom of the container specification in the pod template
containerSpec: {} 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 }}