forked from 0blu/dynamic-hostports-k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yaml
103 lines (103 loc) · 2.26 KB
/
deploy.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
kind: Namespace
apiVersion: v1
metadata:
name: dynamic-hostports
labels:
name: dynamic-hostports
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: dynamic-hostports-account
namespace: dynamic-hostports
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dynamic-hostports-account-nodes
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dynamic-hostports-account-pods
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["list","watch","patch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dynamic-hostports-account-services
rules:
- apiGroups: [""]
resources: ["endpoints", "services"]
verbs: ["list","create","delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dynamic-hostports-account-binding-nodes
subjects:
- kind: ServiceAccount
namespace: dynamic-hostports
name: dynamic-hostports-account
apiGroup: ""
roleRef:
kind: ClusterRole
name: dynamic-hostports-account-nodes
apiGroup: ""
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dynamic-hostports-account-binding-pods
subjects:
- kind: ServiceAccount
namespace: dynamic-hostports
name: dynamic-hostports-account
apiGroup: ""
roleRef:
kind: ClusterRole
name: dynamic-hostports-account-pods
apiGroup: ""
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dynamic-hostports-account-binding-services
subjects:
- kind: ServiceAccount
namespace: dynamic-hostports
name: dynamic-hostports-account
apiGroup: ""
roleRef:
kind: ClusterRole
name: dynamic-hostports-account-services
apiGroup: ""
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dynamic-hostports-deployment
namespace: dynamic-hostports
spec:
replicas: 1
selector:
matchLabels:
app: dynamic-hostports-app
template:
metadata:
labels:
app: dynamic-hostports-app
spec:
serviceAccountName: dynamic-hostports-account
containers:
- name: dynamic-hostports-container
image: 0blu/dynamic-hostport-manager:latest
imagePullPolicy: Always
restartPolicy: Always