-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal-pod-under-test.yaml
84 lines (84 loc) · 2.53 KB
/
local-pod-under-test.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
---
apiVersion: apps/v1
kind: {{ RESOURCE_TYPE }}
metadata:
labels:
test-network-function.com/generic: target
name: test
namespace: {{ TNF_EXAMPLE_CNF_NAMESPACE }}
spec:
replicas: {{ REPLICAS }}
selector:
matchLabels:
app: {{ APP }}
template:
metadata:
labels:
app: {{ APP }}
test-network-function.com/generic: target
test-network-function.com/container: target
annotations:
test-network-function.com/container_tests: '["PRIVILEGED_POD","PRIVILEGED_ROLE"]' # optional
test-network-function.com/defaultnetworkinterface: '"eth0"' # optional
k8s.v1.cni.cncf.io/networks: {{ MULTUS_ANNOTATION }}
name: test
spec:
terminationGracePeriodSeconds: 30
automountServiceAccountToken: false
containers:
- image: quay.io/testnetworkfunction/cnf-test-partner:latest
imagePullPolicy: IfNotPresent
name: test
ports:
- name: "http-probe"
containerPort: 8080
resources:
limits:
memory: 512Mi
cpu: 0.25
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /tmp/message"]
preStop:
exec:
command: ["/bin/sh", "-c", "killall -0 tail"]
livenessProbe:
httpGet:
path: /health
port: 8080
httpHeaders:
- name: health-check
value: liveness
initialDelaySeconds: 10
periodSeconds: 5
readinessProbe:
httpGet:
path: /ready
port: 8080
httpHeaders:
- name: health-check
value: readiness
initialDelaySeconds: 10
periodSeconds: 5
startupProbe:
httpGet:
path: /health
port: 8080
httpHeaders:
- name: health-check
value: startup
failureThreshold: 10
periodSeconds: 5
command: ["./bin/app"]
terminationMessagePolicy: FallbackToLogsOnError
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- {{ APP }}
topologyKey: "kubernetes.io/hostname"