From 3a3e9fcdd1141928473b5f793e224204eafe8f1b Mon Sep 17 00:00:00 2001 From: Lukasz Rajewski Date: Fri, 9 Oct 2020 20:59:32 +0200 Subject: vFW CDS CNF CBA with native k8s profile upload vFW CDS CNF CBA with native k8s profile upload Change-Id: Ic3357982af534ea261d4d617e050dc33bc339645 Issue-ID: INT-1658 Signed-off-by: Lukasz Rajewski --- .../cba/Templates/base_template-mapping.json | 66 ++++++++++++++++++---- .../cba/Templates/base_template-template.vtl | 4 -- .../k8s-profiles/ssh-service-mapping.json | 14 ----- .../k8s-profiles/ssh-service-template.vtl | 18 ------ .../vfw-cnf-cds-vpkg-profile/manifest.yaml | 7 +++ .../vfw-cnf-cds-vpkg-profile/override_values.yaml | 1 + .../ssh-service-mapping.json | 14 +++++ .../ssh-service-template.yaml.vtl | 18 ++++++ .../templates/cba/Templates/vfw-mapping.json | 66 ++++++++++++++++++---- .../templates/cba/Templates/vfw-template.vtl | 4 -- .../templates/cba/Templates/vnf-mapping.json | 12 ---- .../templates/cba/Templates/vnf-template.vtl | 8 --- .../templates/cba/Templates/vpkg-mapping.json | 66 ++++++++++++++++++---- .../templates/cba/Templates/vpkg-template.vtl | 4 -- .../templates/cba/Templates/vsn-mapping.json | 66 ++++++++++++++++++---- .../templates/cba/Templates/vsn-template.vtl | 4 -- 16 files changed, 260 insertions(+), 112 deletions(-) delete mode 100644 heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-mapping.json delete mode 100644 heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-template.vtl create mode 100644 heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/manifest.yaml create mode 100644 heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/override_values.yaml create mode 100644 heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/ssh-service-mapping.json create mode 100644 heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/ssh-service-template.yaml.vtl (limited to 'heat/vFW_CNF_CDS/templates/cba/Templates') diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-mapping.json index dd49ad28..53cd0f71 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-mapping.json @@ -138,29 +138,73 @@ { "name": "k8s-rb-profile-namespace", "property": { - "description": "K8s namespace to create helm chart for specified profile", - "type": "string" + "description": "K8s namespace to create helm chart for specified RB profile", + "type": "string", + "required": false, + "default": "default" }, "input-param": false, "dictionary-name": "k8s-rb-profile-namespace", "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ] + "dependencies": [] }, { "name": "k8s-rb-profile-name", "property": { - "description": "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.", - "type": "string" + "description": "RB Profile name used in k8s plugin to identify Helm chart(s) where this mapping is providing override values.", + "type": "string", + "required": false, + "default": "default" }, "input-param": false, "dictionary-name": "k8s-rb-profile-name", - "dictionary-source": "sdnc", + "dictionary-source": "default", + "dependencies": [] + }, + { + "name": "k8s-rb-definition-name", + "property": { + "description": "RB Name identifier of Helm chart(s) in k8s plugin", + "type": "string", + "required": false, + "metadata": { + "transform-template": "${vf-module-model-invariant-uuid}" + } + }, + "input-param": false, + "dictionary-name": "k8s-rb-definition-name", + "dictionary-source": "default", "dependencies": [ - "service-instance-id", - "vnf-id" + "vf-module-model-invariant-uuid" ] + }, + { + "name": "k8s-rb-definition-version", + "property": { + "description": "RB Version identifier of Helm chart(s) in k8s plugin", + "type": "string", + "required": false, + "metadata": { + "transform-template": "${vf-module-model-version}" + } + }, + "input-param": false, + "dictionary-name": "k8s-rb-definition-version", + "dictionary-source": "default", + "dependencies": [ + "vf-module-model-version" + ] + }, + { + "name": "k8s-rb-profile-source", + "property": { + "description": "The source folder or file relative to 'Templates/k8s-profiles' folder", + "type": "string", + "required": true + }, + "input-param": false, + "dictionary-name": "k8s-rb-profile-source", + "dictionary-source": "default", + "dependencies": [] } ] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl index 401a0bd7..a6bc57b5 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl @@ -107,10 +107,6 @@ "param-name": "k8s-rb-profile-name", "param-value": "${k8s-rb-profile-name}" }, - { - "param-name": "k8s-rb-profile-namespace", - "param-value": "${k8s-rb-profile-namespace}" - }, { "param-name": "int_private1_subnet_id", "param-value": "unprotected-network-subnet-1" diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-mapping.json deleted file mode 100644 index 34be0c48..00000000 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-mapping.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "name": "vpg-management-port", - "property": { - "description": "The number of node port for ssh service of vpg. 0 means that ssh service will not be exposed", - "type": "string", - "default": "0" - }, - "input-param": false, - "dictionary-name": "vpg-management-port", - "dictionary-source": "default", - "dependencies": [] - } -] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-template.vtl deleted file mode 100644 index 3dc2eb5f..00000000 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-template.vtl +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.vpg_name_0 }}-ssh - labels: - vnf-name: {{ .Values.vnf_name }} - vf-module-name: {{ .Values.vpg_name_0 }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }} -spec: - type: NodePort - ports: - - port: 22 - nodePort: ${vpg-management-port} - selector: - vf-module-name: {{ .Values.vpg_name_0 }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }} diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/manifest.yaml b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/manifest.yaml new file mode 100644 index 00000000..adb9f86c --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/manifest.yaml @@ -0,0 +1,7 @@ +--- +version: v1 +type: + values: "override_values.yaml" + configresource: + - filepath: ssh-service-template.yaml + chartpath: vpkg/templates/ssh-service-template.yaml diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/override_values.yaml b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/override_values.yaml new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/override_values.yaml @@ -0,0 +1 @@ + diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/ssh-service-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/ssh-service-mapping.json new file mode 100644 index 00000000..47db31da --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/ssh-service-mapping.json @@ -0,0 +1,14 @@ +[ + { + "name": "vpg-management-port", + "property": { + "description": "The number of node port for ssh service of vpg", + "type": "integer", + "default": "0" + }, + "input-param": false, + "dictionary-name": "vpg-management-port", + "dictionary-source": "default", + "dependencies": [] + } +] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/ssh-service-template.yaml.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/ssh-service-template.yaml.vtl new file mode 100644 index 00000000..3dc2eb5f --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/ssh-service-template.yaml.vtl @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.vpg_name_0 }}-ssh + labels: + vnf-name: {{ .Values.vnf_name }} + vf-module-name: {{ .Values.vpg_name_0 }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +spec: + type: NodePort + ports: + - port: 22 + nodePort: ${vpg-management-port} + selector: + vf-module-name: {{ .Values.vpg_name_0 }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json index 2eae129f..ff3dfd8e 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json @@ -138,29 +138,73 @@ { "name": "k8s-rb-profile-namespace", "property": { - "description": "K8s namespace to create helm chart for specified profile", - "type": "string" + "description": "K8s namespace to create helm chart for specified RB profile", + "type": "string", + "required": false, + "default": "default" }, "input-param": false, "dictionary-name": "k8s-rb-profile-namespace", "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ] + "dependencies": [] }, { "name": "k8s-rb-profile-name", "property": { - "description": "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.", - "type": "string" + "description": "RB Profile name used in k8s plugin to identify Helm chart(s) where this mapping is providing override values.", + "type": "string", + "required": false, + "default": "default" }, "input-param": false, "dictionary-name": "k8s-rb-profile-name", - "dictionary-source": "sdnc", + "dictionary-source": "default", + "dependencies": [] + }, + { + "name": "k8s-rb-definition-name", + "property": { + "description": "RB Name identifier of Helm chart(s) in k8s plugin", + "type": "string", + "required": false, + "metadata": { + "transform-template": "${vf-module-model-invariant-uuid}" + } + }, + "input-param": false, + "dictionary-name": "k8s-rb-definition-name", + "dictionary-source": "default", "dependencies": [ - "service-instance-id", - "vnf-id" + "vf-module-model-invariant-uuid" ] + }, + { + "name": "k8s-rb-definition-version", + "property": { + "description": "RB Version identifier of Helm chart(s) in k8s plugin", + "type": "string", + "required": false, + "metadata": { + "transform-template": "${vf-module-model-version}" + } + }, + "input-param": false, + "dictionary-name": "k8s-rb-definition-version", + "dictionary-source": "default", + "dependencies": [ + "vf-module-model-version" + ] + }, + { + "name": "k8s-rb-profile-source", + "property": { + "description": "The source folder or file relative to 'Templates/k8s-profiles' folder", + "type": "string", + "required": true + }, + "input-param": false, + "dictionary-name": "k8s-rb-profile-source", + "dictionary-source": "default", + "dependencies": [] } ] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl index d65b6f92..55f9451c 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl @@ -119,10 +119,6 @@ { "param-name": "k8s-rb-profile-name", "param-value": "${k8s-rb-profile-name}" - }, - { - "param-name": "k8s-rb-profile-namespace", - "param-value": "${k8s-rb-profile-namespace}" } ] } diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json index bee80d14..c6411d71 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json @@ -159,18 +159,6 @@ "dependencies": [], "version": 0 }, - { - "name": "k8s-rb-profile-name", - "property": { - "description": "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.", - "type": "string", - "default": "vfw-cnf-cds-base-profile" - }, - "input-param": false, - "dictionary-name": "k8s-rb-profile-name", - "dictionary-source": "default", - "dependencies": [] - }, { "name": "k8s-rb-profile-namespace", "property": { diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-template.vtl index 7acdc544..9e23665f 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-template.vtl @@ -254,14 +254,6 @@ { "param-name": "demo_artifacts_version", "param-value": "${demo_artifacts_version}" - }, - { - "param-name": "k8s-rb-profile-name", - "param-value": "${k8s-rb-profile-name}" - }, - { - "param-name": "k8s-rb-profile-namespace", - "param-value": "${k8s-rb-profile-namespace}" } ] } diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json index 4a1b9150..86217c16 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json @@ -138,29 +138,73 @@ { "name": "k8s-rb-profile-namespace", "property": { - "description": "K8s namespace to create helm chart for specified profile", - "type": "string" + "description": "K8s namespace to create helm chart for specified RB profile", + "type": "string", + "required": false, + "default": "default" }, "input-param": false, "dictionary-name": "k8s-rb-profile-namespace", "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ] + "dependencies": [] }, { "name": "k8s-rb-profile-name", "property": { - "description": "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.", - "type": "string" + "description": "RB Profile name used in k8s plugin to identify Helm chart(s) where this mapping is providing override values.", + "type": "string", + "required": false, + "default": "default" }, "input-param": false, "dictionary-name": "k8s-rb-profile-name", - "dictionary-source": "sdnc", + "dictionary-source": "default", + "dependencies": [] + }, + { + "name": "k8s-rb-definition-name", + "property": { + "description": "RB Name identifier of Helm chart(s) in k8s plugin", + "type": "string", + "required": false, + "metadata": { + "transform-template": "${vf-module-model-invariant-uuid}" + } + }, + "input-param": false, + "dictionary-name": "k8s-rb-definition-name", + "dictionary-source": "default", "dependencies": [ - "service-instance-id", - "vnf-id" + "vf-module-model-invariant-uuid" ] + }, + { + "name": "k8s-rb-definition-version", + "property": { + "description": "RB Version identifier of Helm chart(s) in k8s plugin", + "type": "string", + "required": false, + "metadata": { + "transform-template": "${vf-module-model-version}" + } + }, + "input-param": false, + "dictionary-name": "k8s-rb-definition-version", + "dictionary-source": "default", + "dependencies": [ + "vf-module-model-version" + ] + }, + { + "name": "k8s-rb-profile-source", + "property": { + "description": "The source folder or file relative to 'Templates/k8s-profiles' folder", + "type": "string", + "required": true + }, + "input-param": false, + "dictionary-name": "k8s-rb-profile-source", + "dictionary-source": "default", + "dependencies": [] } ] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl index 18511d54..2a6b7985 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl @@ -119,10 +119,6 @@ { "param-name": "k8s-rb-profile-name", "param-value": "${k8s-rb-profile-name}" - }, - { - "param-name": "k8s-rb-profile-namespace", - "param-value": "${k8s-rb-profile-namespace}" } ] } diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json index 3d3bbd22..edd834c5 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json @@ -138,29 +138,73 @@ { "name": "k8s-rb-profile-namespace", "property": { - "description": "K8s namespace to create helm chart for specified profile", - "type": "string" + "description": "K8s namespace to create helm chart for specified RB profile", + "type": "string", + "required": false, + "default": "default" }, "input-param": false, "dictionary-name": "k8s-rb-profile-namespace", "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ] + "dependencies": [] }, { "name": "k8s-rb-profile-name", "property": { - "description": "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.", - "type": "string" + "description": "RB Profile name used in k8s plugin to identify Helm chart(s) where this mapping is providing override values.", + "type": "string", + "required": false, + "default": "default" }, "input-param": false, "dictionary-name": "k8s-rb-profile-name", - "dictionary-source": "sdnc", + "dictionary-source": "default", + "dependencies": [] + }, + { + "name": "k8s-rb-definition-name", + "property": { + "description": "RB Name identifier of Helm chart(s) in k8s plugin", + "type": "string", + "required": false, + "metadata": { + "transform-template": "${vf-module-model-invariant-uuid}" + } + }, + "input-param": false, + "dictionary-name": "k8s-rb-definition-name", + "dictionary-source": "default", "dependencies": [ - "service-instance-id", - "vnf-id" + "vf-module-model-invariant-uuid" ] + }, + { + "name": "k8s-rb-definition-version", + "property": { + "description": "RB Version identifier of Helm chart(s) in k8s plugin", + "type": "string", + "required": false, + "metadata": { + "transform-template": "${vf-module-model-version}" + } + }, + "input-param": false, + "dictionary-name": "k8s-rb-definition-version", + "dictionary-source": "default", + "dependencies": [ + "vf-module-model-version" + ] + }, + { + "name": "k8s-rb-profile-source", + "property": { + "description": "The source folder or file relative to 'Templates/k8s-profiles' folder", + "type": "string", + "required": true + }, + "input-param": false, + "dictionary-name": "k8s-rb-profile-source", + "dictionary-source": "default", + "dependencies": [] } ] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl index 3e2d8c1c..4768ab80 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl @@ -119,10 +119,6 @@ { "param-name": "k8s-rb-profile-name", "param-value": "${k8s-rb-profile-name}" - }, - { - "param-name": "k8s-rb-profile-namespace", - "param-value": "${k8s-rb-profile-namespace}" } ] } -- cgit 1.2.3-korg