feat(argo-cd): Use semverCompare to set server.staticAssets.enabled

Signed-off-by: Lucas Bickel <lucas.bickel@adfinis.com>
This commit is contained in:
Lucas Bickel 2021-07-29 17:11:59 +02:00
parent f20e070de1
commit 4efc25e59e
3 changed files with 12 additions and 5 deletions

View file

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 2.0.5
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd
version: 3.11.1
version: 3.12.0
home: https://github.com/argoproj/argo-helm
icon: https://argoproj.github.io/argo-cd/assets/logo.png
keywords:
@ -21,4 +21,5 @@ dependencies:
condition: redis-ha.enabled
annotations:
artifacthub.io/changes: |
- "[Changed]: Set server.staticAssets.enabled=true since Argo CD 2.0.5 still needs it"
- "[Changed]: Use semverCompare to decide if the staticassets flag should be passed if server.staticAssets.enabled is nil"
- "[Changed]: Set server.staticAssets.enabled=~ to use the default semverCompare"

View file

@ -42,10 +42,15 @@ spec:
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.server.image.imagePullPolicy }}
command:
- argocd-server
{{ if .Values.server.staticAssets.enabled }}
{{- if .Values.server.staticAssets.enabled }}
- --staticassets
- /shared/app
{{ end }}
{{- else if eq (toString .Values.server.staticAssets.enabled) "<nil>" }}
{{- if semverCompare "< 2.1.0-0" (default .Values.global.image.tag .Values.server.image.tag) }}
- --staticassets
- /shared/app
{{- end }}
{{- end }}
- --repo-server
- {{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
{{- if .Values.dex.enabled }}

View file

@ -432,8 +432,9 @@ server:
# - --insecure
# This flag is used to either remove or pass the CLI flag --staticassets /shared/app to the argocd-server app
# If a nil value (~) is specified the chart uses semverCompare to enable the flag based on the argocd-server version
staticAssets:
enabled: true
enabled: ~
## Environment variables to pass to argocd-server
##