From 2cf53dbd605ab29f73e2aa2750aba82682ce7293 Mon Sep 17 00:00:00 2001 From: Nathan Skrzypczak Date: Thu, 6 Jul 2023 11:07:37 +0200 Subject: [PATCH] WIP: yaml: remove _NODE_[12]_ subst Signed-off-by: Nathan Skrzypczak --- test/scripts/test.sh | 4 ++-- test/yaml/envoy/test.yaml | 2 -- test/yaml/iperf/test.yaml | 4 ---- test/yaml/iperf/test_single.yaml | 2 -- test/yaml/iperf/test_v4.yaml | 4 ---- test/yaml/iperf/test_v6.yaml | 4 ---- test/yaml/iperf3-vcl/test.yaml | 4 ---- test/yaml/iperf3/test.yaml | 2 -- test/yaml/metallb/test_metallb.yaml | 1 - test/yaml/nginx/test.yaml | 1 - test/yaml/scalepods/test.yaml | 1 - test/yaml/simple-vcl/test.yaml | 2 -- test/yaml/testpmd/test.yaml | 1 - test/yaml/trex/test.yaml | 1 - test/yaml/wrk/test.yaml | 1 - 15 files changed, 2 insertions(+), 32 deletions(-) diff --git a/test/scripts/test.sh b/test/scripts/test.sh index 3cd59684..22ffe5a3 100755 --- a/test/scripts/test.sh +++ b/test/scripts/test.sh @@ -110,7 +110,7 @@ test_apply () k_create_namespace $NAME export VPP_DATAPLANE_DIRECTORY=$VPP_DATAPLANE_DIRECTORY - sed -e "s/_NODE_1_/${NODES[0]}/" -e "s/_NODE_2_/${NODES[1]}/" $YAML_FILE | \ + cat $YAML_FILE | \ envsubst | \ kubectl apply -f - } @@ -128,7 +128,7 @@ test_delete () echo "${YAML_FILE} doesnt exist" exit 1 fi - sed -e "s/_NODE_1_/${NODES[0]}/" -e "s/_NODE_2_/${NODES[1]}/" $YAML_FILE | \ + cat $YAML_FILE | \ kubectl delete -f - k_delete_namespace $1 } diff --git a/test/yaml/envoy/test.yaml b/test/yaml/envoy/test.yaml index 83770712..c685e8a8 100644 --- a/test/yaml/envoy/test.yaml +++ b/test/yaml/envoy/test.yaml @@ -23,7 +23,6 @@ spec: name: envoyyaml - mountPath: /etc/vpp/vcl.conf name: vclconf - nodeName: _NODE_1_ volumes: - name: hostuser hostPath: @@ -68,7 +67,6 @@ spec: name: hostuser - mountPath: /etc/envoy/envoy.yaml name: envoyyaml - nodeName: _NODE_1_ volumes: - name: hostuser hostPath: diff --git a/test/yaml/iperf/test.yaml b/test/yaml/iperf/test.yaml index 2d66fb47..7af3f03d 100644 --- a/test/yaml/iperf/test.yaml +++ b/test/yaml/iperf/test.yaml @@ -29,7 +29,6 @@ spec: initialDelaySeconds: 3 periodSeconds: 5 timeoutSeconds: 3 - nodeName: _NODE_1_ --- apiVersion: apps/v1 kind: ReplicaSet @@ -61,7 +60,6 @@ spec: initialDelaySeconds: 3 periodSeconds: 5 timeoutSeconds: 3 - nodeName: _NODE_1_ --- apiVersion: v1 kind: Service @@ -193,7 +191,6 @@ spec: ports: - containerPort: 5001 - containerPort: 5003 - nodeName: _NODE_2_ --- apiVersion: v1 kind: Pod @@ -208,4 +205,3 @@ spec: ports: - containerPort: 5001 - containerPort: 5003 - nodeName: _NODE_1_ diff --git a/test/yaml/iperf/test_single.yaml b/test/yaml/iperf/test_single.yaml index eae19c97..19faff12 100644 --- a/test/yaml/iperf/test_single.yaml +++ b/test/yaml/iperf/test_single.yaml @@ -23,7 +23,6 @@ spec: ports: - containerPort: 5001 - containerPort: 5003 - nodeName: _NODE_1_ --- apiVersion: v1 kind: Service @@ -54,4 +53,3 @@ spec: ports: - containerPort: 5001 - containerPort: 5003 - nodeName: _NODE_2_ diff --git a/test/yaml/iperf/test_v4.yaml b/test/yaml/iperf/test_v4.yaml index 5cc7ee04..590f92e1 100644 --- a/test/yaml/iperf/test_v4.yaml +++ b/test/yaml/iperf/test_v4.yaml @@ -29,7 +29,6 @@ spec: initialDelaySeconds: 3 periodSeconds: 5 timeoutSeconds: 3 - nodeName: _NODE_1_ --- apiVersion: apps/v1 kind: ReplicaSet @@ -61,7 +60,6 @@ spec: initialDelaySeconds: 3 periodSeconds: 5 timeoutSeconds: 3 - nodeName: _NODE_1_ --- apiVersion: v1 kind: Service @@ -150,7 +148,6 @@ spec: ports: - containerPort: 5001 - containerPort: 5003 - nodeName: _NODE_2_ --- apiVersion: v1 kind: Pod @@ -165,4 +162,3 @@ spec: ports: - containerPort: 5001 - containerPort: 5003 - nodeName: _NODE_1_ diff --git a/test/yaml/iperf/test_v6.yaml b/test/yaml/iperf/test_v6.yaml index 5feb1a38..b95dae5e 100644 --- a/test/yaml/iperf/test_v6.yaml +++ b/test/yaml/iperf/test_v6.yaml @@ -29,7 +29,6 @@ spec: initialDelaySeconds: 3 periodSeconds: 5 timeoutSeconds: 3 - nodeName: _NODE_1_ --- apiVersion: apps/v1 kind: ReplicaSet @@ -61,7 +60,6 @@ spec: initialDelaySeconds: 3 periodSeconds: 5 timeoutSeconds: 3 - nodeName: _NODE_1_ --- apiVersion: v1 kind: Service @@ -151,7 +149,6 @@ spec: ports: - containerPort: 5001 - containerPort: 5003 - nodeName: _NODE_2_ --- apiVersion: v1 kind: Pod @@ -166,4 +163,3 @@ spec: ports: - containerPort: 5001 - containerPort: 5003 - nodeName: _NODE_1_ diff --git a/test/yaml/iperf3-vcl/test.yaml b/test/yaml/iperf3-vcl/test.yaml index f59e98e8..5de073a5 100644 --- a/test/yaml/iperf3-vcl/test.yaml +++ b/test/yaml/iperf3-vcl/test.yaml @@ -24,7 +24,6 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 5201 - nodeName: _NODE_1_ --- apiVersion: v1 kind: Service @@ -52,7 +51,6 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 5201 - nodeName: _NODE_2_ --- apiVersion: v1 kind: Pod @@ -68,5 +66,3 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 5201 - nodeName: _NODE_1_ - \ No newline at end of file diff --git a/test/yaml/iperf3/test.yaml b/test/yaml/iperf3/test.yaml index cd28a377..7e37f04e 100644 --- a/test/yaml/iperf3/test.yaml +++ b/test/yaml/iperf3/test.yaml @@ -33,7 +33,6 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 5201 - nodeName: _NODE_1_ --- apiVersion: v1 @@ -67,4 +66,3 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 5201 - nodeName: _NODE_2_ diff --git a/test/yaml/metallb/test_metallb.yaml b/test/yaml/metallb/test_metallb.yaml index c2c067ef..f06677a3 100644 --- a/test/yaml/metallb/test_metallb.yaml +++ b/test/yaml/metallb/test_metallb.yaml @@ -33,7 +33,6 @@ metadata: subsets: - addresses: - ip: 10.10.186.88 - nodeName: node1 ports: - port: 9376 --- diff --git a/test/yaml/nginx/test.yaml b/test/yaml/nginx/test.yaml index 0b3603a0..23f98d86 100644 --- a/test/yaml/nginx/test.yaml +++ b/test/yaml/nginx/test.yaml @@ -22,7 +22,6 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 80 - nodeName: _NODE_1_ --- apiVersion: v1 kind: Service diff --git a/test/yaml/scalepods/test.yaml b/test/yaml/scalepods/test.yaml index 6d3182c3..4c9cb5b1 100644 --- a/test/yaml/scalepods/test.yaml +++ b/test/yaml/scalepods/test.yaml @@ -22,7 +22,6 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 80 - nodeName: _NODE_1_ --- apiVersion: v1 kind: Service diff --git a/test/yaml/simple-vcl/test.yaml b/test/yaml/simple-vcl/test.yaml index e7f740e4..fcf06f4b 100644 --- a/test/yaml/simple-vcl/test.yaml +++ b/test/yaml/simple-vcl/test.yaml @@ -11,7 +11,6 @@ spec: - name: simple-client image: calicovpp/test-simple-vcl imagePullPolicy: IfNotPresent - nodeName: _NODE_2_ --- apiVersion: v1 kind: Pod @@ -25,4 +24,3 @@ spec: - name: simple-client image: calicovpp/test-simple-vcl imagePullPolicy: IfNotPresent - nodeName: _NODE_1_ diff --git a/test/yaml/testpmd/test.yaml b/test/yaml/testpmd/test.yaml index 58234179..720c6cc7 100644 --- a/test/yaml/testpmd/test.yaml +++ b/test/yaml/testpmd/test.yaml @@ -24,7 +24,6 @@ spec: volumeMounts: - mountPath: /hugepages name: hugepage - nodeName: _NODE_1_ volumes: - name: hugepage emptyDir: diff --git a/test/yaml/trex/test.yaml b/test/yaml/trex/test.yaml index 65f7700d..cf8e4663 100644 --- a/test/yaml/trex/test.yaml +++ b/test/yaml/trex/test.yaml @@ -22,7 +22,6 @@ spec: volumeMounts: - mountPath: /hugepages name: hugepage - nodeName: _NODE_2_ volumes: - name: hugepage emptyDir: diff --git a/test/yaml/wrk/test.yaml b/test/yaml/wrk/test.yaml index 121b55bf..94acb4fa 100644 --- a/test/yaml/wrk/test.yaml +++ b/test/yaml/wrk/test.yaml @@ -10,5 +10,4 @@ spec: imagePullPolicy: IfNotPresent securityContext: privileged: true - nodeName: _NODE_2_ --- \ No newline at end of file