Generating kubespec in case file is absent yet

When the rally pod is created, the /artifacts/kubespec_generated.yaml
file is not created yet, so the "bash /artifacts/rally-files/init-rally.sh"
cannot create the second ("kubernetes") env.
With this fix, if the kubespec file is absent, it is generated in /artifacts
directory where the certs and key files are also created.

Related-PROD: PROD-36128

Change-Id: Idf6840a602f2f2a88f09b6246d800640917f442a
diff --git a/k8s/rally-files/init-rally.sh b/k8s/rally-files/init-rally.sh
index 0a9ab64..f18349a 100644
--- a/k8s/rally-files/init-rally.sh
+++ b/k8s/rally-files/init-rally.sh
@@ -13,13 +13,17 @@
 rally env check
 
 # Prepare rally for kubernetes
-bash /artifacts/rally-files/gen_kubespec.sh ./mos-kubeconf.yaml
 git clone https://github.com/Mirantis/rally-plugins.git
 cd rally-plugins/
 pip3 install .
 rally plugin list | grep kubernetes
 
 # Configure kubernetes
+# Check and prepare kubespec file
+if [ ! -f /artifacts/kubespec_generated.yaml ]; then
+    sudo bash /artifacts/rally-files/gen_kubespec.sh /artifacts/mos-kubeconf.yaml
+fi
+# Create kubernetes env
 rally env create --name kubernetes --spec /artifacts/kubespec_generated.yaml
 rally env check
 cd /artifacts