diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 27ba569f..62dad251 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -1046,7 +1046,8 @@ NAME: my-release | server.gateway.httpRoute.pathType | string | `PathPrefix` (See [values.yaml]) | HTTP reoute path type. Either 'Exact' or `PathPrefix` | | server.gateway.labels | object | `{}` | Additional gateway labels | | server.gateway.listeners | list | Listen on http. | Gateway listeners | -| server.gateway.name | string | `""` (calculated with template "argo-cd.server.fullname") (See [values.yaml]) | Name of the new gateway | +| server.gateway.name | string | `""` (calculated with template "argo-cd.server.fullname") (See [values.yaml]) | Name of the gateway | +| server.gateway.namespace | string | `.Release.Namespace` (See [values.yaml]) | Name of the namespace gateway | | server.hostNetwork | bool | `false` | Host Network for Server pods | | server.image.imagePullPolicy | string | `""` (defaults to global.image.imagePullPolicy) | Image pull policy for the Argo CD server | | server.image.repository | string | `""` (defaults to global.image.repository) | Repository to use for the Argo CD server | diff --git a/charts/argo-cd/templates/argocd-server/gateway-httproute.yaml b/charts/argo-cd/templates/argocd-server/gateway-httproute.yaml index 2cfa2dc3..20e43310 100644 --- a/charts/argo-cd/templates/argocd-server/gateway-httproute.yaml +++ b/charts/argo-cd/templates/argocd-server/gateway-httproute.yaml @@ -20,6 +20,7 @@ spec: - group: gateway.networking.k8s.io kind: Gateway name: {{ .Values.server.gateway.name | default (include "argo-cd.server.fullname" .) }} + namespace: {{ .Values.server.gateway.namespace | default .Release.Namespace }} {{- with .Values.server.gateway.httpRoute.gatewaySection }} sectionName: {{ . }} {{- end }} diff --git a/charts/argo-cd/templates/argocd-server/gateway.yaml b/charts/argo-cd/templates/argocd-server/gateway.yaml index 311bc943..7be8d26f 100644 --- a/charts/argo-cd/templates/argocd-server/gateway.yaml +++ b/charts/argo-cd/templates/argocd-server/gateway.yaml @@ -3,7 +3,7 @@ kind: Gateway apiVersion: gateway.networking.k8s.io/v1 metadata: name: {{ .Values.server.gateway.name | default (include "argo-cd.server.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ .Values.server.gateway.namespace | default .Release.Namespace }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} {{- with .Values.server.gateway.labels }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 1f37c5f5..3abfac70 100644 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -2157,9 +2157,12 @@ server: # -- enable a gateway resource for ArgoCD ## Note: you can already have an existing Gateway and just wanted to add a route and backend policy to that Gateway, let false in that case enabled: false - # -- Name of the new gateway + # -- Name of the gateway # @default -- `""` (calculated with template "argo-cd.server.fullname") (See [values.yaml]) name: "" + # -- Name of the namespace gateway + # @default -- `.Release.Namespace` (See [values.yaml]) + namespace: "" # -- Specific implementation for gateway controller. Only `None` and `gke` are supported. ## With `None`, the gateway is supposed to already exist and no specific object will be created ## Additional configuration might be required in related configuration sections for `gke`