forked from vmware-archive/kubeless-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s.yaml
118 lines (118 loc) · 1.83 KB
/
k8s.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
113
114
115
116
117
118
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ui-acct
namespace: kubeless
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: kubeless-ui
rules:
- apiGroups:
- ""
resources:
- pods
- pods/log
verbs:
- get
- list
- apiGroups:
- kubeless.io
resources:
- functions
verbs:
- get
- list
- watch
- update
- create
- delete
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- proxy
- apiGroups:
- ""
resources:
- services/proxy
verbs:
- get
# the 'create' verb is required because otherwise POST requests are blocked
- create
- proxy
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kubeless-ui
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kubeless-ui
subjects:
- kind: ServiceAccount
name: ui-acct
namespace: kubeless
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
controller: ui
namespace: kubeless
name: ui
spec:
replicas: 1
selector:
matchLabels:
controller: ui
template:
metadata:
labels:
controller: ui
spec:
containers:
- name: ui
image: bitnami/kubeless-ui:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
protocol: TCP
- name: proxy
image: lachlanevenson/k8s-kubectl:v1.13.1
imagePullPolicy: Always
args:
- proxy
- "-p"
- "8080"
serviceAccountName: ui-acct
---
apiVersion: v1
kind: Service
metadata:
labels:
controller: ui
name: ui
namespace: kubeless
spec:
ports:
- name: ui-port
port: 3000
protocol: TCP
targetPort: 3000
selector:
controller: ui
sessionAffinity: None
type: NodePort