Upgrade

Alauda Container Platform Data Services Essentials are designed to upgrade automatically during platform upgrades, requiring no manual intervention. The system handles all necessary migrations and updates seamlessly in the background.

Alauda Container Platform Data Services RDS Framework will execute upgrades based on the configured upgrade strategy:

  • Automatic: Auto-upgrades are triggered immediately upon detecting new component versions.
  • Manual: Requires manual approval before initiating the upgrade process.
WARNING

When upgrading ACP from v3 to v4, it is recommended to promptly upgrade both the global cluster and workload clusters to the new version to ensure proper display of Data Services view.
If only the global cluster is upgraded to v4 while workload clusters remain on v3, please contact the technical team during this period to obtain mitigation steps for view display issues in unupgraded workload clusters.

TOC

Upgrading from 3.x to 4.0.5

WARNING

For upgrades from versions 3.16.x or 3.18.x to 4.0.5 with Application Services installed, the manual steps outlined in this section are required for both global and workload cluster upgrades. Integrate these additional steps into your standard upgrade procedure.

Change operators to manual approval

Before uploading images, set all dataservices operators to manual approval mode. Run the following script on the cluster that is being upgraded:

Note: For global cluster upgrades, run this script on the global cluster. For workload cluster upgrades, run this script on the workload cluster.

cat << 'EOF' | bash
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

# Check if kubectl is installed
if ! command -v kubectl &>/dev/null; then
    echo "Error: kubectl is not installed. Please install kubectl and try again." >&2
    exit 1
fi

# Check if we are connected to a cluster
if ! kubectl cluster-info &>/dev/null; then
    echo "Error: Unable to connect to Kubernetes cluster. Please check your kubeconfig." >&2
    exit 1
fi

# Define operator name patterns
patterns=("rds-operator" "rds-operator-stable-platform-cpaas-system" "postgres-operator" "strimzi-kafka-operator" "mysql-mgr-operator" "rabbitmq-cluster-operator" "redis-operator" "clickhouse-operator" "data-services-clickhouse-operator")

# Loop through each pattern
for pattern in "${patterns[@]}"; do
    echo "Processing pattern: $pattern"

    # Get subscriptions that match the pattern (name starts with pattern)
    subscriptions=$(kubectl get subscriptions --all-namespaces -o=jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{"\n"}{end}' | awk -v pat="$pattern" '$2 ~ "^" pat {print $0}')

    if [ -z "$subscriptions" ]; then
        echo "No subscriptions found for pattern: $pattern"
        continue
    fi

    # Process each subscription
    while IFS= read -r line; do
        namespace=$(echo "$line" | awk '{print $1}')
        name=$(echo "$line" | awk '{print $2}')
        echo "Patching subscription $name in namespace $namespace"

        # Patch the subscription
        if kubectl patch subscription -n "$namespace" "$name" -p '{"spec":{"installPlanApproval":"Manual"}}' --type=merge; then
            echo "Successfully patched subscription $name in namespace $namespace"
        else
            echo "Error: Failed to patch subscription $name in namespace $namespace" >&2
        fi
    done <<<"$subscriptions"
done

echo "Manual upgrade patch completed for all specified operators."
EOF

Upload images and trigger upgrade

Follow the standard platform upgrade procedure for uploading images and triggering the upgrade.

Upload Application Services plugins

Before upgrading the global cluster, use violet to upload all the Alauda Application Services 4.0.5 plugin packages.

Upgrade the global cluster

Upgrade the global cluster.

Deploy Data Services Essentials

After upgrading the global cluster, manually deploy Alauda Container Platform Data Services Essentials.

Note for 3.18.x upgrades: Additionally, you must manually approve the PostgreSQL new version in the operator hub.