From 50c0d7f8933a8016a1e6351ad5867ff3d345d63f Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Sat, 7 Jan 2023 15:34:25 +0800 Subject: [PATCH] feat: enhance helm chart uninstallation (#29) Signed-off-by: Lin Yang Signed-off-by: Lin Yang --- README.md | 6 +++--- VERSION | 4 ++-- charts/erie-canal/Chart.lock | 6 +++--- charts/erie-canal/Chart.yaml | 6 +++--- charts/erie-canal/templates/pre-delete.yaml | 14 ++++++++------ charts/namespaced-ingress/Chart.lock | 6 +++--- charts/namespaced-ingress/Chart.yaml | 6 +++--- charts/tpls/Chart.yaml | 4 ++-- samples/setup/readme.md | 6 +++--- 9 files changed, 30 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 982d2b3..9beed91 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ To install the chart with the release name `ec` run: ```bash $ helm repo add ec https://ec.flomesh.io -$ helm install ec ec/erie-canal --namespace erie-canal --create-namespace --version=0.1.0-beta.2 +$ helm install ec ec/erie-canal --namespace erie-canal --create-namespace --version=0.1.0-beta.3 ``` The command deploys ErieCanal on the Kubernetes cluster using the default configuration in namespace `erie-canal` and creates the namespace if it doesn't exist. The [configuration](#configuration) section lists the parameters that can be configured during installation. @@ -52,12 +52,12 @@ The command removes all the Kubernetes components associated with the chart and Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, ```bash -$ helm install ec ec/erie-canal --namespace erie-canal --create-namespace --version=0.1.0-beta.2 \ +$ helm install ec ec/erie-canal --namespace erie-canal --create-namespace --version=0.1.0-beta.3 \ --set ec.image.pullPolicy=Always ``` Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, ```bash -$ helm install ec ec/erie-canal --namespace erie-canal --create-namespace --version=0.1.0-beta.2 -f values-override.yaml +$ helm install ec ec/erie-canal --namespace erie-canal --create-namespace --version=0.1.0-beta.3 -f values-override.yaml ``` diff --git a/VERSION b/VERSION index 4cf99c0..3c14be0 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ -APP_VERSION=0.1.0-beta.2 -HELM_CHART_VERSION=0.1.0-beta.2 +APP_VERSION=0.1.0-beta.3 +HELM_CHART_VERSION=0.1.0-beta.3 K8S_VERSION=1.25.5 ENVTEST_K8S_VERSION=1.25 \ No newline at end of file diff --git a/charts/erie-canal/Chart.lock b/charts/erie-canal/Chart.lock index df77e6b..2eee5ca 100644 --- a/charts/erie-canal/Chart.lock +++ b/charts/erie-canal/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: tpls repository: file://../tpls - version: 0.1.0-beta.2 + version: 0.1.0-beta.3 - name: cert-manager repository: https://charts.jetstack.io version: v1.7.3 -digest: sha256:0ad3f0f55e3e64241c9a04f2cc35d3f2b7e0b6ce277812460f8ecb28e4d156fa -generated: "2023-01-06T22:37:25.311541+08:00" +digest: sha256:ed3dc646940417a926194f96d461f2d84916ca59360232f5c29de85b5bf0b161 +generated: "2023-01-07T15:26:13.816086+08:00" diff --git a/charts/erie-canal/Chart.yaml b/charts/erie-canal/Chart.yaml index f2e8737..5bed2c3 100644 --- a/charts/erie-canal/Chart.yaml +++ b/charts/erie-canal/Chart.yaml @@ -18,13 +18,13 @@ 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: 0.1.0-beta.2 +version: 0.1.0-beta.3 # 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.0-beta.2" +appVersion: "0.1.0-beta.3" keywords: - kubernetes @@ -48,7 +48,7 @@ sources: dependencies: - name: tpls - version: 0.1.0-beta.2 + version: 0.1.0-beta.3 repository: file://../tpls - name: cert-manager version: 1.7.3 diff --git a/charts/erie-canal/templates/pre-delete.yaml b/charts/erie-canal/templates/pre-delete.yaml index 9f4e2ba..50065ff 100644 --- a/charts/erie-canal/templates/pre-delete.yaml +++ b/charts/erie-canal/templates/pre-delete.yaml @@ -23,12 +23,14 @@ spec: - sh - -c - | - kubectl delete namespacedingresses.flomesh.io --all -A - kubectl delete serviceimports.flomesh.io --all -A - kubectl delete serviceexports.flomesh.io --all -A - kubectl delete proxyprofiles.flomesh.io --all - kubectl delete clusters.flomesh.io --all - kubectl delete -f /crds/ + kubectl delete namespacedingresses.flomesh.io --all -A --ignore-not-found=true + kubectl delete globaltrafficpolicies.flomesh.io --all -A --ignore-not-found=true + kubectl delete multiclusterendpoints.flomesh.io --all -A --ignore-not-found=true + kubectl delete serviceimports.flomesh.io --all -A --ignore-not-found=true + kubectl delete serviceexports.flomesh.io --all -A --ignore-not-found=true + kubectl delete proxyprofiles.flomesh.io --all --ignore-not-found=true + kubectl delete clusters.flomesh.io --all --ignore-not-found=true + kubectl delete --ignore-not-found=true -f /crds/ volumeMounts: - mountPath: /manifests name: {{ .Values.ec.configmaps.manifests.name }} diff --git a/charts/namespaced-ingress/Chart.lock b/charts/namespaced-ingress/Chart.lock index 641985c..9aebb39 100644 --- a/charts/namespaced-ingress/Chart.lock +++ b/charts/namespaced-ingress/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: tpls repository: file://../tpls - version: 0.1.0-beta.2 -digest: sha256:c72c4d49da78f1f3ac6322dc30c3373a5ed431ddc73810028ecb47ca975e04c5 -generated: "2023-01-06T22:37:33.128013+08:00" + version: 0.1.0-beta.3 +digest: sha256:4ae22095a1928c195c483aa1abe14b25d469e9ca00b78121428274b79212cba6 +generated: "2023-01-07T15:26:20.730909+08:00" diff --git a/charts/namespaced-ingress/Chart.yaml b/charts/namespaced-ingress/Chart.yaml index 1c98494..15d7c75 100644 --- a/charts/namespaced-ingress/Chart.yaml +++ b/charts/namespaced-ingress/Chart.yaml @@ -16,15 +16,15 @@ 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: 0.1.0-beta.2 +version: 0.1.0-beta.3 # 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.0-beta.2" +appVersion: "0.1.0-beta.3" dependencies: - name: tpls - version: 0.1.0-beta.2 + version: 0.1.0-beta.3 repository: file://../tpls diff --git a/charts/tpls/Chart.yaml b/charts/tpls/Chart.yaml index 603e645..ae60edc 100644 --- a/charts/tpls/Chart.yaml +++ b/charts/tpls/Chart.yaml @@ -15,10 +15,10 @@ type: library # 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: 0.1.0-beta.2 +version: 0.1.0-beta.3 # 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.0-beta.2" +appVersion: "0.1.0-beta.3" diff --git a/samples/setup/readme.md b/samples/setup/readme.md index 72597f6..af82122 100644 --- a/samples/setup/readme.md +++ b/samples/setup/readme.md @@ -44,7 +44,7 @@ Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/qui #### Install ErieCanal to Control Plane ```shell -helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-beta.2-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/ +helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-beta.3-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/ ``` ### Cluster 1 @@ -73,7 +73,7 @@ Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/qui #### Install ErieCanal to Cluster1 ```shell -helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-beta.2-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/ +helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-beta.3-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/ ``` ### Cluster 2 @@ -102,7 +102,7 @@ Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/qui #### Install ErieCanal to Cluster2 ```shell -helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-beta.2-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/ +helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-beta.3-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/ ``` ## Create/Update Cluster CRD yamls