fix: Helm giving linting error when no ingress or ingressGrpc extraPaths are given (#435)

* Added conditionals for ingress extraPaths

* Added conditionals for ingressGrpc extraPaths

* Version bump
This commit is contained in:
Ertugrul Karademir 2020-09-01 23:41:22 +01:00 committed by GitHub
parent ffc9220f04
commit b9af202660
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View file

@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.6.2" appVersion: "1.6.2"
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd name: argo-cd
version: 2.6.2 version: 2.6.3
home: https://github.com/argoproj/argo-helm home: https://github.com/argoproj/argo-helm
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
keywords: keywords:

View file

@ -2,6 +2,7 @@
{{- $serviceName := include "argo-cd.server.fullname" . -}} {{- $serviceName := include "argo-cd.server.fullname" . -}}
{{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingressGrpc.https -}} {{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingressGrpc.https -}}
{{- $paths := .Values.server.ingressGrpc.paths -}} {{- $paths := .Values.server.ingressGrpc.paths -}}
{{- $extraPaths := .Values.server.ingressGrpc.extraPaths -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1 apiVersion: networking.k8s.io/v1beta1
{{ else }} {{ else }}
@ -33,7 +34,9 @@ spec:
- host: {{ $host }} - host: {{ $host }}
http: http:
paths: paths:
{{- toYaml .Values.server.ingressGrpc.extraPaths | nindent 10 }} {{- if $extraPaths }}
{{- toYaml $extraPaths | nindent 10 }}
{{- end -}}
{{- range $p := $paths }} {{- range $p := $paths }}
- path: {{ $p }} - path: {{ $p }}
backend: backend:
@ -44,7 +47,9 @@ spec:
{{- else }} {{- else }}
- http: - http:
paths: paths:
{{- toYaml .Values.server.ingressGrpc.extraPaths | nindent 10 }} {{- if $extraPaths }}
{{- toYaml $extraPaths | nindent 10 }}
{{- end -}}
{{- range $p := $paths }} {{- range $p := $paths }}
- path: {{ $p }} - path: {{ $p }}
backend: backend:
@ -56,4 +61,4 @@ spec:
tls: tls:
{{- toYaml .Values.server.ingressGrpc.tls | nindent 4 }} {{- toYaml .Values.server.ingressGrpc.tls | nindent 4 }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}

View file

@ -34,7 +34,9 @@ spec:
- host: {{ $host }} - host: {{ $host }}
http: http:
paths: paths:
{{- if $extraPaths }}
{{- toYaml $extraPaths | nindent 10 }} {{- toYaml $extraPaths | nindent 10 }}
{{- end }}
{{- range $p := $paths }} {{- range $p := $paths }}
- path: {{ $p }} - path: {{ $p }}
backend: backend:
@ -45,7 +47,9 @@ spec:
{{- else }} {{- else }}
- http: - http:
paths: paths:
{{- if $extraPaths }}
{{- toYaml $extraPaths | nindent 10 }} {{- toYaml $extraPaths | nindent 10 }}
{{- end }}
{{- range $p := $paths }} {{- range $p := $paths }}
- path: {{ $p }} - path: {{ $p }}
backend: backend:
@ -57,4 +61,4 @@ spec:
tls: tls:
{{- toYaml .Values.server.ingress.tls | nindent 4 }} {{- toYaml .Values.server.ingress.tls | nindent 4 }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}