-
Notifications
You must be signed in to change notification settings - Fork 5
/
mini-k8s-proxy.yaml
97 lines (96 loc) · 1.94 KB
/
mini-k8s-proxy.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
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: proxyroutes.miniproxy.togettoyou.com
spec:
group: miniproxy.togettoyou.com
names:
kind: ProxyRoute
shortNames:
- pr
plural: proxyroutes
singular: proxyroute
scope: Namespaced
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
host:
type: string
serviceName:
type: string
namespace:
type: string
port:
type: integer
scheme:
type: boolean
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: proxyroutes-reader
rules:
- apiGroups:
- miniproxy.togettoyou.com
resources:
- proxyroutes
verbs:
- get
- watch
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: proxyroutes-reader-global
subjects:
- kind: Group
name: system:authenticated
apiGroup: rbac.authorization.k8s.io
- kind: Group
name: system:unauthenticated
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: proxyroutes-reader
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mini-k8s-proxy
spec:
selector:
matchLabels:
app: mini-k8s-proxy
replicas: 1
template:
metadata:
labels:
app: mini-k8s-proxy
spec:
containers:
- name: mini-k8s-proxy
image: togettoyou/mini-k8s-proxy:latest
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: mini-k8s-proxy-service
spec:
ports:
- port: 80
targetPort: 80
selector:
app: mini-k8s-proxy
type: NodePort