diff --git a/hack/templates.sh b/hack/templates.sh index 44f0e4592..e1fa62301 100755 --- a/hack/templates.sh +++ b/hack/templates.sh @@ -34,12 +34,13 @@ for type in "$TEMPLATES_DIR"/*; do if [ "$name" = "$HMC_TEMPLATES_CHART_NAME" ]; then continue; fi version=$(grep '^version:' $chart/Chart.yaml | awk '{print $2}') template_name=$name-$(echo "$version" | sed 's/^v//; s/\./-/g') + if [ "$kind" = "ProviderTemplate" ]; then file_name=$name; else file_name=$template_name; fi - cat < $TEMPLATES_OUTPUT_DIR/$name.yaml + cat < $TEMPLATES_OUTPUT_DIR/$file_name.yaml apiVersion: hmc.mirantis.com/v1alpha1 kind: $kind EOF - cat <> $TEMPLATES_OUTPUT_DIR/$name.yaml + cat <> $TEMPLATES_OUTPUT_DIR/$file_name.yaml metadata: name: $template_name annotations: diff --git a/templates/provider/hmc-templates/files/templates/aws-hosted-cp.yaml b/templates/provider/hmc-templates/files/templates/aws-hosted-cp-0-0-1.yaml similarity index 100% rename from templates/provider/hmc-templates/files/templates/aws-hosted-cp.yaml rename to templates/provider/hmc-templates/files/templates/aws-hosted-cp-0-0-1.yaml diff --git a/templates/provider/hmc-templates/files/templates/aws-standalone-cp.yaml b/templates/provider/hmc-templates/files/templates/aws-standalone-cp-0-0-1.yaml similarity index 100% rename from templates/provider/hmc-templates/files/templates/aws-standalone-cp.yaml rename to templates/provider/hmc-templates/files/templates/aws-standalone-cp-0-0-1.yaml diff --git a/templates/provider/hmc-templates/files/templates/azure-hosted-cp.yaml b/templates/provider/hmc-templates/files/templates/azure-hosted-cp-0-0-1.yaml similarity index 100% rename from templates/provider/hmc-templates/files/templates/azure-hosted-cp.yaml rename to templates/provider/hmc-templates/files/templates/azure-hosted-cp-0-0-1.yaml diff --git a/templates/provider/hmc-templates/files/templates/azure-standalone-cp.yaml b/templates/provider/hmc-templates/files/templates/azure-standalone-cp-0-0-1.yaml similarity index 100% rename from templates/provider/hmc-templates/files/templates/azure-standalone-cp.yaml rename to templates/provider/hmc-templates/files/templates/azure-standalone-cp-0-0-1.yaml diff --git a/templates/provider/hmc-templates/files/templates/ingress-nginx.yaml b/templates/provider/hmc-templates/files/templates/ingress-nginx-4-11-0.yaml similarity index 100% rename from templates/provider/hmc-templates/files/templates/ingress-nginx.yaml rename to templates/provider/hmc-templates/files/templates/ingress-nginx-4-11-0.yaml diff --git a/templates/provider/hmc-templates/files/templates/kyverno.yaml b/templates/provider/hmc-templates/files/templates/kyverno-3-2-6.yaml similarity index 100% rename from templates/provider/hmc-templates/files/templates/kyverno.yaml rename to templates/provider/hmc-templates/files/templates/kyverno-3-2-6.yaml diff --git a/templates/provider/hmc-templates/files/templates/vsphere-hosted-cp.yaml b/templates/provider/hmc-templates/files/templates/vsphere-hosted-cp-0-0-1.yaml similarity index 100% rename from templates/provider/hmc-templates/files/templates/vsphere-hosted-cp.yaml rename to templates/provider/hmc-templates/files/templates/vsphere-hosted-cp-0-0-1.yaml diff --git a/templates/provider/hmc-templates/files/templates/vsphere-standalone-cp.yaml b/templates/provider/hmc-templates/files/templates/vsphere-standalone-cp-0-0-1.yaml similarity index 100% rename from templates/provider/hmc-templates/files/templates/vsphere-standalone-cp.yaml rename to templates/provider/hmc-templates/files/templates/vsphere-standalone-cp-0-0-1.yaml