Migrate from Old Versions

    KubeVela has release cadence for every 2-3 months, we’ll only maintain for the last 2 releases. As a result, you’re highly recommended to upgrade along with the community. We’ll strictly align with the for compatibility.

    In v1.6.x, we’ve upgraded the CUE engine to v0.5.x, please make sure your customized CUE definition has the compatibility when you upgrade to v1.7.x from versions lower than v1.6.0.

    danger

    ⚠️ Please make sure upgrade the CRD first.

    1. Upgrade the CRDs, please make sure you upgrade the CRDs first before upgrade the helm chart.
    1. Upgrade your kubevela chart

    Then you can upgrade the helm chart now:

    1. helm repo update
    2. helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.7.0 --wait

    Migrate from Old Versions - 图2caution

    Since we have migrated some workflow step definitions and views from workflow addon into KubeVela core, so if you’ve already enable workflow addon before, it may cause the following error due to the helm annotation issues:

    You can execute this script to solve it before upgrade helm chart:

    1. curl -fsSl https://kubevela.net/script/checklegacy.sh | bash

    The script will just help patch helm annotations for you, you can also do that manually one by one like:

    1. kubectl patch -n vela-system workflowstepdefinition <item> --type=merge -p '{"metadata":{"annotations":{"meta.helm.sh/release-name":"kubevela","meta.helm.sh/release-namespace":"vela-system"},"labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
    2. kubectl patch -n vela-system configMap <item> --type=merge -p '{"metadata":{"annotations":{"meta.helm.sh/release-name":"kubevela","meta.helm.sh/release-namespace":"vela-system"},"labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
    1. Download and upgrade to the corresponding CLI
    1. curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.7.0
    1. Upgrade VelaUX or other addon
    1. vela addon upgrade velaux --version=v1.7.0

    KubeVela had upgraded the CUE version from v0.2.2 to v0.5.0-alpha1 in v1.6.x, and some usages are deprecated.

    If you used an input in Application with a invalid CUE variable parameterKey (eg: contains -, or starts with a number, etc.), like:

    1. inputs:
    2. - from: output
    3. parameterKey: data.my-input

    Please modify it to:

    1. inputs:
    2. - from: output
    3. parameterKey: data["my-input"]
    1. Upgrade the CRDs, please make sure you upgrade the CRDs first before upgrade the helm chart.
    1. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.6/charts/vela-core/crds/core.oam.dev_applicationrevisions.yaml
    2. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.6/charts/vela-core/crds/core.oam.dev_applications.yaml
    3. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.6/charts/vela-core/crds/core.oam.dev_resourcetrackers.yaml
    4. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.6/charts/vela-core/crds/core.oam.dev_componentdefinitions.yaml
    5. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.6/charts/vela-core/crds/core.oam.dev_definitionrevisions.yaml
    1. Upgrade your kubevela chart
    1. Download and upgrade to the corresponding CLI
    1. curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.6.6
    1. Upgrade VelaUX or other addon
    1. vela addon upgrade velaux --version=v1.6.6

    caution

    Note: Please upgrade to v1.5.10+ to avoid application workflow rerun when controller upgrade.

    1. Upgrade the CRDs, please make sure you upgrade the CRDs first before upgrade the helm chart.
    1. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.5/charts/vela-core/crds/core.oam.dev_applicationrevisions.yaml
    2. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.5/charts/vela-core/crds/core.oam.dev_applications.yaml
    3. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.5/charts/vela-core/crds/core.oam.dev_resourcetrackers.yaml
    4. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.5/charts/vela-core/crds/core.oam.dev_componentdefinitions.yaml
    5. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.5/charts/vela-core/crds/core.oam.dev_definitionrevisions.yaml
    1. Upgrade your kubevela chart
    1. helm repo add kubevela https://charts.kubevela.net/core
    2. helm repo update
    3. helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.5.10 --wait
    1. Upgrade VelaUX or other addon
    1. vela addon upgrade velaux --version=v1.5.6

    Migrate from Old Versions - 图5danger

    Note: It may cause application workflow rerun when controller upgrade.

    1. Upgrade the CRDs, please make sure you upgrade the CRDs first before upgrade the helm chart.
    1. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.4/charts/vela-core/crds/core.oam.dev_applicationrevisions.yaml
    2. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.4/charts/vela-core/crds/core.oam.dev_applications.yaml
    3. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.4/charts/vela-core/crds/core.oam.dev_resourcetrackers.yaml
    4. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.4/charts/vela-core/crds/core.oam.dev_componentdefinitions.yaml
    5. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.4/charts/vela-core/crds/core.oam.dev_definitionrevisions.yaml
    1. Upgrade your kubevela chart
    1. helm repo add kubevela https://charts.kubevela.net/core
    2. helm repo update
    3. helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.4.14 --wait
    1. Download and upgrade to the corresponding CLI
    1. Upgrade VelaUX or other addon
    1. vela addon upgrade velaux --version=v1.4.7

    Please note if you’re using terraform addon, you should upgrade the terraform addon to version 1.0.6+ along with the vela-core upgrade, you can follow the following steps:

    1. upgrading vela-core to v1.3.4+, all existing Terraform typed Applications won’t be affected in this process.
    2. upgrade the terrorform addon, or the newly provisioned Terraform typed Applications won’t become successful.

    danger

    Note: It may cause application workflow rerun when controller upgrade.

    1. Upgrade the CRDs, please make sure you upgrade the CRDs first before upgrade the helm chart.
    1. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.3/charts/vela-core/crds/core.oam.dev_applicationrevisions.yaml
    2. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.3/charts/vela-core/crds/core.oam.dev_applications.yaml
    3. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.3/charts/vela-core/crds/core.oam.dev_resourcetrackers.yaml
    4. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.3/charts/vela-core/crds/core.oam.dev_componentdefinitions.yaml
    5. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.3/charts/vela-core/crds/core.oam.dev_definitionrevisions.yaml
    1. Upgrade your kubevela chart
    1. helm repo add kubevela https://charts.kubevela.net/core
    2. helm repo update
    3. helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.3.6 --wait
    1. Download and upgrade to the corresponding CLI
    1. curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.3.6
    1. Upgrade VelaUX or other addon
    1. vela addon upgrade velaux --version=v1.3.6
    1. upgrading vela-core to v1.3.4+, all existing Terraform typed Applications won’t be affected in this process.
    2. upgrade the terrorform addon, or the newly provisioned Terraform typed Applications won’t become successful.
      • 2.1 Manually upgrade CRD Configuration .
      • 2.2 Upgrade add-on terraform to version 1.0.6+.

    Migrate from Old Versions - 图7danger

    Note: It will cause application workflow rerun when controller upgrade.

    1. Check the service running normally

    Make sure all your services are running normally before migration.

    1. NAME READY STATUS RESTARTS AGE
    2. pod/kubevela-cluster-gateway-5bff6d564d-rhkp7 1/1 Running 0 16d
    3. pod/kubevela-vela-core-b67b87c7-9w7d4 1/1 Running 1 16d
    4. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    5. service/kubevela-cluster-gateway-service ClusterIP 172.16.236.150 <none> 9443/TCP 16d
    6. service/vela-core-webhook ClusterIP 172.16.54.195 <none> 443/TCP 284d
    7. NAME READY UP-TO-DATE AVAILABLE AGE
    8. deployment.apps/kubevela-cluster-gateway 1/1 1 1 16d
    9. deployment.apps/kubevela-vela-core 1/1 1 1 284d

    In addition, it’s also necessary to check the status of all the KubeVela applications including addons running normally.

    1. update the CRD to v1.2.x

    Update the CRD in the cluster to v1.2.x, the CRD list is as follows, some of them can be omitted if you don’t have them before:

    1. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_applicationrevisions.yaml
    2. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_applications.yaml
    3. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_componentdefinitions.yaml
    4. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_definitionrevisions.yaml
    5. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_envbindings.yaml
    6. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_healthscopes.yaml
    7. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_manualscalertraits.yaml
    8. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_policydefinitions.yaml
    9. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_resourcetrackers.yaml
    10. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_scopedefinitions.yaml
    11. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_traitdefinitions.yaml
    12. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_workflowstepdefinitions.yaml
    13. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/core.oam.dev_workloaddefinitions.yaml
    14. kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.2/charts/vela-core/crds/standard.oam.dev_rollouts.yaml
    1. Execute the upgrade command

    This step will upgrade the system to the new version:

    1. helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.2.6 --wait

    Upgrade the CLI to v1.2.x corresponding the the core version:

    1. Enable addon

    After the upgrade succeed, users can use the following methods to enable addons if they need to be enabled:

    1. # View the list of addons
    2. vela addon list
    3. # Enable addon
    4. vela addon enable <addon name>

    tip

    This step is not required if the addon is already enabled and used in the pre-upgrade version

    1. Update Custom Definition
    1. Common Questions for this migration
    • Q: After upgrading from 1.1.x to 1.2.x, the application status becomes workflowsuspending, and using doesn’t work.
      • A: There’re migration about the resource tracker mechanism. Generally, you can delete the existing resourcetracker, after that you can use vela workflow resume command.
    • Q: Why the status of my application become suspend after the upgrade?

    Last updated on Feb 9, 2023 by dependabot[bot]