Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 12 additions & 75 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2914,7 +2914,7 @@ resource "null_resource" "deploy_cloudnativepg_nprd_apps" {
# Verify installation
echo ""
echo "Verifying CloudNativePG installation..."
kubectl rollout status deployment/cnpg-controller-manager -n cnpg-system --timeout=5m || true
kubectl rollout status deployment/cnpg-controller-manager -n cnpg-system --timeout=5m

echo ""
echo "CloudNativePG Pods:"
Expand All @@ -2931,30 +2931,9 @@ resource "null_resource" "deploy_cloudnativepg_nprd_apps" {
EOT
}

provisioner "local-exec" {
when = destroy
on_failure = continue
command = <<-EOT
echo "=========================================="
echo "Removing CloudNativePG from NPRD Apps Cluster"
echo "=========================================="

export KUBECONFIG="$${HOME}/.kube/nprd-apps.yaml"

if kubectl get namespace cnpg-system &>/dev/null; then
echo "Removing CloudNativePG operator..."
CNPG_MANIFEST_URL="https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.28/releases/cnpg-1.28.0.yaml"
kubectl delete -f "$${CNPG_MANIFEST_URL}" --ignore-not-found=true || true

echo "Deleting namespace..."
kubectl delete namespace cnpg-system --timeout=2m 2>/dev/null || true

echo "✓ CloudNativePG removed"
else
echo "✓ Namespace already removed"
fi
EOT
}
# No destroy provisioner: a version bump replaces this resource, and deleting the
# operator manifest would delete the CNPG CRDs and with them every Cluster/Backup.
# Uninstalling CloudNativePG is a manual operation.

depends_on = [
null_resource.merge_kubeconfigs,
Expand Down Expand Up @@ -3012,7 +2991,7 @@ resource "null_resource" "deploy_cloudnativepg_prd_apps" {
# Verify installation
echo ""
echo "Verifying CloudNativePG installation..."
kubectl rollout status deployment/cnpg-controller-manager -n cnpg-system --timeout=5m || true
kubectl rollout status deployment/cnpg-controller-manager -n cnpg-system --timeout=5m

echo ""
echo "CloudNativePG Pods:"
Expand All @@ -3029,30 +3008,9 @@ resource "null_resource" "deploy_cloudnativepg_prd_apps" {
EOT
}

provisioner "local-exec" {
when = destroy
on_failure = continue
command = <<-EOT
echo "=========================================="
echo "Removing CloudNativePG from PRD Apps Cluster"
echo "=========================================="

export KUBECONFIG="$${HOME}/.kube/prd-apps.yaml"

if kubectl get namespace cnpg-system &>/dev/null; then
echo "Removing CloudNativePG operator..."
CNPG_MANIFEST_URL="https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.28/releases/cnpg-1.28.0.yaml"
kubectl delete -f "$${CNPG_MANIFEST_URL}" --ignore-not-found=true || true

echo "Deleting namespace..."
kubectl delete namespace cnpg-system --timeout=2m 2>/dev/null || true

echo "✓ CloudNativePG removed"
else
echo "✓ Namespace already removed"
fi
EOT
}
# No destroy provisioner: a version bump replaces this resource, and deleting the
# operator manifest would delete the CNPG CRDs and with them every Cluster/Backup.
# Uninstalling CloudNativePG is a manual operation.

depends_on = [
null_resource.merge_kubeconfigs,
Expand Down Expand Up @@ -3110,7 +3068,7 @@ resource "null_resource" "deploy_cloudnativepg_poc_apps" {
# Verify installation
echo ""
echo "Verifying CloudNativePG installation..."
kubectl rollout status deployment/cnpg-controller-manager -n cnpg-system --timeout=5m || true
kubectl rollout status deployment/cnpg-controller-manager -n cnpg-system --timeout=5m

echo ""
echo "CloudNativePG Pods:"
Expand All @@ -3127,30 +3085,9 @@ resource "null_resource" "deploy_cloudnativepg_poc_apps" {
EOT
}

provisioner "local-exec" {
when = destroy
on_failure = continue
command = <<-EOT
echo "=========================================="
echo "Removing CloudNativePG from POC Apps Cluster"
echo "=========================================="

export KUBECONFIG="$${HOME}/.kube/poc-apps.yaml"

if kubectl get namespace cnpg-system &>/dev/null; then
echo "Removing CloudNativePG operator..."
CNPG_MANIFEST_URL="https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.28/releases/cnpg-1.28.0.yaml"
kubectl delete -f "$${CNPG_MANIFEST_URL}" --ignore-not-found=true || true

echo "Deleting namespace..."
kubectl delete namespace cnpg-system --timeout=2m 2>/dev/null || true

echo "✓ CloudNativePG removed"
else
echo "✓ Namespace already removed"
fi
EOT
}
# No destroy provisioner: a version bump replaces this resource, and deleting the
# operator manifest would delete the CNPG CRDs and with them every Cluster/Backup.
# Uninstalling CloudNativePG is a manual operation.

depends_on = [
null_resource.merge_kubeconfigs,
Expand Down
9 changes: 5 additions & 4 deletions terraform/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,11 @@ opensearch_operator_version = "2.8.0"
# Check latest version: https://github.com/mongodb/mongodb-kubernetes-operator/releases
mongodb_operator_version = "0.13.0"

# CloudNativePG Operator version (default: 1.28.0)
# Installed via manifest, not Helm
# Check latest version: https://github.com/cloudnative-pg/cloudnative-pg/releases
cloudnativepg_operator_version = "1.28.0"
# CloudNativePG Operator version (default: 1.30.1)
# Installed via manifest (server-side apply), not Helm. Bumping it re-applies the
# manifest; existing PostgreSQL clusters roll their instance managers (primary last).
# Read the release notes first: https://cloudnative-pg.io/documentation/current/release_notes/
cloudnativepg_operator_version = "1.30.1"

# GitHub Actions Runner Controller (ARC) Helm chart version (default: 0.13.1)
# Check latest version: https://github.com/actions/actions-runner-controller/releases
Expand Down
2 changes: 1 addition & 1 deletion terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ variable "mongodb_operator_version" {
variable "cloudnativepg_operator_version" {
description = "CloudNativePG Operator version (installed via manifest)"
type = string
default = "1.28.0"
default = "1.30.1"
}

variable "github_arc_controller_version" {
Expand Down
Loading