Skip to content

Commit bb59ad6

Browse files
wozniakjanjkremser
andauthored
mutually exclusive port and portName
Co-authored-by: Jirka Kremser <[email protected]> Signed-off-by: Jan Wozniak <[email protected]>
1 parent 9d1e194 commit bb59ad6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

operator/apis/http/v1alpha1/httpscaledobject_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ type ScaleTargetRef struct {
3131
// The name of the service to route to
3232
Service string `json:"service"`
3333
// The port to route to
34-
// +optional
34+
// +kubebuilder:validation:XValidation:rule=!has(self.PortName) && has(self.Port)
3535
Port int32 `json:"port,omitempty"`
3636
// The port to route to referenced by name
37-
// +optional
37+
// +kubebuilder:validation:XValidation:rule=!has(self.Port) && has(self.PortName)
3838
PortName string `json:"portName,omitempty"`
3939
}
4040

0 commit comments

Comments
 (0)