Skip to content

Commit

Permalink
Update all CAPA v1beta1 references to v1beta2
Browse files Browse the repository at this point in the history
Updates all references utilizing "sigs.k8s.io/cluster-api-provider-aws/api/v1beta1" to "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2". Also updated all related import aliases to capiaws.

Signed-off-by: Bryan Cox <[email protected]>
  • Loading branch information
bryan-cox committed Jan 4, 2023
1 parent 1ddc7a5 commit b8362e3
Show file tree
Hide file tree
Showing 25 changed files with 256 additions and 95 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ cluster-api-provider-aws: $(CONTROLLER_GEN)
rm -rf cmd/install/assets/cluster-api-provider-aws/*.yaml
$(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./vendor/sigs.k8s.io/cluster-api-provider-aws/api/v1beta1" output:crd:artifacts:config=cmd/install/assets/cluster-api-provider-aws
$(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./vendor/sigs.k8s.io/cluster-api-provider-aws/exp/api/v1beta1" output:crd:artifacts:config=cmd/install/assets/cluster-api-provider-aws
$(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2" output:crd:artifacts:config=cmd/install/assets/cluster-api-provider-aws

.PHONY: cluster-api-provider-ibmcloud
cluster-api-provider-ibmcloud: $(CONTROLLER_GEN)
Expand Down
2 changes: 1 addition & 1 deletion api/scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/serializer/json"
kasv1beta1 "k8s.io/apiserver/pkg/apis/apiserver/v1beta1"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
capiaws "sigs.k8s.io/cluster-api-provider-aws/api/v1beta1"
capiaws "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2"
capiazure "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
capiibm "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta1"
capikubevirt "sigs.k8s.io/cluster-api-provider-kubevirt/api/v1alpha1"
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/capi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package v1alpha1

// These imports are used to explicitly declare external API dependencies
import (
_ "sigs.k8s.io/cluster-api-provider-aws/api/v1beta1"
_ "sigs.k8s.io/cluster-api-provider-aws/exp/api/v1beta1"
_ "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2"
_ "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta1"
_ "sigs.k8s.io/cluster-api/api/v1beta1"
_ "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1"
Expand Down
3 changes: 1 addition & 2 deletions api/v1beta1/capi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ package v1beta1

// These imports are used to explicitly declare external API dependencies
import (
_ "sigs.k8s.io/cluster-api-provider-aws/api/v1beta1"
_ "sigs.k8s.io/cluster-api-provider-aws/exp/api/v1beta1"
_ "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2"
_ "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta1"
_ "sigs.k8s.io/cluster-api/api/v1beta1"
_ "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1"
Expand Down
2 changes: 1 addition & 1 deletion cmd/cluster/core/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"k8s.io/apimachinery/pkg/labels"
kubeclient "k8s.io/client-go/kubernetes"
restclient "k8s.io/client-go/rest"
capiaws "sigs.k8s.io/cluster-api-provider-aws/api/v1beta1"
capiaws "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2"
capikubevirt "sigs.k8s.io/cluster-api-provider-kubevirt/api/v1alpha1"
capiv1 "sigs.k8s.io/cluster-api/api/v1beta1"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
6 changes: 3 additions & 3 deletions cmd/install/assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const capiLabel = "cluster.x-k8s.io/v1beta1"
// to satisfy CAPI contracts. There might be a way to achieve this during CRD
// generation, but for now we're just post-processing at runtime here.
var capiResources = map[string]string{
"cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsclusters.yaml": "v1beta1",
"cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsmachines.yaml": "v1beta1",
"cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml": "v1beta1",
"cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsclusters.yaml": "v1beta2",
"cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsmachines.yaml": "v1beta2",
"cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml": "v1beta2",
"cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsclusters.yaml": "v1beta1",
"cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsimages.yaml": "v1beta1",
"cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsmachines.yaml": "v1beta1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
singular: awsclustercontrolleridentity
scope: Cluster
versions:
- name: v1beta1
- name: v1beta2
schema:
openAPIV3Schema:
description: AWSClusterControllerIdentity is the Schema for the awsclustercontrolleridentities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
singular: awsclusterroleidentity
scope: Cluster
versions:
- name: v1beta1
- name: v1beta2
schema:
openAPIV3Schema:
description: AWSClusterRoleIdentity is the Schema for the awsclusterroleidentities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
jsonPath: .status.bastion.publicIp
name: Bastion IP
type: string
name: v1beta1
name: v1beta2
schema:
openAPIV3Schema:
description: AWSCluster is the schema for Amazon EC2 based Kubernetes Cluster
Expand Down Expand Up @@ -271,6 +271,19 @@ spec:
description: ID defines a unique identifier to reference
this resource.
type: string
ipv6CidrBlock:
description: IPv6CidrBlock is the IPv6 CIDR block to be
used when the provider creates a managed VPC. A subnet
can have an IPv4 and an IPv6 address. IPv6 is only supported
in managed clusters, this field cannot be set on AWSCluster
object.
type: string
isIpv6:
description: IsIPv6 defines the subnet as an IPv6 subnet.
A subnet is IPv6 when it is associated with a VPC that
has IPv6 enabled. IPv6 is only supported in managed clusters,
this field cannot be set on AWSCluster object.
type: boolean
isPublic:
description: IsPublic defines the subnet as a public subnet.
A subnet is public when it is associated with a route
Expand All @@ -294,8 +307,13 @@ spec:
description: Tags is a collection of tags describing the
resource.
type: object
required:
- id
type: object
type: array
x-kubernetes-list-map-keys:
- id
x-kubernetes-list-type: map
vpc:
description: VPC configuration.
properties:
Expand Down Expand Up @@ -332,6 +350,25 @@ spec:
description: InternetGatewayID is the id of the internet gateway
associated with the VPC.
type: string
ipv6:
description: IPv6 contains ipv6 specific settings for the
network. Supported only in managed clusters. This field
cannot be set on AWSCluster object.
properties:
cidrBlock:
description: CidrBlock is the CIDR block provided by Amazon
when VPC has enabled IPv6.
type: string
egressOnlyInternetGatewayId:
description: EgressOnlyInternetGatewayID is the id of
the egress only internet gateway associated with an
IPv6 enabled VPC.
type: string
poolId:
description: PoolID is the IP pool which must be defined
in case of BYO IP is defined.
type: string
type: object
tags:
additionalProperties:
type: string
Expand Down Expand Up @@ -779,6 +816,12 @@ spec:
fromPort:
format: int64
type: integer
ipv6CidrBlocks:
description: List of IPv6 CIDR blocks to allow access
from. Cannot be specified with SourceSecurityGroupID.
items:
type: string
type: array
protocol:
description: SecurityGroupProtocol defines the protocol
type for a security group rule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
singular: awsclusterstaticidentity
scope: Cluster
versions:
- name: v1beta1
- name: v1beta2
schema:
openAPIV3Schema:
description: AWSClusterStaticIdentity is the Schema for the awsclusterstaticidentities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
name: v1beta2
schema:
openAPIV3Schema:
description: AWSClusterTemplate is the schema for Amazon EC2 based Kubernetes
Expand Down Expand Up @@ -291,6 +291,20 @@ spec:
description: ID defines a unique identifier to reference
this resource.
type: string
ipv6CidrBlock:
description: IPv6CidrBlock is the IPv6 CIDR block
to be used when the provider creates a managed
VPC. A subnet can have an IPv4 and an IPv6 address.
IPv6 is only supported in managed clusters, this
field cannot be set on AWSCluster object.
type: string
isIpv6:
description: IsIPv6 defines the subnet as an IPv6
subnet. A subnet is IPv6 when it is associated
with a VPC that has IPv6 enabled. IPv6 is only
supported in managed clusters, this field cannot
be set on AWSCluster object.
type: boolean
isPublic:
description: IsPublic defines the subnet as a public
subnet. A subnet is public when it is associated
Expand All @@ -316,8 +330,13 @@ spec:
description: Tags is a collection of tags describing
the resource.
type: object
required:
- id
type: object
type: array
x-kubernetes-list-map-keys:
- id
x-kubernetes-list-type: map
vpc:
description: VPC configuration.
properties:
Expand Down Expand Up @@ -356,6 +375,25 @@ spec:
description: InternetGatewayID is the id of the internet
gateway associated with the VPC.
type: string
ipv6:
description: IPv6 contains ipv6 specific settings
for the network. Supported only in managed clusters.
This field cannot be set on AWSCluster object.
properties:
cidrBlock:
description: CidrBlock is the CIDR block provided
by Amazon when VPC has enabled IPv6.
type: string
egressOnlyInternetGatewayId:
description: EgressOnlyInternetGatewayID is the
id of the egress only internet gateway associated
with an IPv6 enabled VPC.
type: string
poolId:
description: PoolID is the IP pool which must
be defined in case of BYO IP is defined.
type: string
type: object
tags:
additionalProperties:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name
name: Machine
type: string
name: v1beta1
name: v1beta2
schema:
openAPIV3Schema:
description: AWSMachine is the schema for Amazon EC2 machines.
Expand Down Expand Up @@ -74,10 +74,6 @@ spec:
resource by ID or filters. Only one of ID or Filters may be specified.
Specifying more than one will result in a validation error.
properties:
arn:
description: 'ARN of resource. Deprecated: This field has no
function and is going to be removed in the next release.'
type: string
filters:
description: 'Filters is a set of key/value pairs used to identify
a resource They are applied according to the rules defined
Expand Down Expand Up @@ -158,13 +154,6 @@ spec:
- ssm-parameter-store
type: string
type: object
failureDomain:
description: FailureDomain is the failure domain unique identifier
this Machine should be attached to, as defined in Cluster API. For
this infrastructure provider, the ID is equivalent to an AWS Availability
Zone. If multiple subnets are matched for the availability zone,
the first one returned is picked.
type: string
iamInstanceProfile:
description: IAMInstanceProfile is a name of an IAM instance profile
to assign to the instance
Expand Down Expand Up @@ -328,10 +317,6 @@ spec:
description: Subnet is a reference to the subnet to use for this instance.
If not specified, the cluster subnet will be used.
properties:
arn:
description: 'ARN of resource. Deprecated: This field has no function
and is going to be removed in the next release.'
type: string
filters:
description: 'Filters is a set of key/value pairs used to identify
a resource They are applied according to the rules defined by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
singular: awsmachinetemplate
scope: Namespaced
versions:
- name: v1beta1
- name: v1beta2
schema:
openAPIV3Schema:
description: AWSMachineTemplate is the schema for the Amazon EC2 Machine Templates
Expand Down Expand Up @@ -83,11 +83,6 @@ spec:
may be specified. Specifying more than one will result
in a validation error.
properties:
arn:
description: 'ARN of resource. Deprecated: This field
has no function and is going to be removed in the
next release.'
type: string
filters:
description: 'Filters is a set of key/value pairs used
to identify a resource They are applied according
Expand Down Expand Up @@ -172,13 +167,6 @@ spec:
- ssm-parameter-store
type: string
type: object
failureDomain:
description: FailureDomain is the failure domain unique identifier
this Machine should be attached to, as defined in Cluster
API. For this infrastructure provider, the ID is equivalent
to an AWS Availability Zone. If multiple subnets are matched
for the availability zone, the first one returned is picked.
type: string
iamInstanceProfile:
description: IAMInstanceProfile is a name of an IAM instance
profile to assign to the instance
Expand Down Expand Up @@ -350,11 +338,6 @@ spec:
this instance. If not specified, the cluster subnet will
be used.
properties:
arn:
description: 'ARN of resource. Deprecated: This field
has no function and is going to be removed in the next
release.'
type: string
filters:
description: 'Filters is a set of key/value pairs used
to identify a resource They are applied according to
Expand Down Expand Up @@ -405,6 +388,21 @@ spec:
required:
- template
type: object
status:
description: AWSMachineTemplateStatus defines a status for an AWSMachineTemplate.
properties:
capacity:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Capacity defines the resource capacity for this machine.
This value is used for autoscaling from zero operations as defined
in: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md'
type: object
type: object
type: object
served: true
storage: true
Loading

0 comments on commit b8362e3

Please sign in to comment.