-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
66 lines (60 loc) · 1.25 KB
/
deployment.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
apiVersion: v1
kind: Namespace
metadata:
name: dhcp-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: kube-dhcp-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- "*"
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kube-dhcp-role-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kube-dhcp-role
subjects:
- kind: ServiceAccount
name: default
namespace: dhcp-system
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kube-dhcp
namespace: dhcp-system
spec:
replicas: 1
template:
metadata:
labels:
name: kube-dhcp
spec:
hostNetwork: true
containers:
- name: server
imagePullPolicy: IfNotPresent
image: pulcy/kube-dhcp@sha256:adc24ec063a43e51d25d77975ff999066db8720708bc33ea66311afdaa1ca2ef
env:
- name: METADATA_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: METADATA_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: METADATA_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP