Skip to content

fix: validates CONTROL_PLANE_ENDPOINT_IP and NUTANIX_ENDPOINT are distinct #994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,9 @@ spec:
- controlPlaneEndpoint
- prismCentralEndpoint
type: object
x-kubernetes-validations:
- message: Prism Central URL must not match the control plane endpoint IP
rule: isURL(self.prismCentralEndpoint.url) && (url(self.prismCentralEndpoint.url).getHostname() != self.controlPlaneEndpoint.host)
proxy:
description: HTTPProxy required for providing proxy configuration.
properties:
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/nutanix_clusterconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const (
)

// NutanixSpec defines the desired state of NutanixCluster.
// +kubebuilder:validation:XValidation:rule="isURL(self.prismCentralEndpoint.url) && (url(self.prismCentralEndpoint.url).getHostname() != self.controlPlaneEndpoint.host)", message="Prism Central URL must not match the control plane endpoint IP"
type NutanixSpec struct {
// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
// host can be either DNS name or ip address
Expand Down
File renamed without changes.
Loading