diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index ce2b91c1..3189aa5a 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -3,7 +3,7 @@ appVersion: v2.5.10 kubeVersion: ">=1.22.0-0" description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 5.19.15 +version: 6.0.0 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png sources: @@ -23,5 +23,5 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - kind: added - description: Configurable dnsPolicy / hostNetwork + - kind: changed + description: Refactored ingress template and corresponding values section diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 02482d75..7369644c 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -665,13 +665,15 @@ NAME: my-release | server.imagePullSecrets | list | `[]` (defaults to global.imagePullSecrets) | Secrets with credentials to pull images from a private registry | | server.ingress.annotations | object | `{}` | Additional ingress annotations | | server.ingress.enabled | bool | `false` | Enable an ingress resource for the Argo CD server | -| server.ingress.extraPaths | list | `[]` | Additional ingress paths | +| server.ingress.extraPaths | list | `[]` | | | server.ingress.hosts | list | `[]` | List of ingress hosts | | server.ingress.https | bool | `false` | Uses `server.service.servicePortHttps` instead `server.service.servicePortHttp` | | server.ingress.ingressClassName | string | `""` | Defines which ingress controller will implement the resource | | server.ingress.labels | object | `{}` | Additional ingress labels | -| server.ingress.pathType | string | `"Prefix"` | Ingress path type. One of `Exact`, `Prefix` or `ImplementationSpecific` | -| server.ingress.paths | list | `["/"]` | List of ingress paths | +| server.ingress.paths[0].path | string | `"/"` | | +| server.ingress.paths[0].pathType | string | `"Prefix"` | Ingress path type. One of `Exact`, `Prefix` or `ImplementationSpecific` | +| server.ingress.paths[0].service.name | string | argo-cd server service name | Backend service name | +| server.ingress.paths[0].service.port | string | argo-cd server service port | Backend service port. Can be String or Int value. | | server.ingress.tls | list | `[]` | Ingress TLS configuration | | server.ingressGrpc.annotations | object | `{}` | Additional ingress annotations for dedicated [gRPC-ingress] | | server.ingressGrpc.awsALB.backendProtocolVersion | string | `"HTTP2"` | Backend protocol version for the AWS ALB gRPC service | diff --git a/charts/argo-cd/templates/argocd-server/ingress.yaml b/charts/argo-cd/templates/argocd-server/ingress.yaml index 52269d0a..7673a53b 100644 --- a/charts/argo-cd/templates/argocd-server/ingress.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress.yaml @@ -1,8 +1,8 @@ {{- if .Values.server.ingress.enabled -}} +{{- $serviceName := include "argo-cd.server.fullname" $ -}} {{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingress.https -}} {{- $paths := .Values.server.ingress.paths -}} {{- $extraPaths := .Values.server.ingress.extraPaths -}} -{{- $pathType := .Values.server.ingress.pathType -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -29,36 +29,27 @@ spec: rules: {{- if .Values.server.ingress.hosts }} {{- range $host := .Values.server.ingress.hosts }} + {{- if and $.Values.server.ingressGrpc.isAWSALB $.Values.server.ingressGrpc.enabled }} + {{ $serviceName = printf "%s-grpc" (include "argo-cd.server.fullname" $) }} + {{- end }} - host: {{ $host }} http: paths: {{- with $extraPaths }} {{- toYaml . | nindent 10 }} {{- end }} - {{- range $p := $paths }} - {{- if and $.Values.server.ingressGrpc.isAWSALB $.Values.server.ingressGrpc.enabled }} - - path: {{ $p }} + {{- range $paths }} + {{ $backendServicePort := .service.port | default $servicePort }} + - path: {{ .path }} pathType: Prefix backend: service: - name: {{ template "argo-cd.server.fullname" $ }}-grpc + name: {{ .service.name | default $serviceName }} port: - {{- if kindIs "float64" $servicePort }} - number: {{ $servicePort }} + {{- if kindIs "float64" $backendServicePort }} + number: {{ $backendServicePort }} {{- else }} - name: {{ $servicePort }} - {{- end }} - {{- end }} - - path: {{ $p }} - pathType: {{ $pathType }} - backend: - service: - name: {{ include "argo-cd.server.fullname" $ }} - port: - {{- if kindIs "float64" $servicePort }} - number: {{ $servicePort }} - {{- else }} - name: {{ $servicePort }} + name: {{ $backendServicePort }} {{- end }} {{- end -}} {{- end -}} @@ -68,17 +59,18 @@ spec: {{- with $extraPaths }} {{- toYaml . | nindent 10 }} {{- end }} - {{- range $p := $paths }} - - path: {{ $p }} - pathType: {{ $pathType }} + {{- range $paths }} + {{ $backendServicePort := .service.port | default $servicePort }} + - path: {{ .path }} + pathType: {{ .pathType }} backend: service: - name: {{ include "argo-cd.server.fullname" $ }} + name: {{ .service.name | default $serviceName }} port: - {{- if kindIs "float64" $servicePort }} - number: {{ $servicePort }} + {{- if kindIs "float64" $backendServicePort }} + number: {{ $backendServicePort }} {{- else }} - name: {{ $servicePort }} + name: {{ $backendServicePort }} {{- end }} {{- end -}} {{- end -}} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index c3f6fdab..b7721c1d 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -1666,12 +1666,18 @@ server: hosts: [] # - argocd.example.com - # -- List of ingress paths paths: - - / - # -- Ingress path type. One of `Exact`, `Prefix` or `ImplementationSpecific` - pathType: Prefix - # -- Additional ingress paths + - path: / + # -- Ingress path type. One of `Exact`, `Prefix` or `ImplementationSpecific` + pathType: Prefix + service: + # -- Backend service name + # @default -- argo-cd server service name + name: "" + # -- Backend service port. Can be String or Int value. + # @default -- argo-cd server service port + port: "" + extraPaths: [] # - path: /* # pathType: Prefix