diff --git a/apis/container/v1beta1/zz_generated.deepcopy.go b/apis/container/v1beta1/zz_generated.deepcopy.go index 656b4cb6d..681b56916 100644 --- a/apis/container/v1beta1/zz_generated.deepcopy.go +++ b/apis/container/v1beta1/zz_generated.deepcopy.go @@ -8030,6 +8030,11 @@ func (in *NodePoolInitParameters_2) DeepCopyInto(out *NodePoolInitParameters_2) *out = new(float64) **out = **in } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } if in.Management != nil { in, out := &in.Management, &out.Management *out = make([]NodePoolManagementInitParameters_2, len(*in)) diff --git a/apis/container/v1beta1/zz_nodepool_types.go b/apis/container/v1beta1/zz_nodepool_types.go index ca964699a..5515ed41a 100755 --- a/apis/container/v1beta1/zz_nodepool_types.go +++ b/apis/container/v1beta1/zz_nodepool_types.go @@ -196,6 +196,9 @@ type NodePoolInitParameters_2 struct { // ignore subsequent changes to this field. InitialNodeCount *float64 `json:"initialNodeCount,omitempty" tf:"initial_node_count,omitempty"` + // The location (region or zone) of the cluster. + Location *string `json:"location,omitempty" tf:"location,omitempty"` + // Node management configuration, wherein auto-repair and // auto-upgrade is configured. Structure is documented below. Management []NodePoolManagementInitParameters_2 `json:"management,omitempty" tf:"management,omitempty"` diff --git a/apis/containeraws/v1beta1/zz_generated.deepcopy.go b/apis/containeraws/v1beta1/zz_generated.deepcopy.go index 9de3c74a6..d65bf5f14 100644 --- a/apis/containeraws/v1beta1/zz_generated.deepcopy.go +++ b/apis/containeraws/v1beta1/zz_generated.deepcopy.go @@ -2329,6 +2329,11 @@ func (in *NodePoolInitParameters) DeepCopyInto(out *NodePoolInitParameters) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } if in.MaxPodsConstraint != nil { in, out := &in.MaxPodsConstraint, &out.MaxPodsConstraint *out = make([]MaxPodsConstraintInitParameters, len(*in)) diff --git a/apis/containeraws/v1beta1/zz_nodepool_types.go b/apis/containeraws/v1beta1/zz_nodepool_types.go index 74ddd5ba5..dc91c7ca1 100755 --- a/apis/containeraws/v1beta1/zz_nodepool_types.go +++ b/apis/containeraws/v1beta1/zz_nodepool_types.go @@ -369,6 +369,9 @@ type NodePoolInitParameters struct { // The configuration of the node pool. Config []ConfigInitParameters `json:"config,omitempty" tf:"config,omitempty"` + // The location for the resource + Location *string `json:"location,omitempty" tf:"location,omitempty"` + // The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. MaxPodsConstraint []MaxPodsConstraintInitParameters `json:"maxPodsConstraint,omitempty" tf:"max_pods_constraint,omitempty"` @@ -463,8 +466,8 @@ type NodePoolParameters struct { Config []ConfigParameters `json:"config,omitempty" tf:"config,omitempty"` // The location for the resource - // +kubebuilder:validation:Required - Location *string `json:"location" tf:"location,omitempty"` + // +kubebuilder:validation:Optional + Location *string `json:"location,omitempty" tf:"location,omitempty"` // The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. // +kubebuilder:validation:Optional @@ -559,6 +562,7 @@ type NodePool struct { metav1.ObjectMeta `json:"metadata,omitempty"` // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.autoscaling) || (has(self.initProvider) && has(self.initProvider.autoscaling))",message="spec.forProvider.autoscaling is a required parameter" // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.config) || (has(self.initProvider) && has(self.initProvider.config))",message="spec.forProvider.config is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.maxPodsConstraint) || (has(self.initProvider) && has(self.initProvider.maxPodsConstraint))",message="spec.forProvider.maxPodsConstraint is a required parameter" // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.subnetId) || (has(self.initProvider) && has(self.initProvider.subnetId))",message="spec.forProvider.subnetId is a required parameter" // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter" diff --git a/apis/containerazure/v1beta1/zz_generated.deepcopy.go b/apis/containerazure/v1beta1/zz_generated.deepcopy.go index 1d654cc1d..652bb60c9 100644 --- a/apis/containerazure/v1beta1/zz_generated.deepcopy.go +++ b/apis/containerazure/v1beta1/zz_generated.deepcopy.go @@ -2005,6 +2005,11 @@ func (in *NodePoolInitParameters) DeepCopyInto(out *NodePoolInitParameters) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } if in.MaxPodsConstraint != nil { in, out := &in.MaxPodsConstraint, &out.MaxPodsConstraint *out = make([]MaxPodsConstraintInitParameters, len(*in)) diff --git a/apis/containerazure/v1beta1/zz_nodepool_types.go b/apis/containerazure/v1beta1/zz_nodepool_types.go index d785a0765..56811603f 100755 --- a/apis/containerazure/v1beta1/zz_nodepool_types.go +++ b/apis/containerazure/v1beta1/zz_nodepool_types.go @@ -221,6 +221,9 @@ type NodePoolInitParameters struct { // The node configuration of the node pool. Config []ConfigInitParameters `json:"config,omitempty" tf:"config,omitempty"` + // The location for the resource + Location *string `json:"location,omitempty" tf:"location,omitempty"` + // The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. MaxPodsConstraint []MaxPodsConstraintInitParameters `json:"maxPodsConstraint,omitempty" tf:"max_pods_constraint,omitempty"` @@ -322,8 +325,8 @@ type NodePoolParameters struct { Config []ConfigParameters `json:"config,omitempty" tf:"config,omitempty"` // The location for the resource - // +kubebuilder:validation:Required - Location *string `json:"location" tf:"location,omitempty"` + // +kubebuilder:validation:Optional + Location *string `json:"location,omitempty" tf:"location,omitempty"` // The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. // +kubebuilder:validation:Optional @@ -379,6 +382,7 @@ type NodePool struct { metav1.ObjectMeta `json:"metadata,omitempty"` // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.autoscaling) || (has(self.initProvider) && has(self.initProvider.autoscaling))",message="spec.forProvider.autoscaling is a required parameter" // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.config) || (has(self.initProvider) && has(self.initProvider.config))",message="spec.forProvider.config is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.maxPodsConstraint) || (has(self.initProvider) && has(self.initProvider.maxPodsConstraint))",message="spec.forProvider.maxPodsConstraint is a required parameter" // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.subnetId) || (has(self.initProvider) && has(self.initProvider.subnetId))",message="spec.forProvider.subnetId is a required parameter" // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter" diff --git a/config/externalname.go b/config/externalname.go index 0b565342e..5cada7e4f 100644 --- a/config/externalname.go +++ b/config/externalname.go @@ -316,8 +316,8 @@ var noForkExternalNameConfigs = map[string]config.ExternalName{ // // Imported by using the following format: projects/my-gcp-project/locations/us-east1-a/clusters/my-cluster "google_container_cluster": config.TemplatedStringAsIdentifier("name", "projects/{{ .setup.configuration.project }}/locations/{{ .parameters.location }}/clusters/{{ .external_name }}"), - // Imported by using the following format: my-gcp-project/us-east1-a/my-cluster/main-pool - "google_container_node_pool": config.TemplatedStringAsIdentifier("name", "{{ .setup.configuration.project }}/{{ .parameters.location }}/{{ .parameters.cluster }}/{{ .external_name }}"), + // Imported by using the following format: projects/my-gcp-project/locations/us-east1-a/clusters/my-cluster/nodePools/main-pool + "google_container_node_pool": config.TemplatedStringAsIdentifier("name", "{{ .parameters.cluster }}/nodePools/{{ .external_name }}"), // containeranalysis // @@ -332,15 +332,15 @@ var noForkExternalNameConfigs = map[string]config.ExternalName{ // // Imported by using the following format: projects/my-gcp-project/locations/us-east1-a/clusters/my-cluster "google_container_aws_cluster": config.TemplatedStringAsIdentifier("name", "projects/{{ .setup.configuration.project }}/locations/{{ .parameters.location }}/clusters/{{ .external_name }}"), - // Imported by using the following format: my-gcp-project/us-east1-a/my-cluster/main-pool - "google_container_aws_node_pool": config.TemplatedStringAsIdentifier("name", "{{ .setup.configuration.project }}/{{ .parameters.location }}/{{ .parameters.cluster }}/{{ .external_name }}"), + // Imported by using the following format: projects/my-gcp-project/locations/us-east1-a/clusters/my-cluster/nodePools/main-pool + "google_container_aws_node_pool": config.TemplatedStringAsIdentifier("name", "{{ .parameters.cluster }}/nodePools/{{ .external_name }}"), // containerazure // // Imported by using the following format: projects/my-gcp-project/locations/us-east1-a/clusters/my-cluster "google_container_azure_cluster": config.TemplatedStringAsIdentifier("name", "projects/{{ .setup.configuration.project }}/locations/{{ .parameters.location }}/clusters/{{ .external_name }}"), - // Imported by using the following format: my-gcp-project/us-east1-a/my-cluster/main-pool - "google_container_azure_node_pool": config.TemplatedStringAsIdentifier("name", "{{ .setup.configuration.project }}/{{ .parameters.location }}/{{ .parameters.cluster }}/{{ .external_name }}"), + // Imported by using the following format: projects/my-gcp-project/locations/us-east1-a/clusters/my-cluster/nodePools/main-pool + "google_container_azure_node_pool": config.TemplatedStringAsIdentifier("name", "{{ .parameters.cluster }}/nodePools/{{ .external_name }}"), // Imported by using the following format: projects/my-gcp-project/locations/us-east1-a/azureClients/my-client "google_container_azure_client": config.TemplatedStringAsIdentifier("name", "projects/{{ .setup.configuration.project }}/locations/{{ .parameters.location }}/azureClients/{{ .external_name }}"), diff --git a/package/crds/container.gcp.upbound.io_nodepools.yaml b/package/crds/container.gcp.upbound.io_nodepools.yaml index 7005345f8..b1de05670 100644 --- a/package/crds/container.gcp.upbound.io_nodepools.yaml +++ b/package/crds/container.gcp.upbound.io_nodepools.yaml @@ -712,6 +712,9 @@ spec: need this value, don't set it. If you do need it, you can use a lifecycle block to ignore subsequent changes to this field. type: number + location: + description: The location (region or zone) of the cluster. + type: string management: description: |- Node management configuration, wherein auto-repair and diff --git a/package/crds/containeraws.gcp.upbound.io_nodepools.yaml b/package/crds/containeraws.gcp.upbound.io_nodepools.yaml index a58c678f0..1b16d9a06 100644 --- a/package/crds/containeraws.gcp.upbound.io_nodepools.yaml +++ b/package/crds/containeraws.gcp.upbound.io_nodepools.yaml @@ -354,8 +354,6 @@ spec: 1.19.10-gke.1000). You can list all supported versions on a given Google Cloud region by calling GetAwsServerConfig. type: string - required: - - location type: object initProvider: description: |- @@ -549,6 +547,9 @@ spec: type: array type: object type: array + location: + description: The location for the resource + type: string maxPodsConstraint: description: The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. @@ -748,6 +749,10 @@ spec: rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.config) || (has(self.initProvider) && has(self.initProvider.config))' + - message: spec.forProvider.location is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.location) + || (has(self.initProvider) && has(self.initProvider.location))' - message: spec.forProvider.maxPodsConstraint is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.maxPodsConstraint) diff --git a/package/crds/containerazure.gcp.upbound.io_nodepools.yaml b/package/crds/containerazure.gcp.upbound.io_nodepools.yaml index f7c818b19..13ccdcc5c 100644 --- a/package/crds/containerazure.gcp.upbound.io_nodepools.yaml +++ b/package/crds/containerazure.gcp.upbound.io_nodepools.yaml @@ -269,8 +269,6 @@ spec: description: The Kubernetes version (e.g. 1.19.10-gke.1000) running on this node pool. type: string - required: - - location type: object initProvider: description: |- @@ -378,6 +376,9 @@ spec: type: string type: object type: array + location: + description: The location for the resource + type: string maxPodsConstraint: description: The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. @@ -578,6 +579,10 @@ spec: rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.config) || (has(self.initProvider) && has(self.initProvider.config))' + - message: spec.forProvider.location is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.location) + || (has(self.initProvider) && has(self.initProvider.location))' - message: spec.forProvider.maxPodsConstraint is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.maxPodsConstraint)