Skip to content

Commit

Permalink
docs: improve ingress documentation for argo-server (#4306)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfsen authored Oct 16, 2020
1 parent 26f39b6 commit 240cd79
Showing 1 changed file with 26 additions and 18 deletions.
44 changes: 26 additions & 18 deletions docs/argo-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,33 @@ argo-server LoadBalancer 10.43.43.130 172.18.0.2 2746:30008/TCP 18h

You can get ingress working as follows:

Update `service/argo-server` spec with `type: LoadBalancer`:

```yaml
- name: web
port: 2746
targetPort: 2746
type: LoadBalancer
```
Add `BASE_HREF` as environment variable to `deployment/argo-server` :
Add `BASE_HREF` as environment variable to `deployment/argo-server`. Do not forget to add a trailing '/' character.


```yaml
- name: argo-server
image: argoproj/argocli:latest
args: [server]
env:
- name: BASE_HREF
value: /argo/
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argo-server
spec:
selector:
matchLabels:
app: argo-server
template:
metadata:
labels:
app: argo-server
spec:
containers:
- args:
- server
env:
- name: BASE_HREF
value: /argo/
image: argoproj/argocli:latest
name: argo-server
...
```

Create a ingress, with the annotation `ingress.kubernetes.io/rewrite-target: /`:
Expand All @@ -126,15 +134,15 @@ kind: Ingress
metadata:
name: argo-server
annotations:
ingress.kubernetes.io/rewrite-target: /
ingress.kubernetes.io/rewrite-target: /$2
spec:
rules:
- http:
paths:
- backend:
serviceName: argo-server
servicePort: 2746
path: /argo
path: /argo(/|$)(.*)
```
[Learn more](https://github.com/argoproj/argo/issues/3080)

0 comments on commit 240cd79

Please sign in to comment.