Fix ingress (#109)

pull/115/head
Yann Soubeyrand 2019-09-20 01:02:55 +02:00 committed by Alex Collins
parent aff8a78040
commit f8dc826d58
2 changed files with 6 additions and 16 deletions

View File

@ -56,10 +56,9 @@ $ helm install --name my-release argo/argo-cd
| dexServer.servicePortHttp | int | `5556` | Service port for Dex Server GRPC |
| dexServer.volumeMounts | list | `[]` | Additional volume mounts |
| dexServer.volumes | list | `[]` | Additional volumes |
| ingress.additionalHosts | list | `[]` | Ingress additional hosts |
| ingress.annotations | object | `{}` | Annotations for ingress object, set `nginx.ingress.kubernetes.io/force-ssl-redirect: "true"` and `nginx.ingress.kubernetes.io/ssl-passthrough: "true"` if serving GRPC and HTTPS on the same ingress |
| ingress.enabled | bool | `false` | Enable ingress |
| ingress.hosts[0] | string | `"argocd.example.com"` | Ingress host |
| ingress.path | string | `"/"` | Ingress path |
| rbac.policyCsv | string | `nil` | RBAC policy in CSV, see [values.yaml](./values.yaml) for format |
| rbac.policyDefault | string | `nil` | The default role Argo CD will fall back to, when authorizing API requests, ie: `role:readonly` |
| rbac.scopes | string | `nil` | Scopes controls which OIDC scopes to examine during rbac enforcement (in addition to `sub` scope). ie: `[groups]` |

View File

@ -1,6 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- $servicePortHttps := .Values.server.servicePortHttps -}}
{{- $host := regexReplaceAll "^https?://([^/]+)(/.*)?$" .Values.config.url "${1}" }}
{{- $path := default "/" (regexReplaceAll "^https?://([^/]+)(/.*)?$" .Values.config.url "${2}") }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@ -17,22 +17,13 @@ metadata:
{{- end }}
spec:
rules:
{{- with .Values.config.url }}
{{- range prepend .Values.ingress.additionalHosts $host }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
- path: {{ $path | quote }}
backend:
serviceName: argocd-server
servicePort: {{ $servicePortHttps }}
{{- end }}
{{- range .Values.ingress.additionalHosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: argocd-server
servicePort: {{ $servicePortHttps }}
servicePort: https
{{- end }}
{{- end }}