From 031fca8cad1b5dd54592b9afdfa44271d9826365 Mon Sep 17 00:00:00 2001 From: Petr Drastil Date: Sun, 7 Jan 2024 14:15:41 +0100 Subject: [PATCH] Add ingress extra rules Signed-off-by: Petr Drastil --- charts/argo-cd/Chart.yaml | 2 + charts/argo-cd/README.md | 3 ++ .../webhook-ingress.yaml | 3 ++ .../templates/argocd-server/ingress-grpc.yaml | 3 ++ .../templates/argocd-server/ingress.yaml | 3 ++ charts/argo-cd/values.yaml | 42 ++++++++++++++++--- 6 files changed, 51 insertions(+), 5 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 300d5e66..357f4b47 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -28,3 +28,5 @@ annotations: artifacthub.io/changes: | - kind: removed description: Wildcard catch all ingress rule + - kind: added + description: Ingress extra rules to allow explicit configuration of catch all rule diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 919149b5..8bcb7a5d 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -738,6 +738,7 @@ NAME: my-release | 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.extraRules | list | `[]` (See [values.yaml]) | Additional ingress rules | | 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 | @@ -750,6 +751,7 @@ NAME: my-release | server.ingressGrpc.awsALB.serviceType | string | `"NodePort"` | Service type for the AWS ALB gRPC service | | server.ingressGrpc.enabled | bool | `false` | Enable an ingress resource for the Argo CD server for dedicated [gRPC-ingress] | | server.ingressGrpc.extraPaths | list | `[]` | Additional ingress paths for dedicated [gRPC-ingress] | +| server.ingressGrpc.extraRules | list | `[]` (See [values.yaml]) | Additional ingress rules | | server.ingressGrpc.hosts | list | `[]` | List of ingress hosts for dedicated [gRPC-ingress] | | server.ingressGrpc.https | bool | `false` | Uses `server.service.servicePortHttps` instead `server.service.servicePortHttp` | | server.ingressGrpc.ingressClassName | string | `""` | Defines which ingress controller will implement the resource [gRPC-ingress] | @@ -1161,6 +1163,7 @@ If you want to use an existing Redis (eg. a managed service from a cloud provide | applicationSet.webhook.ingress.annotations | object | `{}` | Additional ingress annotations | | applicationSet.webhook.ingress.enabled | bool | `false` | Enable an ingress resource for Webhooks | | applicationSet.webhook.ingress.extraPaths | list | `[]` | Additional ingress paths | +| applicationSet.webhook.ingress.extraRules | list | `[]` (See [values.yaml]) | Additional ingress rules | | applicationSet.webhook.ingress.hosts | list | `[]` | List of ingress hosts | | applicationSet.webhook.ingress.ingressClassName | string | `""` | Defines which ingress ApplicationSet controller will implement the resource | | applicationSet.webhook.ingress.labels | object | `{}` | Additional ingress labels | diff --git a/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml b/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml index aa7e0f92..0905f427 100644 --- a/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml +++ b/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml @@ -45,6 +45,9 @@ spec: {{- end }} {{- end }} {{- end }} + {{- with .Values.applicationSet.webhook.ingress.extraRules }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- with .Values.applicationSet.webhook.ingress.tls }} tls: {{- toYaml . | nindent 4 }} diff --git a/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml b/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml index 67620b17..cb426009 100644 --- a/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml @@ -45,6 +45,9 @@ spec: {{- end }} {{- end }} {{- end }} + {{- with .Values.server.ingressGrpc.extraRules }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- with .Values.server.ingressGrpc.tls }} tls: {{- toYaml . | nindent 4 }} diff --git a/charts/argo-cd/templates/argocd-server/ingress.yaml b/charts/argo-cd/templates/argocd-server/ingress.yaml index 6b1e6f26..d20f7bf2 100644 --- a/charts/argo-cd/templates/argocd-server/ingress.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress.yaml @@ -62,6 +62,9 @@ spec: {{- end }} {{- end }} {{- end }} + {{- with .Values.server.ingress.extraRules }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- with .Values.server.ingress.tls }} tls: {{- toYaml . | nindent 4 }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index bc93065e..2309f64c 100644 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -1946,6 +1946,7 @@ server: - / # -- Ingress path type. One of `Exact`, `Prefix` or `ImplementationSpecific` pathType: Prefix + # -- Additional ingress paths extraPaths: [] # - path: /* @@ -1956,6 +1957,18 @@ server: # port: # name: use-annotation + # -- Additional ingress rules + # @default -- `[]` (See [values.yaml]) + extraRules: [] + # - host: example.server.local + # http: + # path: / + # backend: + # service: + # name: example-svc + # port: + # name: http + # -- Ingress TLS configuration tls: [] # - secretName: your-certificate-name @@ -2014,6 +2027,18 @@ server: # port: # name: use-annotation + # -- Additional ingress rules + # @default -- `[]` (See [values.yaml]) + extraRules: [] + # - host: example.server.local + # http: + # path: / + # backend: + # service: + # name: example-svc + # port: + # name: http + # -- Ingress TLS configuration for dedicated [gRPC-ingress] tls: [] # - secretName: your-certificate-name @@ -2712,11 +2737,6 @@ applicationSet: pathType: Prefix # -- Additional ingress paths extraPaths: [] - # - path: /* - # backend: - # serviceName: ssl-redirect - # servicePort: use-annotation - ## for Kubernetes >=1.19 (when "networking.k8s.io/v1" is used) # - path: /* # pathType: Prefix # backend: @@ -2725,6 +2745,18 @@ applicationSet: # port: # name: use-annotation + # -- Additional ingress rules + # @default -- `[]` (See [values.yaml]) + extraRules: [] + # - host: example.server.local + # http: + # path: / + # backend: + # service: + # name: example-svc + # port: + # name: http + # -- Ingress TLS configuration tls: [] # - secretName: argocd-applicationset-tls