-
Notifications
You must be signed in to change notification settings - Fork 4
/
vip-controller.yaml
144 lines (144 loc) · 3.3 KB
/
vip-controller.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
apiVersion: v1
kind: ServiceAccount
metadata:
name: vip-controller
namespace: kube-system
labels:
app: "vip-controller"
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: vip-controller
labels:
app: "vip-controller"
rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get"]
- apiGroups: ["apps"]
resources: ["statefulsets"]
verbs: ["list", "watch", "get"]
- apiGroups: ["vpc.uk8s.ucloud.cn"]
resources: ["vpcipclaims"]
verbs: ["watch","get","update","list","delete"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: vip-controller
labels:
app: "vip-controller"
subjects:
- kind: ServiceAccount
name: vip-controller
namespace: kube-system
roleRef:
kind: ClusterRole
name: vip-controller
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: vip-controller
namespace: kube-system
labels:
app: "vip-controller"
spec:
replicas: 1
selector:
matchLabels:
app: "vip-controller"
template:
metadata:
labels:
app: "vip-controller"
spec:
serviceAccount: vip-controller
hostNetwork: true
hostPID: true
priorityClassName: system-node-critical
containers:
- name: vip-controller
image: uhub.service.ucloud.cn/uk8s/vip-controller:1.2.0
args:
- "--static-ip-gc-interval=1h"
resources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 200m
memory: 512Mi
securityContext:
privileged: true
imagePullPolicy: "Always"
envFrom:
- configMapRef:
name: uk8sconfig
volumeMounts:
- name: user-config
mountPath: /etc/uk8s/
- name: host-data
mountPath: /etc/kubernetes
readOnly: true
volumes:
- name: user-config
configMap:
name: uk8sconfig
- name: host-data
hostPath:
path: /etc/kubernetes
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: vpcipclaims.vpc.uk8s.ucloud.cn
spec:
group: vpc.uk8s.ucloud.cn
versions:
- name: v1beta1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
subnetId:
type: string
vpcId:
type: string
ip:
type: string
mask:
type: string
gateway:
type: string
status:
type: object
properties:
attached:
type: boolean
lastDetachtime:
type: string
releaseTime:
type: string
sandboxId:
type: string
mac:
type: string
zone:
type: string
scope: Namespaced
names:
plural: vpcipclaims
singular: vpcipclaim
kind: VpcIpClaim
---