Skip to content

fix(logging): enableRecreateWorkloadOnImmutableFieldChange#155

Merged
Varashi merged 1 commit into
mainfrom
fix/logging-enable-recreate
May 27, 2026
Merged

fix(logging): enableRecreateWorkloadOnImmutableFieldChange#155
Varashi merged 1 commit into
mainfrom
fix/logging-enable-recreate

Conversation

@Varashi
Copy link
Copy Markdown
Owner

@Varashi Varashi commented May 27, 2026

Hotfix #3 for the logging migration. Operator can't reconcile the storageClassName change from #154 because StatefulSet volumeClaimTemplates are immutable. The operator's safety flag must be set explicitly. For homelab fluentd buffer, the recreate-on-immutable-change trade is acceptable.

Summary by CodeRabbit

  • New Features
    • Enabled automatic recreation of logging workloads when immutable configuration fields are modified, eliminating the need for manual intervention.

Review Change Stack

Operator refused to reconcile the storageClassName drop (#154) with:
"Object has to be recreated, but refusing to remove without
explicitly being told so. Use logging.spec.
enableRecreateWorkloadOnImmutableFieldChange to move on."

StatefulSet.spec.volumeClaimTemplates is k8s-immutable. The
operator's safety check is meant for production deployments with
strict durability — leaving the flag false there forces a manual
sts delete + PVC migration. For this homelab where the fluentd
buffer is at most a few minutes of replay, the data-loss-on-
recreate trade is fine.

Setting the flag lets the operator delete + recreate the STS so
fluentd-0 finally binds a PVC against the cluster default
StorageClass (vsan) instead of the missing longhorn class.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Varashi Varashi merged commit b11367f into main May 27, 2026
@Varashi Varashi deleted the fix/logging-enable-recreate branch May 27, 2026 07:14
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 00d6b2fe-a69c-47cd-96b9-19b8962a5a13

📥 Commits

Reviewing files that changed from the base of the PR and between 87a121f and 63cf620.

📒 Files selected for processing (1)
  • cluster-talos/kubernetes/infrastructure/platform/logging/logging-config/app/logging.yaml

📝 Walkthrough

Walkthrough

The vcflogs Logging CRD now includes spec.enableRecreateWorkloadOnImmutableFieldChange: true with documentation comments explaining that the operator will delete and recreate Fluent Bit DaemonSet and Fluentd StatefulSet when immutable spec fields change.

Changes

Logging Operator Workload Recreation Policy

Layer / File(s) Summary
Enable automatic workload recreation on immutable spec changes
cluster-talos/kubernetes/infrastructure/platform/logging/logging-config/app/logging.yaml
Sets spec.enableRecreateWorkloadOnImmutableFieldChange: true in the vcflogs Logging CRD, permitting the operator to delete and recreate workloads when immutable spec fields change.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes


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

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.

1 participant