From 96f733af66538963b97a2e48472d095f0fce6e16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 19:20:41 +0000 Subject: [PATCH 1/2] build(deps): Bump sigs.k8s.io/cluster-api-provider-aws/v2 Bumps [sigs.k8s.io/cluster-api-provider-aws/v2](https://github.com/kubernetes-sigs/cluster-api-provider-aws) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases) - [Commits](https://github.com/kubernetes-sigs/cluster-api-provider-aws/compare/v2.4.0...v2.4.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/cluster-api-provider-aws/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- hack/third-party/capa/go.mod | 2 +- hack/third-party/capa/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hack/third-party/capa/go.mod b/hack/third-party/capa/go.mod index 5045470dc..3b9f2c294 100644 --- a/hack/third-party/capa/go.mod +++ b/hack/third-party/capa/go.mod @@ -5,7 +5,7 @@ module github.com/d2iq-labs/cluster-api-runtime-extensions-nutanix/external/capa go 1.21 -require sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.0 +require sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.1 require ( github.com/aws/aws-sdk-go v1.50.28 // indirect diff --git a/hack/third-party/capa/go.sum b/hack/third-party/capa/go.sum index 61db925b3..776a2c370 100644 --- a/hack/third-party/capa/go.sum +++ b/hack/third-party/capa/go.sum @@ -200,8 +200,8 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/cluster-api v1.6.2 h1:ruUi4q/9jXFuI+hmnDjo9izHgrBk4bjfQXLKx678PQE= sigs.k8s.io/cluster-api v1.6.2/go.mod h1:Anm4cA6R/AIP6KdIuVje8CdFc/TdGl+382bi5oPawRc= -sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.0 h1:m8mDWGDkTbOgia5br9Gklzf9X/6RfvmHDnW0f/cfQhc= -sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.0/go.mod h1:E/7VHYlm0fxDC5Rupfp5aR49+gIgdGCPOboR1g9rL+w= +sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.1 h1:IkQwllBlKe7MKNOTJK7QAXFeeTx3IZbK/dvp1FDM9xc= +sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.1/go.mod h1:FCax6cEAO5lwSZYDSuHJZjztKo+wn/B0mcQrQnbKqAo= sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0= sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= From 3d5ad10c9aa432f587e8826540c91cb8b67a0317 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Thu, 11 Apr 2024 12:03:21 +0100 Subject: [PATCH 2/2] fixup! feat: Sync up CAPA APIs --- .../v2/api/v1beta2/awscluster_types.go | 15 +++-- .../api/v1beta2/awsclustertemplate_types.go | 1 + .../v2/api/v1beta2/awsmachine_types.go | 61 ++++++++++++++++++ .../v2/api/v1beta2/doc.go | 2 +- .../v2/api/v1beta2/groupversion_info.go | 2 +- .../v2/api/v1beta2/network_types.go | 18 +++++- .../v2/api/v1beta2/types.go | 2 + .../v2/api/v1beta2/zz_generated.deepcopy.go | 62 ++++++++++++++++++- 8 files changed, 154 insertions(+), 9 deletions(-) diff --git a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_types.go b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_types.go index 1df6c53b8..add00915c 100644 --- a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_types.go +++ b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_types.go @@ -166,13 +166,19 @@ type Bastion struct { AMI string `json:"ami,omitempty"` } +// LoadBalancerType defines the type of load balancer to use. type LoadBalancerType string var ( - LoadBalancerTypeClassic = LoadBalancerType("classic") - LoadBalancerTypeELB = LoadBalancerType("elb") - LoadBalancerTypeALB = LoadBalancerType("alb") - LoadBalancerTypeNLB = LoadBalancerType("nlb") + // LoadBalancerTypeClassic is the classic ELB type. + LoadBalancerTypeClassic = LoadBalancerType("classic") + // LoadBalancerTypeELB is the ELB type. + LoadBalancerTypeELB = LoadBalancerType("elb") + // LoadBalancerTypeALB is the ALB type. + LoadBalancerTypeALB = LoadBalancerType("alb") + // LoadBalancerTypeNLB is the NLB type. + LoadBalancerTypeNLB = LoadBalancerType("nlb") + // LoadBalancerTypeDisabled disables the load balancer. LoadBalancerTypeDisabled = LoadBalancerType("disabled") ) @@ -268,6 +274,7 @@ type AWSClusterStatus struct { Conditions clusterv1.Conditions `json:"conditions,omitempty"` } +// S3Bucket defines a supporting S3 bucket for the cluster, currently can be optionally used for Ignition. type S3Bucket struct { // ControlPlaneIAMInstanceProfile is a name of the IAMInstanceProfile, which will be allowed // to read control-plane node bootstrap data from S3 Bucket. diff --git a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustertemplate_types.go b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustertemplate_types.go index 333cb285c..e0a827fa3 100644 --- a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustertemplate_types.go +++ b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustertemplate_types.go @@ -54,6 +54,7 @@ func init() { SchemeBuilder.Register(&AWSClusterTemplate{}, &AWSClusterTemplateList{}) } +// AWSClusterTemplateResource defines the desired state of AWSClusterTemplateResource. type AWSClusterTemplateResource struct { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata diff --git a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_types.go b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_types.go index 10d8ce0dc..c4fd5530a 100644 --- a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_types.go +++ b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_types.go @@ -210,6 +210,7 @@ type CloudInit struct { } // Ignition defines options related to the bootstrapping systems where Ignition is used. +// For more information on Ignition configuration, see https://coreos.github.io/butane/specs/ type Ignition struct { // Version defines which version of Ignition will be used to generate bootstrap data. // @@ -237,6 +238,66 @@ type Ignition struct { // +kubebuilder:default="ClusterObjectStore" // +kubebuilder:validation:Enum:="ClusterObjectStore";"UnencryptedUserData" StorageType IgnitionStorageTypeOption `json:"storageType,omitempty"` + + // Proxy defines proxy settings for Ignition. + // Only valid for Ignition versions 3.1 and above. + // +optional + Proxy *IgnitionProxy `json:"proxy,omitempty"` + + // TLS defines TLS settings for Ignition. + // Only valid for Ignition versions 3.1 and above. + // +optional + TLS *IgnitionTLS `json:"tls,omitempty"` +} + +// IgnitionCASource defines the source of the certificate authority to use for Ignition. +// +kubebuilder:validation:MaxLength:=65536 +type IgnitionCASource string + +// IgnitionTLS defines TLS settings for Ignition. +type IgnitionTLS struct { + // CASources defines the list of certificate authorities to use for Ignition. + // The value is the certificate bundle (in PEM format). The bundle can contain multiple concatenated certificates. + // Supported schemes are http, https, tftp, s3, arn, gs, and `data` (RFC 2397) URL scheme. + // + // +optional + // +kubebuilder:validation:MaxItems=64 + CASources []IgnitionCASource `json:"certificateAuthorities,omitempty"` +} + +// IgnitionNoProxy defines the list of domains to not proxy for Ignition. +// +kubebuilder:validation:MaxLength:=2048 +type IgnitionNoProxy string + +// IgnitionProxy defines proxy settings for Ignition. +type IgnitionProxy struct { + // HTTPProxy is the HTTP proxy to use for Ignition. + // A single URL that specifies the proxy server to use for HTTP and HTTPS requests, + // unless overridden by the HTTPSProxy or NoProxy options. + // +optional + HTTPProxy *string `json:"httpProxy,omitempty"` + + // HTTPSProxy is the HTTPS proxy to use for Ignition. + // A single URL that specifies the proxy server to use for HTTPS requests, + // unless overridden by the NoProxy option. + // +optional + HTTPSProxy *string `json:"httpsProxy,omitempty"` + + // NoProxy is the list of domains to not proxy for Ignition. + // Specifies a list of strings to hosts that should be excluded from proxying. + // + // Each value is represented by: + // - An IP address prefix (1.2.3.4) + // - An IP address prefix in CIDR notation (1.2.3.4/8) + // - A domain name + // - A domain name matches that name and all subdomains + // - A domain name with a leading . matches subdomains only + // - A special DNS label (*), indicates that no proxying should be done + // + // An IP address prefix and domain name can also include a literal port number (1.2.3.4:80). + // +optional + // +kubebuilder:validation:MaxItems=64 + NoProxy []IgnitionNoProxy `json:"noProxy,omitempty"` } // AWSMachineStatus defines the observed state of AWSMachine. diff --git a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/doc.go b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/doc.go index 912b8f655..4ed8bbddb 100644 --- a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/doc.go +++ b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/doc.go @@ -17,5 +17,5 @@ limitations under the License. // +gencrdrefdocs:force // +groupName=infrastructure.cluster.x-k8s.io -// package v1beta2 contains the v1beta2 API implementation. +// Package v1beta2 contains the v1beta2 API implementation. package v1beta2 diff --git a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/groupversion_info.go b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/groupversion_info.go index 7b92eca9f..1d921ac08 100644 --- a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/groupversion_info.go +++ b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/groupversion_info.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// package v1beta2 contains API Schema definitions for the infrastructure v1beta2 API group +// Package v1beta2 contains API Schema definitions for the infrastructure v1beta2 API group // +kubebuilder:object:generate=true // +groupName=infrastructure.cluster.x-k8s.io package v1beta2 diff --git a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go index 55cb919cd..ea5d627a6 100644 --- a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go +++ b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go @@ -27,6 +27,16 @@ const ( DefaultAPIServerPort = 6443 // DefaultAPIServerPortString defines the API server port as a string for convenience. DefaultAPIServerPortString = "6443" + // DefaultAPIServerHealthCheckPath the API server health check path. + DefaultAPIServerHealthCheckPath = "/readyz" + // DefaultAPIServerHealthCheckIntervalSec the API server health check interval in seconds. + DefaultAPIServerHealthCheckIntervalSec = 10 + // DefaultAPIServerHealthCheckTimeoutSec the API server health check timeout in seconds. + DefaultAPIServerHealthCheckTimeoutSec = 5 + // DefaultAPIServerHealthThresholdCount the API server health check threshold count. + DefaultAPIServerHealthThresholdCount = 5 + // DefaultAPIServerUnhealthThresholdCount the API server unhealthy check threshold count. + DefaultAPIServerUnhealthThresholdCount = 3 ) // NetworkStatus encapsulates AWS networking resources. @@ -106,6 +116,7 @@ type TargetGroupHealthCheck struct { type TargetGroupAttribute string var ( + // TargetGroupAttributeEnablePreserveClientIP defines the attribute key for enabling preserve client IP. TargetGroupAttributeEnablePreserveClientIP = "preserve_client_ip.enabled" ) @@ -113,8 +124,11 @@ var ( type LoadBalancerAttribute string var ( - LoadBalancerAttributeEnableLoadBalancingCrossZone = "load_balancing.cross_zone.enabled" - LoadBalancerAttributeIdleTimeTimeoutSeconds = "idle_timeout.timeout_seconds" + // LoadBalancerAttributeEnableLoadBalancingCrossZone defines the attribute key for enabling load balancing cross zone. + LoadBalancerAttributeEnableLoadBalancingCrossZone = "load_balancing.cross_zone.enabled" + // LoadBalancerAttributeIdleTimeTimeoutSeconds defines the attribute key for idle timeout. + LoadBalancerAttributeIdleTimeTimeoutSeconds = "idle_timeout.timeout_seconds" + // LoadBalancerAttributeIdleTimeDefaultTimeoutSecondsInSeconds defines the default idle timeout in seconds. LoadBalancerAttributeIdleTimeDefaultTimeoutSecondsInSeconds = "60" ) diff --git a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/types.go b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/types.go index 545c4f320..55ce2f9cc 100644 --- a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/types.go +++ b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/types.go @@ -80,6 +80,7 @@ const ( ExternalResourceGCTasksAnnotation = "aws.cluster.x-k8s.io/external-resource-tasks-gc" ) +// GCTask defines a task to be executed by the garbage collector. type GCTask string var ( @@ -313,6 +314,7 @@ type InstanceMetadataOptions struct { InstanceMetadataTags InstanceMetadataState `json:"instanceMetadataTags,omitempty"` } +// SetDefaults sets the default values for the InstanceMetadataOptions. func (obj *InstanceMetadataOptions) SetDefaults() { if obj.HTTPEndpoint == "" { obj.HTTPEndpoint = InstanceMetadataEndpointStateEnabled diff --git a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go index fa6fe0e59..ee0dc510c 100644 --- a/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go +++ b/api/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go @@ -743,7 +743,7 @@ func (in *AWSMachineSpec) DeepCopyInto(out *AWSMachineSpec) { if in.Ignition != nil { in, out := &in.Ignition, &out.Ignition *out = new(Ignition) - **out = **in + (*in).DeepCopyInto(*out) } if in.SpotMarketOptions != nil { in, out := &in.SpotMarketOptions, &out.SpotMarketOptions @@ -1332,6 +1332,16 @@ func (in *IPv6) DeepCopy() *IPv6 { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Ignition) DeepCopyInto(out *Ignition) { *out = *in + if in.Proxy != nil { + in, out := &in.Proxy, &out.Proxy + *out = new(IgnitionProxy) + (*in).DeepCopyInto(*out) + } + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(IgnitionTLS) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ignition. @@ -1344,6 +1354,56 @@ func (in *Ignition) DeepCopy() *Ignition { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IgnitionProxy) DeepCopyInto(out *IgnitionProxy) { + *out = *in + if in.HTTPProxy != nil { + in, out := &in.HTTPProxy, &out.HTTPProxy + *out = new(string) + **out = **in + } + if in.HTTPSProxy != nil { + in, out := &in.HTTPSProxy, &out.HTTPSProxy + *out = new(string) + **out = **in + } + if in.NoProxy != nil { + in, out := &in.NoProxy, &out.NoProxy + *out = make([]IgnitionNoProxy, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IgnitionProxy. +func (in *IgnitionProxy) DeepCopy() *IgnitionProxy { + if in == nil { + return nil + } + out := new(IgnitionProxy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IgnitionTLS) DeepCopyInto(out *IgnitionTLS) { + *out = *in + if in.CASources != nil { + in, out := &in.CASources, &out.CASources + *out = make([]IgnitionCASource, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IgnitionTLS. +func (in *IgnitionTLS) DeepCopy() *IgnitionTLS { + if in == nil { + return nil + } + out := new(IgnitionTLS) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IngressRule) DeepCopyInto(out *IngressRule) { *out = *in