Skip to content

Commit

Permalink
address Greg's comments
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Lavacca <[email protected]>
  • Loading branch information
mlavacca committed Sep 5, 2024
1 parent da6f7d3 commit cc2851d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
18 changes: 15 additions & 3 deletions api/v1alpha1/dataplane_konnect_extension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,24 @@ type DataPlaneKonnectExtensionSpec struct {
ControlPlaneRef configurationv1alpha1.ControlPlaneRef `json:"controlPlaneRef"`

// ControlPlaneRegion is the region of the Konnect Control Plane.
//
// +kubebuilder:example:=us
// +kubebuilder:validation:Required
ControlPlaneRegion string `json:"controlPlaneRegion"`

// ServerURL is the URL of the Konnect server.
// +kubebuilder:validation:Required
ServerURL string `json:"serverURL"`
// ServerHostname is the fully qualified domain name of the konnect server. This
// matches the RFC 1123 definition of a hostname with 1 notable exception that
// numeric IP addresses are not allowed.
//
// Note that as per RFC1035 and RFC1123, a *label* must consist of lower case
// alphanumeric characters or '-', and must start and end with an alphanumeric
// character. No other punctuation is allowed.
//
// +kubebuilder:example:=foo.example.com
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
ServerHostname string `json:"serverHostname"`

// ClusterCertificateSecretName is a name of the Secret containing the Konnect Control Plane's cluster certificate.
// +kubebuilder:validation:Required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,27 @@ spec:
controlPlaneRegion:
description: ControlPlaneRegion is the region of the Konnect Control
Plane.
example: us
type: string
serverURL:
description: ServerURL is the URL of the Konnect server.
serverHostname:
description: |-
ServerHostname is the fully qualified domain name of the konnect server. This
matches the RFC 1123 definition of a hostname with 1 notable exception that
numeric IP addresses are not allowed.
Note that as per RFC1035 and RFC1123, a *label* must consist of lower case
alphanumeric characters or '-', and must start and end with an alphanumeric
character. No other punctuation is allowed.
example: foo.example.com
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
required:
- clusterCertificateSecretName
- controlPlaneRef
- controlPlaneRegion
- serverURL
- serverHostname
type: object
status:
description: Status is the status of the DataPlaneKonnectExtension resource.
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ DataPlaneKonnectExtensionSpec defines the desired state of DataPlaneKonnectExten
| --- | --- |
| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this DataPlaneKonnectExtension is associated with. |
| `controlPlaneRegion` _string_ | ControlPlaneRegion is the region of the Konnect Control Plane. |
| `serverURL` _string_ | ServerURL is the URL of the Konnect server. |
| `serverHostname` _string_ | ServerHostname is the fully qualified domain name of the konnect server. This matches the RFC 1123 definition of a hostname with 1 notable exception that numeric IP addresses are not allowed.<br /><br /> Note that as per RFC1035 and RFC1123, a *label* must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. |
| `clusterCertificateSecretName` _string_ | ClusterCertificateSecretName is a name of the Secret containing the Konnect Control Plane's cluster certificate. |
| `clusterDataPlaneLabels` _object (keys:string, values:string)_ | ClusterDataPlaneLabels is a set of labels that will be applied to the Konnect DataPlane. |

Expand Down

0 comments on commit cc2851d

Please sign in to comment.