-
Notifications
You must be signed in to change notification settings - Fork 87
Migrating KubePlus to 4.0.0 version
KubePlus chart before 4.0.0 defined KubePlus's built-in CRDs (ResourceComposition, ResourceMonitor, ResourcePolicy, ResourceEvent) in the templates folder of the Helm chart. This caused the CRDs to be deleted (and recreated) whenever KubePlus was upgraded. Deletion of ResourceComposition led to the deletion of any application CRDs and application instances created. This was problematic as it caused application instances to be deleted on KubePlus upgrade.
In KubePlus chart 4.0.0, we have moved the built-in CRDs to the "crds" folder inside the chart. This ensures that the CRDs are not deleted on KubePlus upgrade (Helm does not delete the CRDs defined in the "crds" folder).
Here are the steps to test the migration functionality:
Install KubePlus version < 4.0.0
helm install kubeplus "https://github.com/cloud-ark/operatorcharts/blob/master/kubeplus-chart-3.0.47.tgz?raw=true" --kubeconfig=kubeplus-saas-provider.json -n $KUBEPLUS_NS
Wail till KubePlus Pod is running.
Deploy HellWorldService by following the steps here:
- https://github.com/cloud-ark/kubeplus/blob/master/examples/multitenancy/hello-world/steps.txt
- Verify that the application Pods are created correctly
Upgrade KubePlus:
kubectl annotate customresourcedefinition resourcepolicies.workflows.kubeplus helm.sh/resource-policy=keep
kubectl annotate customresourcedefinition resourceevents.workflows.kubeplus helm.sh/resource-policy=keep
kubectl annotate customresourcedefinition resourcemonitors.workflows.kubeplus helm.sh/resource-policy=keep
kubectl annotate customresourcedefinition resourcecompositions.workflows.kubeplus helm.sh/resource-policy=keep
helm upgrade kubeplus "https://github.com/cloud-ark/operatorcharts/blob/master/kubeplus-chart-4.0.0.tgz?raw=true" -n $KUBEPLUS_NS --kubeconfig=kubeplus-saas-provider.json
Once the KubePlus Pod is running:
- verify that the previously created HelloWorldService instance is still present
- verify that a new HelloWorldService instance can be created
- verify that HelloWorldService instances can be deleted