Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
feat: enhance helm chart uninstallation (#29)
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Yang <[email protected]>

Signed-off-by: Lin Yang <[email protected]>
  • Loading branch information
reaver-flomesh authored Jan 7, 2023
1 parent f7edbd3 commit 50c0d7f
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 28 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
```
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions charts/erie-canal/Chart.lock
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 3 additions & 3 deletions charts/erie-canal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
14 changes: 8 additions & 6 deletions charts/erie-canal/templates/pre-delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 3 additions & 3 deletions charts/namespaced-ingress/Chart.lock
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 3 additions & 3 deletions charts/namespaced-ingress/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions charts/tpls/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 3 additions & 3 deletions samples/setup/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 50c0d7f

Please sign in to comment.