@@ -27,13 +27,104 @@ const (
2727 ManagedControlPlaneFinalizer = "gcpmanagedcontrolplane.infrastructure.cluster.x-k8s.io"
2828)
2929
30+ // PrivateCluster defines a private Cluster.
31+ type PrivateCluster struct {
32+ // EnablePrivateEndpoint: Whether the master's internal IP
33+ // address is used as the cluster endpoint.
34+ // +optional
35+ EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"`
36+
37+ // EnablePrivateNodes: Whether nodes have internal IP
38+ // addresses only. If enabled, all nodes are given only RFC
39+ // 1918 private addresses and communicate with the master via
40+ // private networking.
41+ // +optional
42+ EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty"`
43+
44+ // ControlPlaneCidrBlock is the IP range in CIDR notation to use for the hosted master network. This range must not
45+ // overlap with any other ranges in use within the cluster's network. Honored when enabled is true.
46+ // +optional
47+ ControlPlaneCidrBlock string `json:"controlPlaneCidrBlock,omitempty"`
48+
49+ // ControlPlaneGlobalAccess is whenever master is accessible globally or not. Honored when enabled is true.
50+ // +optional
51+ ControlPlaneGlobalAccess bool `json:"controlPlaneGlobalAccess,omitempty"`
52+
53+ // DisableDefaultSNAT disables cluster default sNAT rules. Honored when enabled is true.
54+ // +optional
55+ DisableDefaultSNAT bool `json:"disableDefaultSNAT,omitempty"`
56+ }
57+
58+ // ClusterNetworkPod the range of CIDRBlock list from where it gets the IP address.
59+ type ClusterNetworkPod struct {
60+ // CidrBlock is where all pods in the cluster are assigned an IP address from this range. Enter a range
61+ // (in CIDR notation) within a network range, a mask, or leave this field blank to use a default range.
62+ // This setting is permanent.
63+ // +optional
64+ CidrBlock string `json:"cidrBlock,omitempty"`
65+ }
66+
67+ // ClusterNetworkService defines the range of CIDRBlock list from where it gets the IP address.
68+ type ClusterNetworkService struct {
69+ // CidrBlock is where cluster services will be assigned an IP address from this IP address range. Enter a range
70+ // (in CIDR notation) within a network range, a mask, or leave this field blank to use a default range.
71+ // This setting is permanent.
72+ // +optional
73+ CidrBlock string `json:"cidrBlock,omitempty"`
74+ }
75+
76+ // ClusterNetwork define the cluster network.
77+ type ClusterNetwork struct {
78+ // PrivateCluster defines the private cluster spec.
79+ // +optional
80+ PrivateCluster * PrivateCluster `json:"privateCluster,omitempty"`
81+
82+ // UseIPAliases is whether alias IPs will be used for pod IPs in the cluster. If false, routes will be used for
83+ // pod IPs in the cluster.
84+ // +optional
85+ UseIPAliases bool `json:"useIPAliases,omitempty"`
86+
87+ // Pod defines the range of CIDRBlock list from where it gets the IP address.
88+ // +optional
89+ Pod * ClusterNetworkPod `json:"pod,omitempty"`
90+
91+ // Service defines the range of CIDRBlock list from where it gets the IP address.
92+ // +optional
93+ Service * ClusterNetworkService `json:"service,omitempty"`
94+ }
95+
96+ // WorkloadIdentityConfig allows workloads in your GKE clusters to impersonate Identity and Access Management (IAM)
97+ // service accounts to access Google Cloud services.
98+ type WorkloadIdentityConfig struct {
99+ // WorkloadPool is the workload pool to attach all Kubernetes service accounts to Google Cloud services.
100+ // Only relevant when enabled is true
101+ // +kubebuilder:validation:Required
102+ WorkloadPool string `json:"workloadPool,omitempty"`
103+ }
104+
105+ // AuthenticatorGroupConfig is RBAC security group for use with Google security groups in Kubernetes RBAC.
106+ type AuthenticatorGroupConfig struct {
107+ // SecurityGroups is the name of the security group-of-groups to be used.
108+ // +kubebuilder:validation:Required
109+ SecurityGroups string `json:"securityGroups,omitempty"`
110+ }
111+
30112// GCPManagedControlPlaneSpec defines the desired state of GCPManagedControlPlane.
31113type GCPManagedControlPlaneSpec struct {
32114 // ClusterName allows you to specify the name of the GKE cluster.
33115 // If you don't specify a name then a default name will be created
34116 // based on the namespace and name of the managed control plane.
35117 // +optional
36118 ClusterName string `json:"clusterName,omitempty"`
119+
120+ // Description describe the cluster.
121+ // +optional
122+ Description string `json:"description,omitempty"`
123+
124+ // ClusterNetwork define the cluster network.
125+ // +optional
126+ ClusterNetwork * ClusterNetwork `json:"clusterNetwork,omitempty"`
127+
37128 // Project is the name of the project to deploy the cluster to.
38129 Project string `json:"project"`
39130 // Location represents the location (region or zone) in which the GKE cluster
0 commit comments