From bb59ad63056a162c442a1d86113c42d7f3bbeac6 Mon Sep 17 00:00:00 2001 From: Jan Wozniak Date: Wed, 23 Oct 2024 17:06:31 +0200 Subject: [PATCH] mutually exclusive port and portName Co-authored-by: Jirka Kremser <535866+jkremser@users.noreply.github.com> Signed-off-by: Jan Wozniak --- operator/apis/http/v1alpha1/httpscaledobject_types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operator/apis/http/v1alpha1/httpscaledobject_types.go b/operator/apis/http/v1alpha1/httpscaledobject_types.go index a76040ee..fcde8787 100644 --- a/operator/apis/http/v1alpha1/httpscaledobject_types.go +++ b/operator/apis/http/v1alpha1/httpscaledobject_types.go @@ -31,10 +31,10 @@ type ScaleTargetRef struct { // The name of the service to route to Service string `json:"service"` // The port to route to - // +optional + // +kubebuilder:validation:XValidation:rule=!has(self.PortName) && has(self.Port) Port int32 `json:"port,omitempty"` // The port to route to referenced by name - // +optional + // +kubebuilder:validation:XValidation:rule=!has(self.Port) && has(self.PortName) PortName string `json:"portName,omitempty"` }