Skip to content

Commit c13a102

Browse files
Andrey Kolkovclaude
andcommitted
feat(etcd-operator): bump to v0.5.3 (S3 checksum fix for non-AWS backends)
v0.5.3 carries the S3 request-checksum fix (cozystack/etcd-operator#342): the snapshot agent sets RequestChecksumCalculation=WhenRequired on BOTH the S3 client and the transfer manager, so multipart snapshot uploads (>5 MiB — every real etcd snapshot) no longer carry the CRC32 STREAMING-UNSIGNED-PAYLOAD-TRAILER that Ceph RGW rejects with 400 InvalidArgument. Also pulls in #340 (observed EtcdMember versions) and #341 (--watch-namespace). - system/etcd-operator: appVersion v0.5.2 -> v0.5.3 (image tag follows AppVersion), bump ETCD_OPERATOR_REF, update deployment unittest expectations. - system/etcd-operator-crds: re-vendor CRDs from v0.5.3. etcdmembers gains the additive #340 status.version field + "Running" printer column and picks up the peerAutoTLS spec field the vendored copy was already missing (all additive, backward-compatible; etcdclusters/etcdsnapshots unchanged). Fix the stale `make update`: upstream has no config/crd kustomization — CRDs live in charts/etcd-operator/crd-bases — so vendor those directly and stamp helm.sh/resource-policy: keep. Verified end-to-end on a Ceph RGW backend: the v0.5.2 (client-only) agent fails a multipart snapshot upload with the 400 above; v0.5.3 uploads an 11 MiB multipart snapshot successfully. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Andrey Kolkov <[email protected]>
1 parent aef9e20 commit c13a102

5 files changed

Lines changed: 41 additions & 7 deletions

File tree

‎packages/system/etcd-operator-crds/Makefile‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ export NAMESPACE=cozy-etcd-operator
44
include ../../../hack/package.mk
55

66
# Pinned ref of github.com/cozystack/etcd-operator to vendor CRDs from.
7-
ETCD_OPERATOR_REF ?= v0.5.2
7+
ETCD_OPERATOR_REF ?= v0.5.3
88

9+
# controller-gen writes the CRDs to charts/etcd-operator/crd-bases/ upstream (there
10+
# is no config/crd kustomization). Vendor each verbatim and stamp
11+
# helm.sh/resource-policy: keep so a chart uninstall never garbage-collects the
12+
# CRDs and, with them, every EtcdCluster/EtcdMember/EtcdSnapshot in the cluster.
13+
CRDS = etcdclusters etcdmembers etcdsnapshots
914
update:
1015
rm -rf templates
1116
mkdir templates
12-
kubectl kustomize "github.com/cozystack/etcd-operator/config/crd?ref=$(ETCD_OPERATOR_REF)" | \
13-
yq -s '"templates/" + (.metadata.name | sub("\..*$$"; "")) + ".yaml"'
17+
@for c in $(CRDS); do \
18+
curl -fsSL "https://raw.githubusercontent.com/cozystack/etcd-operator/$(ETCD_OPERATOR_REF)/charts/etcd-operator/crd-bases/etcd-operator.cozystack.io_$$c.yaml" \
19+
| awk '/^ controller-gen.kubebuilder.io\/version:/{print; print " helm.sh/resource-policy: keep"; next} {print}' \
20+
> templates/$$c.yaml; \
21+
done

‎packages/system/etcd-operator-crds/templates/etcdmembers.yaml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ spec:
2222
- jsonPath: .spec.version
2323
name: Version
2424
type: string
25+
- jsonPath: .status.version
26+
name: Running
27+
type: string
2528
- jsonPath: .status.conditions[?(@.type=="Ready")].status
2629
name: Ready
2730
type: string
@@ -1359,6 +1362,17 @@ spec:
13591362
type: string
13601363
type: object
13611364
x-kubernetes-map-type: atomic
1365+
peerAutoTLS:
1366+
description: |-
1367+
PeerAutoTLS is operator-managed plumbing: it carries the cluster's
1368+
reserved "etcd-operator.cozystack.io/peer-auto-tls" annotation down to
1369+
the member so buildPod renders etcd's --peer-auto-tls (self-signed, no
1370+
shared CA) instead of mounting a peer secret. INSECURE — peer is
1371+
encrypted but NOT authenticated. Set only on clusters adopted from a
1372+
legacy --peer-auto-tls cluster, and never together with PeerSecretRef
1373+
(an explicit peer secret supersedes the annotation). Users do not set
1374+
this directly; the cluster controller derives it.
1375+
type: boolean
13621376
peerSecretRef:
13631377
description: |-
13641378
PeerSecretRef mirrors EtcdClusterTLS.Peer.SecretRef. When nil, the
@@ -1673,6 +1687,18 @@ spec:
16731687
Selector exposes the label-selector that matches this member's Pod
16741688
via /scale (consumed by the PDB controller; not user-facing).
16751689
type: string
1690+
version:
1691+
description: |-
1692+
Version is the etcd server version this member is actually running,
1693+
observed at runtime from the member's own etcd endpoint via the
1694+
Maintenance Status API (StatusResponse.Version) — i.e. what etcd
1695+
reports, as opposed to spec.version, which is the intended/target
1696+
version the operator asks for (and pins the image tag to). Empty until
1697+
the member's Pod is Ready and the operator has successfully queried it.
1698+
This observed value is the source of truth for detecting version drift
1699+
between intent and reality (see the VersionDrifted condition); the
1700+
observation is best-effort and never gates readiness.
1701+
type: string
16761702
type: object
16771703
type: object
16781704
served: true

‎packages/system/etcd-operator/Chart.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ name: cozy-etcd-operator
33
description: Cozystack etcd-operator (etcd-operator.cozystack.io/v1alpha2) controller-manager
44
type: application
55
version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process
6-
appVersion: v0.5.2
6+
appVersion: v0.5.3

‎packages/system/etcd-operator/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include ../../../hack/package.mk
88
# domain, VPA), so only the RBAC role is re-vendored; refresh templates/rbac.yaml
99
# by hand from config/rbac/role.yaml at this ref. CRDs live in the sibling
1010
# etcd-operator-crds package.
11-
ETCD_OPERATOR_REF ?= v0.5.2
11+
ETCD_OPERATOR_REF ?= v0.5.3
1212

1313
update:
1414
@echo "etcd-operator is a cozystack-authored chart; refresh templates/rbac.yaml"

‎packages/system/etcd-operator/tests/deployment_test.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ tests:
2020
asserts:
2121
- equal:
2222
path: spec.template.spec.containers[0].image
23-
value: ghcr.io/cozystack/etcd-operator:v0.5.2
23+
value: ghcr.io/cozystack/etcd-operator:v0.5.3
2424
- contains:
2525
path: spec.template.spec.containers[0].env
2626
content:
2727
name: OPERATOR_IMAGE
28-
value: ghcr.io/cozystack/etcd-operator:v0.5.2
28+
value: ghcr.io/cozystack/etcd-operator:v0.5.3
2929
any: true
3030

3131
- it: "image.tag overrides the appVersion default for both the container and the agent env"

0 commit comments

Comments
 (0)