mkdir /tmp/$dirname && cd /tmp/$dirname
-cp /usr/lib/python3/dist-packages/osm_lcm/n2vc/post-renderer-scripts/nodeSelector/kustomization.yaml .
-
-cp /usr/lib/python3/dist-packages/osm_lcm/n2vc/post-renderer-scripts/nodeSelector/nodeSelector-deployment-patch.yaml .
+if [ -f /usr/lib/python3/dist-packages/osm_lcm/n2vc/post-renderer-scripts/nodeSelector/kustomization.yaml ]; then
+ cp /usr/lib/python3/dist-packages/osm_lcm/n2vc/post-renderer-scripts/nodeSelector/*.yaml .
+elif [ -f /app/osm_lcm/n2vc/post-renderer-scripts/nodeSelector/kustomization.yaml ]; then
+ cp /app/osm_lcm/n2vc/post-renderer-scripts/nodeSelector/*.yaml .
+else
+ echo "kustomization.yaml not found in expected locations."
+ exit 1
+fi
cat <&0 > all.yaml
echo -e "$content" >> nodeSelector-deployment-patch.yaml
-kubectl kustomize && cd .. && rm -r /tmp/$dirname
\ No newline at end of file
+kubectl kustomize && cd .. && rm -r /tmp/$dirname
mkdir /tmp/$dirname && cd /tmp/$dirname
-cp /usr/lib/python3/dist-packages/osm_lcm/n2vc/post-renderer-scripts/podLabels/kustomization.yaml .
+if [ -f /usr/lib/python3/dist-packages/osm_lcm/n2vc/post-renderer-scripts/podLabels/kustomization.yaml ]; then
+ cp /usr/lib/python3/dist-packages/osm_lcm/n2vc/post-renderer-scripts/podLabels/kustomization.yaml .
+elif [ -f /app/osm_lcm/n2vc/post-renderer-scripts/podLabels/kustomization.yaml ]; then
+ cp /app/osm_lcm/n2vc/post-renderer-scripts/podLabels/kustomization.yaml .
+else
+ echo "kustomization.yaml not found in expected locations."
+ exit 1
+fi
cat <&0 > all.yaml
# Add content to the file
echo -e "\n$content" >> kustomization.yaml
-kubectl kustomize && cd .. && rm -r /tmp/$dirname
\ No newline at end of file
+kubectl kustomize && cd .. && rm -r /tmp/$dirname