From 24d2a272fe883717c2c3818fdd8e53b3949d6e29 Mon Sep 17 00:00:00 2001 From: lowang-bh Date: Fri, 21 Jul 2023 08:33:43 +0800 Subject: [PATCH] use one command of helm install Signed-off-by: lowang-bh --- .gitignore | 1 - hack/generate-yaml.sh | 5 ++-- hack/local-up-volcano.sh | 1 - hack/run-e2e-kind.sh | 1 - installer/helm/chart/jobflow/Chart.yaml | 24 ------------------- installer/helm/chart/volcano/Chart.yaml | 6 ++--- .../{ => volcano/charts}/jobflow/.helmignore | 0 .../chart/volcano/charts/jobflow/Chart.yaml | 6 +++++ .../crd/bases/flow.volcano.sh_jobflows.yaml | 0 .../bases/flow.volcano.sh_jobtemplates.yaml | 0 .../chart/{ => volcano/charts}/jobflow/crd/v1 | 0 .../charts}/jobflow/templates/NOTES.txt | 0 .../charts}/jobflow/templates/_helpers.tpl | 0 .../templates/flow_v1alpha1_jobflows.yaml | 0 .../templates/flow_v1alpha1_jobtemplates.yaml | 0 15 files changed, 11 insertions(+), 33 deletions(-) delete mode 100644 installer/helm/chart/jobflow/Chart.yaml rename installer/helm/chart/{ => volcano/charts}/jobflow/.helmignore (100%) create mode 100644 installer/helm/chart/volcano/charts/jobflow/Chart.yaml rename installer/helm/chart/{ => volcano/charts}/jobflow/crd/bases/flow.volcano.sh_jobflows.yaml (100%) rename installer/helm/chart/{ => volcano/charts}/jobflow/crd/bases/flow.volcano.sh_jobtemplates.yaml (100%) rename installer/helm/chart/{ => volcano/charts}/jobflow/crd/v1 (100%) rename installer/helm/chart/{ => volcano/charts}/jobflow/templates/NOTES.txt (100%) rename installer/helm/chart/{ => volcano/charts}/jobflow/templates/_helpers.tpl (100%) rename installer/helm/chart/{ => volcano/charts}/jobflow/templates/flow_v1alpha1_jobflows.yaml (100%) rename installer/helm/chart/{ => volcano/charts}/jobflow/templates/flow_v1alpha1_jobtemplates.yaml (100%) diff --git a/.gitignore b/.gitignore index 4c4cb00b4b..6d66db0f94 100644 --- a/.gitignore +++ b/.gitignore @@ -133,5 +133,4 @@ coverage.txt vendor # helm dependency files -installer/helm/chart/volcano/charts/ installer/helm/chart/volcano/requirements.lock diff --git a/hack/generate-yaml.sh b/hack/generate-yaml.sh index b4a6478efe..446552ac75 100755 --- a/hack/generate-yaml.sh +++ b/hack/generate-yaml.sh @@ -80,7 +80,7 @@ fi # Step2. update helm templates from config dir HELM_TEMPLATES_DIR=${VK_ROOT}/installer/helm/chart/volcano/templates HELM_VOLCANO_CRD_DIR=${VK_ROOT}/installer/helm/chart/volcano/crd -HELM_JOBFLOW_CRD_DIR=${VK_ROOT}/installer/helm/chart/jobflow/crd +HELM_JOBFLOW_CRD_DIR=${VK_ROOT}/installer/helm/chart/volcano/charts/jobflow/crd VOLCANO_CRD_DIR=${VK_ROOT}/config/crd/volcano JOBFLOW_CRD_DIR=${VK_ROOT}/config/crd/jobflow echo Updating templates in $HELM_TEMPLATES_DIR @@ -124,7 +124,6 @@ fi cat ${VK_ROOT}/installer/namespace.yaml > ${DEPLOYMENT_FILE} # Volcano -${HELM_BIN_DIR}/helm dependency update ${VK_ROOT}/installer/helm/chart/volcano ${HELM_BIN_DIR}/helm template ${VK_ROOT}/installer/helm/chart/volcano --namespace volcano-system \ --name-template volcano --set basic.image_tag_version=${VOLCANO_IMAGE_TAG} --set basic.crd_version=${CRD_VERSION}\ -s templates/admission.yaml \ @@ -139,7 +138,7 @@ ${HELM_BIN_DIR}/helm template ${VK_ROOT}/installer/helm/chart/volcano --namespac >> ${DEPLOYMENT_FILE} # JobFlow -${HELM_BIN_DIR}/helm template ${VK_ROOT}/installer/helm/chart/jobflow --namespace volcano-system \ +${HELM_BIN_DIR}/helm template ${VK_ROOT}/installer/helm/chart/volcano/charts/jobflow --namespace volcano-system \ --name-template volcano --set basic.image_tag_version=${VOLCANO_IMAGE_TAG} --set basic.crd_version=${CRD_VERSION}\ -s templates/flow_v1alpha1_jobflows.yaml \ -s templates/flow_v1alpha1_jobtemplates.yaml \ diff --git a/hack/local-up-volcano.sh b/hack/local-up-volcano.sh index bee67639cc..95d6b3ab72 100755 --- a/hack/local-up-volcano.sh +++ b/hack/local-up-volcano.sh @@ -40,7 +40,6 @@ function prepare { function install-volcano { # TODO: add a graceful way waiting for all crd ready kubectl create namespace volcano-system - helm dependency build helm install volcano ${VK_ROOT}/installer/helm/chart/volcano --namespace volcano-system \ --set basic.image_tag_version=${TAG} \ --set basic.image_pull_policy=IfNotPresent diff --git a/hack/run-e2e-kind.sh b/hack/run-e2e-kind.sh index 6f0d2774fd..62173b1f2e 100755 --- a/hack/run-e2e-kind.sh +++ b/hack/run-e2e-kind.sh @@ -54,7 +54,6 @@ function install-volcano { kubectl apply -f installer/namespace.yaml echo "Install volcano chart with crd version $crd_version" - helm dependency update installer/helm/chart/volcano helm install ${CLUSTER_NAME} installer/helm/chart/volcano --namespace volcano-system --kubeconfig ${KUBECONFIG} \ --set basic.image_pull_policy=IfNotPresent \ --set basic.image_tag_version=${TAG} \ diff --git a/installer/helm/chart/jobflow/Chart.yaml b/installer/helm/chart/jobflow/Chart.yaml deleted file mode 100644 index 8ffd07af3d..0000000000 --- a/installer/helm/chart/jobflow/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -name: jobflow -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "0.1" diff --git a/installer/helm/chart/volcano/Chart.yaml b/installer/helm/chart/volcano/Chart.yaml index 77a8caa77a..93188b2dfa 100644 --- a/installer/helm/chart/volcano/Chart.yaml +++ b/installer/helm/chart/volcano/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 description: A Helm chart for Volcano name: volcano -version: 1.5 -appVersion: 0.1 +version: "1.5" +appVersion: "0.1" icon: https://raw.githubusercontent.com/volcano-sh/charts/master/docs/images/volcano-logo.png home: https://volcano.sh sources: @@ -10,7 +10,7 @@ sources: dependencies: - name: jobflow version: "1.0.0" - repository: "file://../jobflow" + repository: "file://../charts/jobflow" maintainers: - name: k82cn email: klaus1982.cn@gmail.com diff --git a/installer/helm/chart/jobflow/.helmignore b/installer/helm/chart/volcano/charts/jobflow/.helmignore similarity index 100% rename from installer/helm/chart/jobflow/.helmignore rename to installer/helm/chart/volcano/charts/jobflow/.helmignore diff --git a/installer/helm/chart/volcano/charts/jobflow/Chart.yaml b/installer/helm/chart/volcano/charts/jobflow/Chart.yaml new file mode 100644 index 0000000000..1234f9f516 --- /dev/null +++ b/installer/helm/chart/volcano/charts/jobflow/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +appVersion: "0.1" +description: A Helm chart for Volcano-Job-flow +name: jobflow +type: application +version: 1.0.0 diff --git a/installer/helm/chart/jobflow/crd/bases/flow.volcano.sh_jobflows.yaml b/installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobflows.yaml similarity index 100% rename from installer/helm/chart/jobflow/crd/bases/flow.volcano.sh_jobflows.yaml rename to installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobflows.yaml diff --git a/installer/helm/chart/jobflow/crd/bases/flow.volcano.sh_jobtemplates.yaml b/installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobtemplates.yaml similarity index 100% rename from installer/helm/chart/jobflow/crd/bases/flow.volcano.sh_jobtemplates.yaml rename to installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobtemplates.yaml diff --git a/installer/helm/chart/jobflow/crd/v1 b/installer/helm/chart/volcano/charts/jobflow/crd/v1 similarity index 100% rename from installer/helm/chart/jobflow/crd/v1 rename to installer/helm/chart/volcano/charts/jobflow/crd/v1 diff --git a/installer/helm/chart/jobflow/templates/NOTES.txt b/installer/helm/chart/volcano/charts/jobflow/templates/NOTES.txt similarity index 100% rename from installer/helm/chart/jobflow/templates/NOTES.txt rename to installer/helm/chart/volcano/charts/jobflow/templates/NOTES.txt diff --git a/installer/helm/chart/jobflow/templates/_helpers.tpl b/installer/helm/chart/volcano/charts/jobflow/templates/_helpers.tpl similarity index 100% rename from installer/helm/chart/jobflow/templates/_helpers.tpl rename to installer/helm/chart/volcano/charts/jobflow/templates/_helpers.tpl diff --git a/installer/helm/chart/jobflow/templates/flow_v1alpha1_jobflows.yaml b/installer/helm/chart/volcano/charts/jobflow/templates/flow_v1alpha1_jobflows.yaml similarity index 100% rename from installer/helm/chart/jobflow/templates/flow_v1alpha1_jobflows.yaml rename to installer/helm/chart/volcano/charts/jobflow/templates/flow_v1alpha1_jobflows.yaml diff --git a/installer/helm/chart/jobflow/templates/flow_v1alpha1_jobtemplates.yaml b/installer/helm/chart/volcano/charts/jobflow/templates/flow_v1alpha1_jobtemplates.yaml similarity index 100% rename from installer/helm/chart/jobflow/templates/flow_v1alpha1_jobtemplates.yaml rename to installer/helm/chart/volcano/charts/jobflow/templates/flow_v1alpha1_jobtemplates.yaml