OCPBUGS-32275: Add ingress.spec.domain immutability validation#2695
OCPBUGS-32275: Add ingress.spec.domain immutability validation#2695grzpiotrowski wants to merge 1 commit intoopenshift:masterfrom
Conversation
This commit fixes OCPBUGS-32275. https://issues.redhat.com/browse/OCPBUGS-32275 Adds `spec.domain` field in the Ingress config CRD validation to make it immutable and match the documentation. Prior to this commit the domain value could be changed and cause degraded state of some cluster operators.
Review Summary by QodoAdd immutability validation for Ingress spec.domain field
WalkthroughsDescription• Add immutability validation for spec.domain field in Ingress CRD • Prevent domain changes after initial set to avoid cluster operator degradation • Make domain field optional in validation schema • Add comprehensive test cases for domain immutability behavior Diagramflowchart LR
A["Ingress spec.domain"] -->|Add XValidation rule| B["Immutability constraint"]
B -->|oldSelf == '' OR self == oldSelf| C["Allow initial set or no change"]
C -->|Reject domain changes| D["Prevent operator degradation"]
A -->|Make optional| E["Updated CRD schema"]
F["Test cases"] -->|Validate behavior| G["Domain immutability verified"]
File Changes1. config/v1/types_ingress.go
|
Code Review by Qodo
1. Domain markers undocumented
|
This PR fixes OCPBUGS-32275.
Adds
spec.domainfield in the Ingress config CRD validation to make it immutable and match the documentation. Prior to this commit the domain value could be changed and cause degraded state of some cluster operators.