From f719adfa8970d2e530b0303889d2bbee7cf859db Mon Sep 17 00:00:00 2001 From: Maros Ondrejicka Date: Tue, 20 Dec 2022 15:10:50 +0100 Subject: hs-test: use anchors in yaml config files Volumes can be referenced with anchors to reduce text duplication and to explicitly show which containers share a volume. Type: test Signed-off-by: Maros Ondrejicka Change-Id: Id408a78262573b3faf2257c32bfa569eca2e2049 --- extras/hs-test/topo-containers/2peerVeth.yaml | 14 ++++++++------ extras/hs-test/topo-containers/ns.yaml | 7 ++++--- extras/hs-test/topo-containers/single.yaml | 9 +++++---- 3 files changed, 17 insertions(+), 13 deletions(-) (limited to 'extras/hs-test/topo-containers') diff --git a/extras/hs-test/topo-containers/2peerVeth.yaml b/extras/hs-test/topo-containers/2peerVeth.yaml index 8262232eff8..246e5cac1bd 100644 --- a/extras/hs-test/topo-containers/2peerVeth.yaml +++ b/extras/hs-test/topo-containers/2peerVeth.yaml @@ -1,31 +1,33 @@ --- volumes: - - server-share - - client-share + - volume: &server-vol + host-dir: server-share + - volume: &client-vol + host-dir: client-share containers: - name: "server-vpp" volumes: - - host-dir: "server-share" + - <<: *server-vol container-dir: "/tmp/server-share" is-default-work-dir: true - host-dir: "/tmp/server" container-dir: "/tmp/server" - name: "client-vpp" volumes: - - host-dir: "client-share" + - <<: *client-vol container-dir: "/tmp/client-share" is-default-work-dir: true - host-dir: "/tmp/client" container-dir: "/tmp/client" - name: "server-application" volumes: - - host-dir: "server-share" + - <<: *server-vol container-dir: "/tmp/server-share" is-default-work-dir: true - name: "client-application" volumes: - - host-dir: "client-share" + - <<: *client-vol container-dir: "/tmp/client-share" is-default-work-dir: true diff --git a/extras/hs-test/topo-containers/ns.yaml b/extras/hs-test/topo-containers/ns.yaml index 2cb4fdc80f4..bdba5605e87 100644 --- a/extras/hs-test/topo-containers/ns.yaml +++ b/extras/hs-test/topo-containers/ns.yaml @@ -1,19 +1,20 @@ --- volumes: - - shared-vol + - volume: &shared-vol + host-dir: shared-vol # $HST_DIR will be replaced during runtime by path to hs-test directory containers: - name: "vpp" volumes: - - host-dir: "shared-vol" + - <<: *shared-vol container-dir: "/tmp/vpp" is-default-work-dir: true - name: "envoy" volumes: - host-dir: "$HST_DIR/envoy/proxy.yaml" container-dir: "/etc/envoy/envoy.yaml" - - host-dir: "shared-vol" + - <<: *shared-vol container-dir: "/tmp/vpp-envoy" is-default-work-dir: true - host-dir: "$HST_DIR/envoy" diff --git a/extras/hs-test/topo-containers/single.yaml b/extras/hs-test/topo-containers/single.yaml index e0fea70d50d..9ecdc904d4d 100644 --- a/extras/hs-test/topo-containers/single.yaml +++ b/extras/hs-test/topo-containers/single.yaml @@ -1,17 +1,18 @@ --- volumes: - - shared-vol + - volume: &shared-vol + host-dir: shared-vol containers: - name: "vpp" volumes: - - host-dir: "shared-vol" + - <<: *shared-vol container-dir: "/tmp/vpp" is-default-work-dir: true - name: "nginx" volumes: - - host-dir: "shared-vol" + - <<: *shared-vol container-dir: "/tmp/nginx" is-default-work-dir: true image: "hs-test/nginx-ldp" - is-optional: true \ No newline at end of file + is-optional: true -- cgit 1.2.3-korg