Move N2VC code from N2VC repo to LCM

Change-Id: I2173a2d0ce359081bc2995dc6ce20ea99a82eb15
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/osm_lcm/n2vc/post-renderer-scripts/podLabels/kustomization.yaml b/osm_lcm/n2vc/post-renderer-scripts/podLabels/kustomization.yaml
new file mode 100644
index 0000000..358978b
--- /dev/null
+++ b/osm_lcm/n2vc/post-renderer-scripts/podLabels/kustomization.yaml
@@ -0,0 +1,23 @@
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+# Default values for osm.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+resources:
+- all.yaml
\ No newline at end of file
diff --git a/osm_lcm/n2vc/post-renderer-scripts/podLabels/podLabels b/osm_lcm/n2vc/post-renderer-scripts/podLabels/podLabels
new file mode 100755
index 0000000..d6d2870
--- /dev/null
+++ b/osm_lcm/n2vc/post-renderer-scripts/podLabels/podLabels
@@ -0,0 +1,42 @@
+#!/bin/bash
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+# Default values for osm.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+dirname="podlabels-"$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13)
+
+mkdir /tmp/$dirname && cd /tmp/$dirname
+
+cp /usr/lib/python3/dist-packages/n2vc/post-renderer-scripts/podLabels/kustomization.yaml .
+
+cat <&0 > all.yaml
+
+IFS=' ' read -r -a labels <<< "$1"
+content="commonLabels:"
+for label in "${labels[@]}"; do
+    key=$(echo "$label" | cut -d':' -f1)
+    value=$(echo "$label" | cut -d':' -f2)
+    content="$content
+  $key: $value"
+done
+
+# Add content to the file
+echo -e "\n$content" >> kustomization.yaml
+
+kubectl kustomize && cd .. && rm -r /tmp/$dirname
\ No newline at end of file