Skip to content

feat: remove empty properties from etcd-cluster spec to avoid ArgoCD drifting#301

Open
apenen wants to merge 2 commits intoaenix-io:mainfrom
apenen:patch-1
Open

feat: remove empty properties from etcd-cluster spec to avoid ArgoCD drifting#301
apenen wants to merge 2 commits intoaenix-io:mainfrom
apenen:patch-1

Conversation

@apenen
Copy link
Copy Markdown

@apenen apenen commented Dec 3, 2025

ArgoCD keeps detecting pending changes because Kubernetes omits empty fields on apply. Removing these fields from the spec prevents unnecessary diffs.

Summary by CodeRabbit

  • Schema Updates
    • Updated the etcd-operator CRD: validation for pod template specification has been relaxed to accept a broader set of fields while retaining the requirement for container definitions and preserving unknown fields. This enables more flexible pod template configurations without changing required structural elements.

✏️ Tip: You can customize this high-level summary in your review settings.

…drifting

ArgoCD keeps detecting pending changes because Kubernetes omits empty fields on apply. Removing these fields from the spec prevents unnecessary diffs.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 3, 2025

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b0b0bb31-6fa0-4515-86b6-a4068cd8ab5c

📥 Commits

Reviewing files that changed from the base of the PR and between 0570ab0 and 4891761.

📒 Files selected for processing (1)
  • charts/etcd-operator/crds/etcd-cluster.yaml
💤 Files with no reviewable changes (1)
  • charts/etcd-operator/crds/etcd-cluster.yaml

📝 Walkthrough

Walkthrough

Removed an empty properties: {} entry from spec.podTemplate.spec in the EtcdCluster CRD schema, leaving required: [containers] and x-kubernetes-preserve-unknown-fields: true intact to allow additional pod spec fields.

Changes

Cohort / File(s) Summary
CRD Schema Loosening
charts/etcd-operator/crds/etcd-cluster.yaml
Deleted an explicit empty properties: {} under spec.podTemplate.spec in the OpenAPIV3Schema, loosening validation while preserving required: [containers] and x-kubernetes-preserve-unknown-fields: true.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 I nudged a brace and set schema free,
The podTemplate breathes a little more glee.
Empty boxes gone, fields may roam,
Containers still needed — they anchor the home. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing empty properties from the etcd-cluster spec to prevent ArgoCD drifting issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sircthulhu
Copy link
Copy Markdown
Member

Hi, @apenen! This change will be overriden by commands

make manifests
make helm-crd-copy

So changes need to be made to api/v1alpha1/etcdcluster_types.go

@apenen apenen requested a review from BROngineer as a code owner April 10, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants