forked from rhthsa/openshift-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackend-v1-with-node-selector-and-toleration.yaml
73 lines (72 loc) · 1.92 KB
/
backend-v1-with-node-selector-and-toleration.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend-v1
annotations:
app.openshift.io/vcs-ref: master
app.openshift.io/vcs-uri: 'https://gitlab.com/ocp-demo/backend_quarkus'
labels:
app.kubernetes.io/component: backend
app.kubernetes.io/instance: backend
app.kubernetes.io/name: java
app.kubernetes.io/part-of: App-X
app.openshift.io/runtime: quarkus
app.openshift.io/runtime-version: '2.16.1.Final'
spec:
replicas: 1
selector:
matchLabels:
app: backend
version: v1
template:
metadata:
labels:
app: backend
version: v1
annotations:
sidecar.istio.io/inject: "true"
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: app-x
operator: Exists
containers:
- name: backend
image: quay.io/voravitl/backend-native:v1
imagePullPolicy: Always
resources:
requests:
cpu: "0.05"
memory: 50Mi
limits:
cpu: "0.2"
memory: 120Mi
env:
- name: APP_BACKEND
value: https://httpbin.org/delay/4
- name: APP_VERSION
value: v1
- name: quarkus.log.console.color
value: 'false'
ports:
- containerPort: 8080
securityContext:
seccompProfile: #"RuntimeDefault" or "Localhost"
type: RuntimeDefault
allowPrivilegeEscalation: false
runAsNonRoot: true
capabilities:
drop: ["ALL"]
readOnlyRootFilesystem: false
tolerations:
- effect: NoSchedule
key: app-x
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 60
terminationGracePeriodSeconds: 10