From 0955a6aefa660c490fe39537f8140147a801e896 Mon Sep 17 00:00:00 2001 From: Yi Feng Date: Tue, 12 Apr 2022 15:35:52 +0900 Subject: [PATCH] Update doc for deploying CNF Update usage guide on the priority of namespaces used by tacker when deploying CNF and how to specify the target namespace in InstantiateVnfRequest to deploy CNF on Kubernetes VIM. Implements: blueprint k8s-namespace Change-Id: I6030582c9929e321058ec3f6307d7b76d99b600a --- .../etsi_containerized_vnf_usage_guide.rst | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/doc/source/user/etsi_containerized_vnf_usage_guide.rst b/doc/source/user/etsi_containerized_vnf_usage_guide.rst index 01871fff7..3ef1287f3 100644 --- a/doc/source/user/etsi_containerized_vnf_usage_guide.rst +++ b/doc/source/user/etsi_containerized_vnf_usage_guide.rst @@ -664,7 +664,27 @@ VIM information should be provided while instantiating a containerized VNF. Here is an example of json file: `additionalParams` includes path of Kubernetes resource definition file, -notice that `lcm-kubernetes-def-files` should be a list. +notice that `lcm-kubernetes-def-files` should be a list. The user can also +specify the `namespace` where the resource needs to be deployed. + +.. note:: + + The `namespace` at the time of instantiate is determined by the + following priority. + + 1. If the `namespace` is specified in the additionalParams + of the instantiate request, the specified `namespace` is used. + 2. If `namespace` is not specified by the method described + in 1, use the `namespace` under metadata defined in + :ref:`Create a Kubernetes Object File` + 3. If namespace is not specified by the method described in 2, use + `default`. + +.. warning:: + + If the multiple namespaces are specified in the manifest by the + method described in 2, instantiate will fail. + The vimConnectionInfo includes id whose value can be defined autonomously, vimId and vimType. @@ -676,7 +696,8 @@ vimId and vimType. "additionalParams": { "lcm-kubernetes-def-files": [ "Files/kubernetes/deployment.yaml" - ] + ], + "namespace": "default" }, "vimConnectionInfo": [ { @@ -780,6 +801,22 @@ When the READY is 1/1, indicate the deployment is created successfully. NAME READY UP-TO-DATE AVAILABLE AGE curry-probe-test001 1/1 1 1 8m43s +If we want to check whether the resource is deployed in the default namespace, +we can append `-A` to the command line. + +.. code-block:: console + + $ kubectl get deploy -A + NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE + default curry-probe-test001 1/1 1 1 8m43s + kube-system calico-kube-controllers 1/1 1 1 5d18h + +.. note:: + + If a value other than `default` is specified for the namespace + during instantiate, the deployed resources will be instantiated + in the corresponding namespace. + References ========== .. [#first] https://docs.openstack.org/tacker/latest/install/kubernetes_vim_installation.html