Skip to content

Commit 08033d3

Browse files
committed
Add ingresses and oauth2 proxy
1 parent 0c0c2c8 commit 08033d3

File tree

8 files changed

+191
-49
lines changed

8 files changed

+191
-49
lines changed

demo/apps/apps.yaml

Lines changed: 77 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -144,28 +144,28 @@ spec:
144144
jsonPointers:
145145
- /webhooks/0/clientConfig/caBundle
146146

147-
---
148-
apiVersion: argoproj.io/v1alpha1
149-
kind: Application
150-
metadata:
151-
name: flux
152-
finalizers:
153-
- resources-finalizer.argocd.argoproj.io
154-
spec:
155-
project: default
156-
source:
157-
repoURL: https://github.com/jessesuen/k8s-deployments.git
158-
path: flux/demo
159-
destination:
160-
server: https://kubernetes.default.svc
161-
namespace: flux
162-
ignoreDifferences:
163-
# k8s 1.3 does not enable runAsGroup by default
164-
- group: apps
165-
kind: Deployment
166-
name: memcached
167-
jsonPointers:
168-
- /spec/template/spec/containers/0/securityContext/runAsGroup
147+
# ---
148+
# apiVersion: argoproj.io/v1alpha1
149+
# kind: Application
150+
# metadata:
151+
# name: flux
152+
# finalizers:
153+
# - resources-finalizer.argocd.argoproj.io
154+
# spec:
155+
# project: default
156+
# source:
157+
# repoURL: https://github.com/jessesuen/k8s-deployments.git
158+
# path: flux/demo
159+
# destination:
160+
# server: https://kubernetes.default.svc
161+
# namespace: flux
162+
# ignoreDifferences:
163+
# # k8s 1.3 does not enable runAsGroup by default
164+
# - group: apps
165+
# kind: Deployment
166+
# name: memcached
167+
# jsonPointers:
168+
# - /spec/template/spec/containers/0/securityContext/runAsGroup
169169

170170
---
171171
apiVersion: argoproj.io/v1alpha1
@@ -233,6 +233,44 @@ spec:
233233
server: https://kubernetes.default.svc
234234
namespace: prometheus-operator
235235

236+
---
237+
apiVersion: argoproj.io/v1alpha1
238+
kind: Application
239+
metadata:
240+
name: oauth2-proxy-prometheus
241+
finalizers:
242+
- resources-finalizer.argocd.argoproj.io
243+
spec:
244+
project: default
245+
source:
246+
repoURL: https://github.com/jessesuen/k8s-deployments.git
247+
path: oauth2-proxy
248+
helm:
249+
valueFiles:
250+
- prometheus.yaml
251+
destination:
252+
server: https://kubernetes.default.svc
253+
namespace: prometheus-operator
254+
255+
---
256+
apiVersion: argoproj.io/v1alpha1
257+
kind: Application
258+
metadata:
259+
name: oauth2-proxy-canary-demo
260+
finalizers:
261+
- resources-finalizer.argocd.argoproj.io
262+
spec:
263+
project: default
264+
source:
265+
repoURL: https://github.com/jessesuen/k8s-deployments.git
266+
path: oauth2-proxy
267+
helm:
268+
valueFiles:
269+
- rollouts-demo.yaml
270+
destination:
271+
server: https://kubernetes.default.svc
272+
namespace: default
273+
236274
---
237275
apiVersion: argoproj.io/v1alpha1
238276
kind: Application
@@ -252,6 +290,23 @@ spec:
252290
server: https://kubernetes.default.svc
253291
namespace: istio-system
254292

293+
294+
---
295+
apiVersion: argoproj.io/v1alpha1
296+
kind: Application
297+
metadata:
298+
name: ingresses
299+
finalizers:
300+
- resources-finalizer.argocd.argoproj.io
301+
spec:
302+
project: default
303+
source:
304+
repoURL: https://github.com/jessesuen/k8s-deployments.git
305+
path: ingresses
306+
destination:
307+
server: https://kubernetes.default.svc
308+
namespace: istio-system
309+
255310
# ---
256311
# apiVersion: argoproj.io/v1alpha1
257312
# kind: Application

ingresses/grafana.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Ingress
3+
metadata:
4+
name: grafana
5+
namespace: prometheus-operator
6+
annotations:
7+
kubernetes.io/ingress.class: nginx
8+
nginx.ingress.kubernetes.io/auth-url: http://$host/oauth2/auth
9+
nginx.ingress.kubernetes.io/auth-signin: http://$host/oauth2/start?rd=$request_uri
10+
spec:
11+
rules:
12+
- host: grafana.dev.argoproj.io
13+
http:
14+
paths:
15+
- backend:
16+
serviceName: prometheus-operator-grafana
17+
servicePort: 80
18+
path: /
19+
20+
---
21+
apiVersion: v1
22+
kind: Secret
23+
metadata:
24+
name: grafana-oauth
25+
namespace: prometheus-operator

ingresses/istio-grafana.yaml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
apiVersion: extensions/v1beta1
2-
kind: Ingress
3-
metadata:
4-
name: grafana
5-
namespace: prometheus-operator
6-
annotations:
7-
kubernetes.io/ingress.class: nginx
8-
nginx.ingress.kubernetes.io/auth-url: http://$host/oauth2/auth
9-
nginx.ingress.kubernetes.io/auth-signin: http://$host/oauth2/start?rd=$request_uri
10-
spec:
11-
rules:
12-
- host: grafana.dev.argoproj.io
13-
http:
14-
paths:
15-
- backend:
16-
serviceName: prometheus-operator-grafana
17-
servicePort: 80
18-
path: /
19-
20-
---
21-
apiVersion: v1
22-
kind: Secret
23-
metadata:
24-
name: grafana-oauth
25-
namespace: prometheus-operator
26-
27-
---
281
apiVersion: v1
292
kind: Secret
303
metadata:

ingresses/kustomization.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- grafana.yaml
6+
- istio-grafana.yaml
7+
- prometheus.yaml
8+
- rollouts-demo.yaml

ingresses/prometheus.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Ingress
3+
metadata:
4+
name: prometheus
5+
namespace: prometheus-operator
6+
annotations:
7+
kubernetes.io/ingress.class: nginx
8+
nginx.ingress.kubernetes.io/auth-url: http://$host/oauth2/auth
9+
nginx.ingress.kubernetes.io/auth-signin: http://$host/oauth2/start?rd=$request_uri
10+
spec:
11+
rules:
12+
- host: prometheus.dev.argoproj.io
13+
http:
14+
paths:
15+
- backend:
16+
serviceName: prometheus-operator-prometheus
17+
servicePort: 9090
18+
path: /
19+
20+
---
21+
apiVersion: v1
22+
kind: Secret
23+
metadata:
24+
name: prometheus-oauth
25+
namespace: prometheus-operator

ingresses/rollouts-demo.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Ingress
3+
metadata:
4+
annotations:
5+
kubernetes.io/ingress.class: nginx
6+
nginx.ingress.kubernetes.io/auth-url: http://$host/oauth2/auth
7+
nginx.ingress.kubernetes.io/auth-signin: http://$host/oauth2/start?rd=$request_uri
8+
name: canary-demo
9+
namespace: default
10+
spec:
11+
rules:
12+
- host: canary.dev.argoproj.io
13+
http:
14+
paths:
15+
- backend:
16+
serviceName: canary-demo
17+
servicePort: 80
18+
path: /
19+
20+
---
21+
apiVersion: v1
22+
kind: Secret
23+
metadata:
24+
name: rollouts-demo-oauth
25+
namespace: default
26+

oauth2-proxy/prometheus.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
oauth2-proxy:
2+
config:
3+
existingSecret: prometheus-oauth
4+
extraArgs:
5+
provider: github
6+
github-org: argoproj
7+
cookie-secure: "false"
8+
redirect-url: http://prometheus.dev.argoproj.io/oauth2/callback
9+
ingress:
10+
enabled: true
11+
path: /oauth2
12+
hosts:
13+
- prometheus.dev.argoproj.io
14+
annotations:
15+
kubernetes.io/ingress.class: nginx

oauth2-proxy/rollouts-demo.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
oauth2-proxy:
2+
config:
3+
existingSecret: rollouts-demo-oauth
4+
extraArgs:
5+
provider: github
6+
github-org: argoproj
7+
cookie-secure: "false"
8+
redirect-url: http://canary.dev.argoproj.io/oauth2/callback
9+
ingress:
10+
enabled: true
11+
path: /oauth2
12+
hosts:
13+
- canary.dev.argoproj.io
14+
annotations:
15+
kubernetes.io/ingress.class: nginx

0 commit comments

Comments
 (0)