-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.yml
More file actions
96 lines (96 loc) · 1.95 KB
/
deployment.yml
File metadata and controls
96 lines (96 loc) · 1.95 KB
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
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: teams-kontrol
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: teams-kontrol
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: teams-kontrol
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: teams-kontrol
subjects:
- kind: ServiceAccount
name: teams-kontrol
namespace: default
---
apiVersion: v1
kind: ConfigMap
metadata:
name: permissions
data:
permissions.yml: |
verbs:
- "get"
- "delete"
namespaces:
- "default"
resources:
- "pods"
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: teams-kontrol
labels:
app: teams-kontrol
spec:
replicas: 1
selector:
matchLabels:
app: teams-kontrol
template:
metadata:
labels:
app: teams-kontrol
spec:
serviceAccountName: teams-kontrol
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
restartPolicy: Always
containers:
- name: teams-kontrol
ports:
- containerPort: 9000
imagePullPolicy: IfNotPresent
image: teams-kontrol:dev
env:
- name: TEAMS_KONTROL_LOG_LEVEL
value: "DEBUG"
- name: TEAMS_KONTROL_SHARED_SECRET
value: "c2VjcmV0"
- name: TEAMS_KONTROL_PERMISSION_FILE
value: "/permissions/permissions.yml"
- name: TEAMS_KONTROL_INSECURE_COMMANDS
value: "TRUE"
resources:
requests:
cpu: 64m
memory: 64m
volumeMounts:
- name: permissions
mountPath: /permissions
volumes:
- name: permissions
configMap:
name: permissions