Skip to content

fix(srv6): materialize the OnUnavailable=Drop default in the CRD#32

Merged
ryskn merged 1 commit into
dev/srv6egress-v1from
fix/srv6-crd-onunavailable-default
Jul 3, 2026
Merged

fix(srv6): materialize the OnUnavailable=Drop default in the CRD#32
ryskn merged 1 commit into
dev/srv6egress-v1from
fix/srv6-crd-onunavailable-default

Conversation

@ryskn

@ryskn ryskn commented Jul 3, 2026

Copy link
Copy Markdown
Owner

What

The documented default Drop lived only in agent code (onUnavailableDrop treats empty as Drop), so a stored EgressPolicy kept onUnavailable="" and any other reader saw no default — split-brain.

Fix

Add +kubebuilder:default=Drop on the field and the matching default: Drop in the generated CRD, so the API server defaults it server-side.

Review finding

Low (tests/API) T2.

Test

go test ./srv6egress/... green; CRD yaml still parses.

The documented default 'Drop' lived only in agent code (onUnavailableDrop
treats empty as Drop), so a stored EgressPolicy kept onUnavailable="" and
any other reader saw no default. Add +kubebuilder:default=Drop and the
matching 'default: Drop' in the generated CRD so the API server defaults
the field server-side, removing the split-brain.
@ryskn ryskn merged commit f70868b into dev/srv6egress-v1 Jul 3, 2026
1 check passed
@ryskn ryskn deleted the fix/srv6-crd-onunavailable-default branch July 3, 2026 01:45
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