Skip to content

Commit

Permalink
mutually exclusive port and portName
Browse files Browse the repository at this point in the history
Co-authored-by: Jirka Kremser <[email protected]>
Signed-off-by: Jan Wozniak <[email protected]>
  • Loading branch information
wozniakjan and jkremser authored Oct 23, 2024
1 parent 9d1e194 commit bb59ad6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions operator/apis/http/v1alpha1/httpscaledobject_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down

0 comments on commit bb59ad6

Please sign in to comment.