forked from slime-io/slime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment_slime-boot.yaml
84 lines (82 loc) · 2.29 KB
/
deployment_slime-boot.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: slime-boot
namespace: mesh-operator
spec:
replicas: 1
selector:
matchLabels:
name: slime-boot
template:
metadata:
labels:
name: slime-boot
spec:
serviceAccountName: slime-boot
containers:
- name: slime-boot
# Replace this with the built image name
image: docker.io/slimeio/slime-boot:v0.8.2
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
value: ""
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "slime-boot"
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: slime-boot
namespace: mesh-operator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: slime-boot
subjects:
- kind: ServiceAccount
name: slime-boot
namespace: mesh-operator
roleRef:
kind: ClusterRole
name: slime
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: slime
rules:
- apiGroups: ["networking.istio.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["microservice.slime.io","config.netease.com"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["create", "get", "list", "watch", "update", "patch", "delete"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["create", "get", "list", "watch", "update", "patch", "delete"]
- apiGroups: [""]
resources: ["configmaps", "services", "secrets","serviceaccounts"]
verbs: ["create", "get", "list", "watch", "update", "patch", "delete"]
- apiGroups: [""]
resources: ["endpoints", "namespaces", "nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["rolebindings","clusterrolebindings"]
verbs: ["create", "get", "list", "watch", "update", "patch", "delete"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["clusterroles","roles"]
verbs: ["create", "get", "list", "watch", "update", "patch", "delete", "bind"]