Repository navigation
Expand file tree
/
Copy pathdeployment.yaml
More file actions
80 lines (80 loc) · 1.89 KB
/
Copy pathdeployment.yaml
File metadata and controls
80 lines (80 loc) · 1.89 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
apiVersion: v1
kind: ServiceAccount
metadata:
name: torrentdam-operator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: torrentdam-operator
rules:
- apiGroups: [""]
resources: ["pods", "services"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["torrentdam.github.com"]
resources: ["torrents", "torrents/status", "torrents/finalizers"]
verbs: ["get", "list", "watch", "create", "delete", "update", "patch"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get", "create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: torrentdam-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: torrentdam-operator
subjects:
- kind: ServiceAccount
name: torrentdam-operator
namespace: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: torrentdam-operator
labels:
app: torrentdam-operator
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: torrentdam-operator
template:
metadata:
labels:
app: torrentdam-operator
spec:
serviceAccountName: torrentdam-operator
containers:
- name: operator
image: ghcr.io/torrentdam/operator:latest
imagePullPolicy: Always
ports:
- containerPort: 9091
name: rpc
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: PVC_NAME
value: movies
- name: DHT_NODE
value: server.dht.svc.cluster.local:6881
---
apiVersion: v1
kind: Service
metadata:
name: torrentdam-operator
spec:
selector:
app: torrentdam-operator
ports:
- port: 9091
targetPort: 9091
name: rpc