diff --git a/charts/xrd-common/Chart.yaml b/charts/xrd-common/Chart.yaml index 1372f89..f3805a0 100644 --- a/charts/xrd-common/Chart.yaml +++ b/charts/xrd-common/Chart.yaml @@ -8,4 +8,4 @@ keywords: - xrd sources: - https://github.com/ios-xr/xrd-helm -version: 1.1.0-beta.0 +version: 1.1.0-beta.1 diff --git a/charts/xrd-common/templates/_network-attachments.tpl b/charts/xrd-common/templates/_network-attachments.tpl index e00125c..99167fb 100644 --- a/charts/xrd-common/templates/_network-attachments.tpl +++ b/charts/xrd-common/templates/_network-attachments.tpl @@ -23,6 +23,7 @@ spec: config: |- { "cniVersion": "0.3.1", + "name": "{{ include "xrd.fullname" $ }}-{{ $cniIndex }}", "plugins": [ {{- $intf.config | toPrettyJson | nindent 8 }} ] diff --git a/charts/xrd-control-plane/Chart.yaml b/charts/xrd-control-plane/Chart.yaml index 757887d..f89143a 100644 --- a/charts/xrd-control-plane/Chart.yaml +++ b/charts/xrd-control-plane/Chart.yaml @@ -8,8 +8,8 @@ keywords: - xrd sources: - https://github.com/ios-xr/xrd-helm -version: 1.1.0-beta.0 +version: 1.1.0-beta.1 dependencies: - name: xrd-common - version: 1.1.0-beta.0 + version: 1.1.0-beta.1 repository: "file://../xrd-common" diff --git a/charts/xrd-vrouter/Chart.yaml b/charts/xrd-vrouter/Chart.yaml index 8184d7c..8b6e15f 100644 --- a/charts/xrd-vrouter/Chart.yaml +++ b/charts/xrd-vrouter/Chart.yaml @@ -8,8 +8,8 @@ keywords: - xrd sources: - https://github.com/ios-xr/xrd-helm -version: 1.1.0-beta.0 +version: 1.1.0-beta.1 dependencies: - name: xrd-common - version: 1.1.0-beta.0 + version: 1.1.0-beta.1 repository: "file://../xrd-common" diff --git a/tests/ut/xrd-control-plane/network-attachments.bats b/tests/ut/xrd-control-plane/network-attachments.bats index 8000623..342bf51 100644 --- a/tests/ut/xrd-control-plane/network-attachments.bats +++ b/tests/ut/xrd-control-plane/network-attachments.bats @@ -72,19 +72,19 @@ setup_file () { @test "Control Plane NetworkAttachmentDefinition: Check default config" { template --set-json 'interfaces=[{"type": "multus"}]' assert_query_equal '.spec.config' \ - "{\n \"cniVersion\": \"0.3.1\",\n \"plugins\": [\n null\n ]\n}" + "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"release-name-xrd-control-plane-0\",\n \"plugins\": [\n null\n ]\n}" } @test "Control Plane NetworkAttachmentDefinition: Config can be set for MGMT interfaces" { template --set-json 'mgmtInterfaces=[{"type": "multus", "config": {"foo": "bar"}}]' assert_query_equal '.spec.config'\ - "{\n \"cniVersion\": \"0.3.1\",\n \"plugins\": [\n {\n \"foo\": \"bar\"\n }\n ]\n}" + "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"release-name-xrd-control-plane-0\",\n \"plugins\": [\n {\n \"foo\": \"bar\"\n }\n ]\n}" } @test "Control Plane NetworkAttachmentDefinition: Config can be set for interfaces" { template --set-json 'interfaces=[{"type": "multus", "config": {"foo": "bar"}}]' assert_query_equal '.spec.config' \ - "{\n \"cniVersion\": \"0.3.1\",\n \"plugins\": [\n {\n \"foo\": \"bar\"\n }\n ]\n}" + "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"release-name-xrd-control-plane-0\",\n \"plugins\": [\n {\n \"foo\": \"bar\"\n }\n ]\n}" } @test "Control Plane NetworkAttachmentDefinition: No interfaces" { diff --git a/tests/ut/xrd-vrouter/network-attachments.bats b/tests/ut/xrd-vrouter/network-attachments.bats index 8f851d7..44d3e41 100644 --- a/tests/ut/xrd-vrouter/network-attachments.bats +++ b/tests/ut/xrd-vrouter/network-attachments.bats @@ -66,13 +66,13 @@ setup_file () { @test "vRouter NetworkAttachmentDefinition (multus): Check default config" { template --set-json 'mgmtInterfaces=[{"type": "multus"}]' assert_query_equal '.spec.config' \ - "{\n \"cniVersion\": \"0.3.1\",\n \"plugins\": [\n null\n ]\n}" + "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"release-name-xrd-vrouter-0\",\n \"plugins\": [\n null\n ]\n}" } @test "vRouter NetworkAttachmentDefinition (multus): Config can be set" { template --set-json 'mgmtInterfaces=[{"type": "multus", "config": {"foo": "bar"}}]' assert_query_equal '.spec.config' \ - "{\n \"cniVersion\": \"0.3.1\",\n \"plugins\": [\n {\n \"foo\": \"bar\"\n }\n ]\n}" + "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"release-name-xrd-vrouter-0\",\n \"plugins\": [\n {\n \"foo\": \"bar\"\n }\n ]\n}" } @test "vRouter NetworkAttachmentDefinition (sriov): Name consists of the release name, template name and index" { @@ -133,7 +133,7 @@ setup_file () { @test "vRouter NetworkAttachmentDefinition (sriov): Config can be set" { template --set-json 'interfaces=[{"type": "sriov", "resource": "foo", "config": {"type": "sriov"}}]' assert_query_equal '.spec.config' \ - "{\n \"cniVersion\": \"0.3.1\",\n \"plugins\": [\n {\n \"type\": \"sriov\"\n }\n ]\n}" + "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"release-name-xrd-vrouter-0\",\n \"plugins\": [\n {\n \"type\": \"sriov\"\n }\n ]\n}" } @test "vRouter NetworkAttachmentDefinition: multiple sriov interfaces can be created together" {