File tree Expand file tree Collapse file tree 5 files changed +120
-0
lines changed Expand file tree Collapse file tree 5 files changed +120
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ install:
17
17
./scripts/deploy-test-pods.sh
18
18
./scripts/deploy-statefulset-test-pods.sh
19
19
./scripts/deploy-pod-disruption-budget.sh
20
+ ./scripts/deploy-special-resources.sh
20
21
./scripts/deploy-test-crds.sh
21
22
./scripts/install-olm.sh
22
23
./scripts/deploy-community-operator.sh
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ source "$SCRIPT_DIR"/init-env.sh
8
8
9
9
# Delete tnf, partner and operator and litmus
10
10
./" $SCRIPT_DIR " /delete-test-pods.sh
11
+ ./" $SCRIPT_DIR " /delete-special-resources.sh
11
12
./" $SCRIPT_DIR " /delete-hpa.sh
12
13
./" $SCRIPT_DIR " /delete-test-crds.sh
13
14
./" $SCRIPT_DIR " /delete-debug-ds.sh
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Initialization
4
+ SCRIPT_DIR=$( dirname " $0 " )
5
+
6
+ # shellcheck disable=SC1091 # Not following.
7
+ source " $SCRIPT_DIR " /init-env.sh
8
+
9
+ mkdir -p ./temp
10
+
11
+ " $SCRIPT_DIR " /mo ./test-target/special-resources.yaml > ./temp/rendered-test-special-resources.yaml
12
+ oc delete --filename ./temp/rendered-test-special-resources.yaml -n " $TNF_EXAMPLE_CNF_NAMESPACE " --ignore-not-found=true
13
+ rm ./temp/rendered-test-special-resources.yaml
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Initialization
4
+ SCRIPT_DIR=$( dirname " $0 " )
5
+
6
+ # shellcheck disable=SC1091 # Not following.
7
+ source " $SCRIPT_DIR " /init-env.sh
8
+
9
+ mkdir -p ./temp
10
+
11
+ " $SCRIPT_DIR " /mo ./test-target/special-resources.yaml > ./temp/rendered-test-special-resources.yaml
12
+ oc apply --filename ./temp/rendered-test-special-resources.yaml --namespace " $TNF_EXAMPLE_CNF_NAMESPACE "
13
+ rm ./temp/rendered-test-special-resources.yaml
Original file line number Diff line number Diff line change
1
+
2
+ apiVersion : apps/v1
3
+ kind : Deployment
4
+ metadata :
5
+ name : special-dp
6
+ namespace : {{ TNF_EXAMPLE_CNF_NAMESPACE }}
7
+ labels :
8
+ test-network-function.com/generic : target
9
+ spec :
10
+ replicas : 2
11
+ selector :
12
+ matchLabels :
13
+ app : special-dp
14
+ template :
15
+ metadata :
16
+ labels :
17
+ test-network-function.com/generic : target
18
+ test-network-function.com/container : target
19
+ app : special-dp
20
+ AffinityRequired : " true"
21
+ name : special-dp
22
+ spec :
23
+ terminationGracePeriodSeconds : 30
24
+ automountServiceAccountToken : false
25
+ serviceAccountName : test-pod-sa
26
+ containers :
27
+ - image : quay.io/testnetworkfunction/cnf-test-partner:latest
28
+ imagePullPolicy : IfNotPresent
29
+ name : test
30
+ ports :
31
+ - name : " http-probe"
32
+ containerPort : 8080
33
+ resources :
34
+ limits :
35
+ memory : 512Mi
36
+ cpu : 0.25
37
+ lifecycle :
38
+ postStart :
39
+ exec :
40
+ command : ["/bin/sh", "-c", "echo Hello from the postStart handler > /tmp/message"]
41
+ preStop :
42
+ exec :
43
+ command : ["/bin/sh", "-c", "killall -0 tail"]
44
+ livenessProbe :
45
+ httpGet :
46
+ path : /health
47
+ port : 8080
48
+ httpHeaders :
49
+ - name : health-check
50
+ value : liveness
51
+ initialDelaySeconds : 10
52
+ periodSeconds : 5
53
+ readinessProbe :
54
+ httpGet :
55
+ path : /ready
56
+ port : 8080
57
+ httpHeaders :
58
+ - name : health-check
59
+ value : readiness
60
+ initialDelaySeconds : 10
61
+ periodSeconds : 5
62
+ startupProbe :
63
+ httpGet :
64
+ path : /health
65
+ port : 8080
66
+ httpHeaders :
67
+ - name : health-check
68
+ value : startup
69
+ failureThreshold : 10
70
+ periodSeconds : 5
71
+ command : ["./bin/app"]
72
+ terminationMessagePolicy : FallbackToLogsOnError
73
+ affinity :
74
+ nodeAffinity :
75
+ requiredDuringSchedulingIgnoredDuringExecution :
76
+ nodeSelectorTerms :
77
+ - matchExpressions :
78
+ - key : node-role.kubernetes.io/worker
79
+ operator : In
80
+ values :
81
+ - worker
82
+ ---
83
+ apiVersion : policy/v1
84
+ kind : PodDisruptionBudget
85
+ metadata :
86
+ name : special-pdb
87
+ namespace : {{ TNF_EXAMPLE_CNF_NAMESPACE }}
88
+ spec :
89
+ minAvailable : 1
90
+ selector :
91
+ matchLabels :
92
+ app : special-dp
You can’t perform that action at this time.
0 commit comments