-
Notifications
You must be signed in to change notification settings - Fork 0
/
kube-active-proxy-ds.yaml
112 lines (112 loc) · 2.39 KB
/
kube-active-proxy-ds.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
annotations:
description: Nginx Reverse Proxy for Services and Pods powered by annotations
labels:
app: kube-active-proxy
name: kube-active-proxy
namespace: default
spec:
selector:
matchLabels:
app: kube-active-proxy
template:
metadata:
labels:
app: kube-active-proxy
spec:
- name: "kube-active-proxy"
image: adi90x/kube-active-proxy
env:
- name: KAP_LE_TEST
value: "false"
ports:
- name: tcp-80
containerPort: 80
- name: tcp-443
containerPort: 443
volumeMounts:
- mountPath: "/etc/nginx/htpasswd"
name: kap-htpasswd
- mountPath: "/etc/nginx/vhost.d"
name: kap-vhost
- mountPath: "/etc/letsencrypt"
name: kap-le
imagePullPolicy: "Always"
ports:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
securityContext:
privileged: true
dnsPolicy: ClusterFirst
hostNetwork: true
nodeSelector:
kap/front: "true"
restartPolicy: Always
serviceAccount: kube-active-proxy
serviceAccountName: kube-active-proxy
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-active-proxy
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: kube-active-proxy
rules:
- apiGroups: [""]
resources: ["endpoints","pods","services","nodes"]
verbs: ["get","list","watch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kube-active-proxy
subjects:
- kind: ServiceAccount
name: kube-active-proxy # Name is case sensitive
namespace: default
roleRef:
kind: ClusterRole
name: kube-active-proxy
apiGroup: rbac.authorization.k8s.io
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: kap-htpasswd-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Mi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: kap-vhost-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Mi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: kap-le-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 200Mi