Skip to content

replaced custom CRD patches with property annotations - #2489

Merged
AndrewChubatiuk merged 2 commits into
masterfrom
crd-cleanup
Aug 24, 2026
Merged

replaced custom CRD patches with property annotations#2489
AndrewChubatiuk merged 2 commits into
masterfrom
crd-cleanup

Conversation

@AndrewChubatiuk

Copy link
Copy Markdown
Contributor

use annotations to consistently trim same fields in all CRDs, for the rest use custom patches

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 32 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="api/operator/v1beta1/vlogs_types.go">

<violation number="1" location="api/operator/v1beta1/vlogs_types.go:84">
P2: These markers do not add a property-level schema for VLogs because the enclosing `VLogsSpec` is already schemaless, leaving the VLogs CRD behavior unchanged. If this is intended to replace the VLogs CRD patch, the parent must become structural or the custom patch must remain; otherwise these annotations are ineffective metadata.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread config/crd/patches/common-array-fields.yaml Outdated
Comment thread api/operator/v1beta1/vlogs_types.go Outdated
Comment thread api/operator/v1beta1/vmextra_types.go
@AndrewChubatiuk
AndrewChubatiuk enabled auto-merge (squash) August 24, 2026 08:13
@vrutkovs

Copy link
Copy Markdown
Collaborator

I wonder if we can break up config/crd/patches/operator.victoriametrics.com_vlclusters.yaml into smaller patches: requestsLoadBalancer, volumeClaimTemplate etc so that we could unify reused parts across all objects?

@AndrewChubatiuk
AndrewChubatiuk merged commit 4bc7f84 into master Aug 24, 2026
9 checks passed
@AndrewChubatiuk
AndrewChubatiuk deleted the crd-cleanup branch August 24, 2026 08:19
@AndrewChubatiuk

Copy link
Copy Markdown
Contributor Author

I wonder if we can break up config/crd/patches/operator.victoriametrics.com_vlclusters.yaml into smaller patches: requestsLoadBalancer, volumeClaimTemplate etc so that we could unify reused parts across all objects?

it's achieveable only with custom scripts as patches for CRs may have different property prefixes

@vrutkovs

Copy link
Copy Markdown
Collaborator

Ah, okay, sure - it seems feasible for some cases at least. I'll experiment with that and create a PR

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