-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathdeployment.yaml
More file actions
106 lines (105 loc) · 3.42 KB
/
deployment.yaml
File metadata and controls
106 lines (105 loc) · 3.42 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
97
98
99
100
101
102
103
104
105
106
apiVersion: apps/v1
kind: Deployment
metadata:
name: operator
labels:
app: operator
control-plane: controller-manager
app.kubernetes.io/part-of: backstage
# do not change this label, it should be unique for discovery purposes
app.kubernetes.io/component: backstage-controller
spec:
replicas: 1
selector:
matchLabels:
app: operator
strategy:
type: RollingUpdate
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
app: operator
control-plane: controller-manager
spec:
# Required because the operator does not work without a Service Account Token
automountServiceAccountToken: true # NOSONAR
# Configure the nodeAffinity expression
# according to the platforms which are supported by your solution.
# It is considered best practice to support multiple architectures. You can
# build your manager image using the makefile target docker-buildx.
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/os
operator: In
values:
- linux
securityContext:
runAsNonRoot: true
# (user): For common cases that do not require escalating privileges
# it is recommended to ensure that all your Pods/Containers are restrictive.
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
# seccompProfile:
# type: RuntimeDefault
containers:
- command:
- /manager
args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=:8443
- --metrics-secure=true
- --leader-elect
image: controller:latest
name: manager
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
ports:
- name: health
containerPort: 8081
- name: metrics
containerPort: 8443
livenessProbe:
httpGet:
path: /healthz
port: health
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: health
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 500m
memory: 1Gi
ephemeral-storage: 20Mi
requests:
cpu: 10m
memory: 128Mi
volumeMounts:
- mountPath: /default-config
name: default-config
- mountPath: /plugin-deps
name: plugin-deps
serviceAccountName: controller-manager
terminationGracePeriodSeconds: 10
volumes:
- name: default-config
configMap:
name: default-config
- name: plugin-deps
configMap:
name: plugin-deps
optional: true