Skip to content

Commit 9e698c8

Browse files
release: advance to 25.4.3-preview+1
As part of the migration strategy for moving workloads from the public operator to the CockroachDB operator, we are transitioning CockroachDB operator workloads to v1beta1. This commit updates the operator image to support multiple API versions for CRDs. This ensures backward compatibility, allowing users to continue creating and reading resources using either v1alpha1 or v1beta1 during this transition period. Eventually, support for v1alpha1 will be removed entirely in favor of v1beta1. This release also includes a fix to relax the Azure secret dependency during initial deployment.
1 parent a62e25e commit 9e698c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+668
-551
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [cockroachdb-parent-25.4.3-preview+1] 2026-01-19
6+
### Changed
7+
- **API Version Migration (v1alpha1 to v1beta1)**: The CockroachDB custom resources are migrating from `v1alpha1` to `v1beta1`. CockroachDB chart now uses `v1beta1` templates.
8+
- **IMPORTANT**: Operator MUST be upgraded before CockroachDB chart.
9+
- **See [MIGRATION_v1alpha1_to_v1beta1.md](cockroachdb-parent/MIGRATION_v1alpha1_to_v1beta1.md) for upgrade instructions.**
10+
- Updated the Operator to support multiple CRD versions (v1alpha1, v1beta1) simultaneously.
11+
### Added
12+
- Pre-upgrade validation hook to ensure smooth upgrades owing to CR version updates and prevent upgrade order issues.
13+
### Fixed
14+
- Relaxed the K8s secret dependency during initial deployment on Azure.
15+
516
## [cockroachdb-parent-25.4.2-preview+3] 2025-12-22
617
### Fixed
718
- Updated the Operator image to fix pkill command failures within the cert-reloader container.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ NC := $(shell tput sgr0) # No Color
33
ifeq ($(UNAME_S),Linux)
44
COCKROACH_BIN ?= https://binaries.cockroachdb.com/cockroach-v23.2.0.linux-amd64.tgz
55
HELM_BIN ?= https://get.helm.sh/helm-v3.14.0-linux-amd64.tar.gz
6-
K3D_BIN ?= https://github.com/k3d-io/k3d/releases/download/v5.7.4/k3d-linux-amd64
6+
K3D_BIN ?= https://github.com/k3d-io/k3d/releases/download/v5.8.3/k3d-linux-amd64
77
KIND_BIN ?= https://kind.sigs.k8s.io/dl/v0.29.0/kind-linux-amd64
88
KUBECTL_BIN ?= https://dl.k8s.io/release/v1.29.1/bin/linux/amd64/kubectl
99
YQ_BIN ?= https://github.com/mikefarah/yq/releases/download/v4.31.2/yq_linux_amd64
@@ -14,7 +14,7 @@ endif
1414
ifeq ($(UNAME_S),Darwin)
1515
COCKROACH_BIN ?= https://binaries.cockroachdb.com/cockroach-v23.2.0.darwin-10.9-amd64.tgz
1616
HELM_BIN ?= https://get.helm.sh/helm-v3.14.0-darwin-amd64.tar.gz
17-
K3D_BIN ?= https://github.com/k3d-io/k3d/releases/download/v5.7.4/k3d-darwin-arm64
17+
K3D_BIN ?= https://github.com/k3d-io/k3d/releases/download/v5.8.3/k3d-darwin-arm64
1818
KIND_BIN ?= https://kind.sigs.k8s.io/dl/v0.29.0/kind-darwin-arm64
1919
KUBECTL_BIN ?= https://dl.k8s.io/release/v1.29.1/bin/darwin/amd64/kubectl
2020
YQ_BIN ?= https://github.com/mikefarah/yq/releases/download/v4.31.2/yq_darwin_amd64

build/templates/cockroachdb-parent/charts/operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ image:
99
# pullPolicy specifies the image pull policy.
1010
pullPolicy: IfNotPresent
1111
# tag is the image tag.
12-
tag: "897dc492b863c347f9207f800b368a1744cf177e493874b7503987007b5ed869"
12+
tag: "1cf224626cbd631fddc87f36eb6e4624f268061f5437fe8e7cdcfae5b5ee7805"
1313
# certificate defines the certificate settings for the Operator.
1414
certificate:
1515
# validForDays specifies the number of days the certificate is valid for.

cockroachdb-parent/Chart.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
dependencies:
22
- name: operator
33
repository: file://charts/operator
4-
version: 25.4.3-preview
4+
version: 25.4.3-preview+1
55
- name: cockroachdb
66
repository: file://charts/cockroachdb
7-
version: 25.4.3-preview
8-
digest: sha256:6f1b0de178c9ef3c4167d5ef6080944ace76520966300e9699290dce762edd01
9-
generated: "2026-01-14T22:20:16.665505457Z"
7+
version: 25.4.3-preview+1
8+
digest: sha256:29f46720efb21eb0473395bc8ccc7c2fc858a684b094d283ba7dc7cb952814d5
9+
generated: "2026-01-17T01:14:03.12317+05:30"

cockroachdb-parent/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ apiVersion: v2
33
name: cockroachdb-parent
44
description: A parent Helm chart for CockroachDB and its operator using helm-spray
55
type: application
6-
version: 25.4.3-preview
6+
version: 25.4.3-preview+1
77
appVersion: 25.4.3
88
dependencies:
99
- name: operator
10-
version: 25.4.3-preview
10+
version: 25.4.3-preview+1
1111
condition: operator.enabled
1212
repository: "file://charts/operator"
1313
- name: cockroachdb
14-
version: 25.4.3-preview
14+
version: 25.4.3-preview+1
1515
condition: cockroachdb.enabled
1616
repository: "file://charts/cockroachdb"
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# CockroachDB Operator API Version Migration (v1alpha1 → v1beta1)
2+
3+
## Overview
4+
5+
CockroachDB Operator is transitioning from `v1alpha1` to `v1beta1` API version. This document provides essential upgrade instructions.
6+
7+
**Current Version**: `25.4.3-preview+1` (Multi-version support)
8+
9+
---
10+
11+
## Before You Upgrade
12+
13+
### 🚨 Critical Warning
14+
15+
**NEVER DELETE THE CRD**
16+
- **DO NOT delete CRDs** if you encounter upgrade issues
17+
- Deleting CRDs will **permanently delete all your CockroachDB clusters and data**
18+
- If you have upgrade issues, check logs and contact support – do not delete CRDs
19+
20+
---
21+
22+
## User Scenarios
23+
24+
### New Users (Fresh Installation)
25+
If you're installing for the first time:
26+
- ✅ Install normally - no special steps needed
27+
- ✅ Pre-upgrade validation will automatically detect new installation and skip unnecessary checks
28+
29+
### Existing Users (Upgrading from v1alpha1)
30+
If you have existing CockroachDB clusters:
31+
- ✅ Follow the two-step upgrade process below
32+
- ✅ Pre-upgrade validation will automatically:
33+
- Verify CRD supports v1beta1
34+
- Rewrite resources to v1beta1 storage format
35+
- Validate API access
36+
- ✅ Zero downtime - your cluster continues running during the upgrade
37+
38+
---
39+
40+
## Upgrade Instructions
41+
42+
### ⚠️ Required Upgrade Order
43+
44+
**The operator MUST be upgraded before the CockroachDB chart.**
45+
46+
Why? The CockroachDB chart now uses `v1beta1` templates, which requires the operator to enable `v1beta1` support in the CRD first.
47+
48+
### Step-by-Step Upgrade
49+
50+
```bash
51+
# Step 1: Upgrade operator first
52+
helm upgrade <operator-release> ./cockroachdb-parent/charts/operator -n <namespace>
53+
54+
# Step 2: Then upgrade CockroachDB chart
55+
helm upgrade <cockroachdb-release> ./cockroachdb-parent/charts/cockroachdb -n <namespace>
56+
```
57+
58+
**Important**: Both steps are required. Even if you don't have CockroachDB chart value changes, you must upgrade it to update Helm's stored manifest to v1beta1.
59+
60+
### Post-Upgrade
61+
62+
Clear your kubectl cache:
63+
```bash
64+
rm -rf ~/.kube/cache
65+
```
66+
67+
---
68+
69+
## What Happens During Upgrade
70+
71+
1. **Operator Upgrade**: Adds v1beta1 support to CRD (both v1alpha1 and v1beta1 are served, v1beta1 is storage version)
72+
2. **CockroachDB Chart Upgrade**: Updates templates to v1beta1, pre-upgrade hook validates and rewrites resources
73+
3. **Automatic Validation**: Pre-upgrade hook ensures everything is ready before proceeding
74+
75+
---
76+
77+
## Common Issues
78+
79+
### "UPGRADE BLOCKED - CRD does not support v1beta1"
80+
81+
**Cause**: Trying to upgrade CockroachDB chart before operator
82+
83+
**Solution**: Upgrade operator first (Step 1 above), then retry CockroachDB chart upgrade
84+
85+
---
86+
87+
### "Cannot access CrdbCluster via v1beta1 API"
88+
89+
**Cause**: Operator not running or CRD configuration issue
90+
91+
**Solution**:
92+
1. Check operator status: `kubectl get pods -n <namespace> -l app.kubernetes.io/name=cockroach-operator`
93+
2. Check operator logs: `kubectl logs -n <namespace> -l app.kubernetes.io/name=cockroach-operator`
94+
3. Verify CRD: `kubectl get crd crdbclusters.crdb.cockroachlabs.com -o yaml`
95+
96+
---
97+
98+
## Verification
99+
100+
After upgrade, verify everything is working:
101+
102+
```bash
103+
# Check CRD configuration
104+
kubectl get crd crdbclusters.crdb.cockroachlabs.com \
105+
-o jsonpath='{.spec.versions[?(@.storage==true)].name}'
106+
# Expected output: v1beta1
107+
108+
# Check your clusters
109+
kubectl get crdbcluster -n <namespace>
110+
111+
# Verify Helm manifest uses v1beta1
112+
helm get manifest <release> -n <namespace> | grep "apiVersion: crdb.cockroachlabs.com"
113+
# Expected: v1beta1
114+
```
115+
116+
---
117+
118+
## FAQ
119+
120+
**Q: Will this cause downtime?**
121+
A: No. The migration is zero-downtime. Resources remain accessible during upgrade.
122+
123+
**Q: Do I need to do anything manually?**
124+
A: No. Just follow the two-step upgrade order. Pre-upgrade hooks handle everything else automatically.
125+
126+
**Q: What if I only upgrade the operator?**
127+
A: You must also upgrade the CockroachDB chart (Step 2). This updates Helm's manifest to v1beta1, which is required for future upgrades.
128+
129+
---
130+
131+
## Support
132+
133+
If you encounter issues:
134+
135+
**🚨 IMPORTANT: Never delete CRDs to "fix" upgrade issues - this will destroy all your data!**
136+
137+
**Check pre-upgrade job logs:**
138+
```bash
139+
kubectl logs job/<release>-pre-upgrade-validation -n <namespace>
140+
```
141+
142+
**Check operator logs:**
143+
```bash
144+
kubectl logs -n <namespace> -l app.kubernetes.io/name=cockroach-operator --tail=50
145+
```
146+
147+
**Check for events:**
148+
```bash
149+
kubectl get events -n <namespace> --sort-by='.lastTimestamp'
150+
```
151+
152+
---
153+
154+
## Quick Reference
155+
156+
**Before upgrade:**
157+
- ⚠️ Never delete CRDs (will delete all data)
158+
- ⚠️ Upgrade operator first, then CockroachDB chart
159+
160+
**Upgrade commands:**
161+
```bash
162+
# Step 1
163+
helm upgrade <operator-release> ./cockroachdb-parent/charts/operator -n <namespace>
164+
165+
# Step 2
166+
helm upgrade <cockroachdb-release> ./cockroachdb-parent/charts/cockroachdb -n <namespace>
167+
```
168+
169+
**After upgrade:**
170+
```bash
171+
# Clear kubectl cache
172+
rm -rf ~/.kube/cache
173+
174+
# Verify
175+
kubectl get crdbcluster -n <namespace>
176+
```
177+
178+
**If issues occur:**
179+
- Check job logs: `kubectl logs job/<release>-pre-upgrade-validation`
180+
- Check operator logs
181+
- DO NOT delete CRDs

cockroachdb-parent/charts/cockroachdb/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
name: cockroachdb
44
home: https://www.cockroachlabs.com
5-
version: 25.4.3-preview
5+
version: 25.4.3-preview+1
66
appVersion: 25.4.3
77
description: CockroachDB is a scalable, survivable, strongly-consistent SQL database.
88
icon: https://raw.githubusercontent.com/cockroachdb/cockroach/master/docs/media/cockroach_db.png
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# ClusterRole for pre-upgrade validation hook
2+
# Allows reading CRDs to validate API version support
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: ClusterRole
5+
metadata:
6+
name: {{ template "cockroachdb.clusterfullname" . }}-preupgrade-validation
7+
labels:
8+
helm.sh/chart: {{ template "cockroachdb.chart" . }}
9+
app.kubernetes.io/name: {{ template "cockroachdb.name" . }}
10+
app.kubernetes.io/instance: {{ .Release.Name | quote }}
11+
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
12+
annotations:
13+
"helm.sh/hook": pre-upgrade
14+
"helm.sh/hook-weight": "-10"
15+
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
16+
rules:
17+
- apiGroups: ["apiextensions.k8s.io"]
18+
resources: ["customresourcedefinitions"]
19+
verbs: ["get", "list"]
20+
resourceNames: ["crdbclusters.crdb.cockroachlabs.com", "crdbnodes.crdb.cockroachlabs.com"]
21+
---
22+
# ClusterRoleBinding for pre-upgrade validation
23+
apiVersion: rbac.authorization.k8s.io/v1
24+
kind: ClusterRoleBinding
25+
metadata:
26+
name: {{ template "cockroachdb.clusterfullname" . }}-preupgrade-validation
27+
labels:
28+
helm.sh/chart: {{ template "cockroachdb.chart" . }}
29+
app.kubernetes.io/name: {{ template "cockroachdb.name" . }}
30+
app.kubernetes.io/instance: {{ .Release.Name | quote }}
31+
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
32+
annotations:
33+
"helm.sh/hook": pre-upgrade
34+
"helm.sh/hook-weight": "-10"
35+
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
36+
roleRef:
37+
apiGroup: rbac.authorization.k8s.io
38+
kind: ClusterRole
39+
name: {{ template "cockroachdb.clusterfullname" . }}-preupgrade-validation
40+
subjects:
41+
- kind: ServiceAccount
42+
name: {{ include "cockroachdb.serviceAccount.name" . }}
43+
namespace: {{ .Release.Namespace }}

cockroachdb-parent/charts/cockroachdb/templates/crdb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{- if .Release.IsUpgrade -}}
33
{{ template "cockroachdb.isUpgradeAllowed" . }}
44
{{- end -}}
5-
apiVersion: crdb.cockroachlabs.com/v1alpha1
5+
apiVersion: crdb.cockroachlabs.com/v1beta1
66
kind: CrdbCluster
77
metadata:
88
name: {{ template "cockroachdb.fullname" . }}

0 commit comments

Comments
 (0)