Skip to content

Commit

Permalink
A few simple kubebuilder validations.
Browse files Browse the repository at this point in the history
  • Loading branch information
imain committed Aug 8, 2022
1 parent d2e6a9b commit d41c431
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1alpha1/hostedcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ type HostedClusterSpec struct {
// +kubebuilder:default:="https://kubernetes.default.svc"
// +immutable
// +optional
// +kubebuilder:validation:Format=uri
IssuerURL string `json:"issuerURL,omitempty"`

// ServiceAccountSigningKey is a reference to a secret containing the private key
Expand Down Expand Up @@ -453,6 +454,7 @@ type ClusterNetworking struct {
// Use ServiceNetwork instead
// +immutable
// +optional
// +kubebuilder:validation:Format=cidr
ServiceCIDR string `json:"serviceCIDR,omitempty"`

// Deprecated
Expand All @@ -461,13 +463,15 @@ type ClusterNetworking struct {
//
// +immutable
// +optional
// +kubebuilder:validation:Format=cidr
PodCIDR string `json:"podCIDR,omitempty"`

// Deprecated
// This field will be removed in the next API release.
// Use MachineNetwork instead
// +immutable
// +optional
// +kubebuilder:validation:Format=cidr
MachineCIDR string `json:"machineCIDR,omitempty"`

// MachineNetwork is the list of IP address pools for machines.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2021,6 +2021,7 @@ spec:
issuer in all ServiceAccount tokens generated by the control plane
API server. The default value is kubernetes.default.svc, which only
works for in-cluster validation.
format: uri
type: string
networking:
description: Networking specifies network configuration for the cluster.
Expand Down Expand Up @@ -2076,6 +2077,7 @@ spec:
machineCIDR:
description: Deprecated This field will be removed in the next
API release. Use MachineNetwork instead
format: cidr
type: string
machineNetwork:
description: 'MachineNetwork is the list of IP address pools for
Expand Down Expand Up @@ -2106,10 +2108,12 @@ spec:
podCIDR:
description: Deprecated This field will be removed in the next
API release. Use ClusterNetwork instead
format: cidr
type: string
serviceCIDR:
description: Deprecated This field will be removed in the next
API release. Use ServiceNetwork instead
format: cidr
type: string
serviceNetwork:
description: 'ServiceNetwork is the list of IP address pools for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2071,6 +2071,7 @@ spec:
machineCIDR:
description: Deprecated This field will be removed in the next
API release. Use MachineNetwork instead
format: cidr
type: string
machineNetwork:
description: 'MachineNetwork is the list of IP address pools for
Expand Down Expand Up @@ -2101,10 +2102,12 @@ spec:
podCIDR:
description: Deprecated This field will be removed in the next
API release. Use ClusterNetwork instead
format: cidr
type: string
serviceCIDR:
description: Deprecated This field will be removed in the next
API release. Use ServiceNetwork instead
format: cidr
type: string
serviceNetwork:
description: 'ServiceNetwork is the list of IP address pools for
Expand Down
7 changes: 7 additions & 0 deletions hack/app-sre/saas_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22101,6 +22101,7 @@ objects:
issuer in all ServiceAccount tokens generated by the control plane
API server. The default value is kubernetes.default.svc, which
only works for in-cluster validation.
format: uri
type: string
networking:
description: Networking specifies network configuration for the
Expand Down Expand Up @@ -22159,6 +22160,7 @@ objects:
machineCIDR:
description: Deprecated This field will be removed in the next
API release. Use MachineNetwork instead
format: cidr
type: string
machineNetwork:
description: 'MachineNetwork is the list of IP address pools
Expand Down Expand Up @@ -22189,10 +22191,12 @@ objects:
podCIDR:
description: Deprecated This field will be removed in the next
API release. Use ClusterNetwork instead
format: cidr
type: string
serviceCIDR:
description: Deprecated This field will be removed in the next
API release. Use ServiceNetwork instead
format: cidr
type: string
serviceNetwork:
description: 'ServiceNetwork is the list of IP address pools
Expand Down Expand Up @@ -25482,6 +25486,7 @@ objects:
machineCIDR:
description: Deprecated This field will be removed in the next
API release. Use MachineNetwork instead
format: cidr
type: string
machineNetwork:
description: 'MachineNetwork is the list of IP address pools
Expand Down Expand Up @@ -25512,10 +25517,12 @@ objects:
podCIDR:
description: Deprecated This field will be removed in the next
API release. Use ClusterNetwork instead
format: cidr
type: string
serviceCIDR:
description: Deprecated This field will be removed in the next
API release. Use ServiceNetwork instead
format: cidr
type: string
serviceNetwork:
description: 'ServiceNetwork is the list of IP address pools
Expand Down

0 comments on commit d41c431

Please sign in to comment.