Skip to content

Commit 1bc6ce8

Browse files
committed
Make subnet spec id field required for SSA to work with CC
1 parent 14109e7 commit 1bc6ce8

4 files changed

+23
-1
lines changed

api/v1beta2/network_types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func (v *VPCSpec) IsIPv6Enabled() bool {
242242
// SubnetSpec configures an AWS Subnet.
243243
type SubnetSpec struct {
244244
// ID defines a unique identifier to reference this resource.
245-
ID string `json:"id,omitempty"`
245+
ID string `json:"id"`
246246

247247
// CidrBlock is the CIDR block to be used when the provider creates a managed VPC.
248248
CidrBlock string `json:"cidrBlock,omitempty"`
@@ -284,6 +284,8 @@ func (s *SubnetSpec) String() string {
284284
}
285285

286286
// Subnets is a slice of Subnet.
287+
// +listType=map
288+
// +listMapKey=id
287289
type Subnets []SubnetSpec
288290

289291
// ToMap returns a map from id to subnet.

config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,13 @@ spec:
446446
description: Tags is a collection of tags describing the
447447
resource.
448448
type: object
449+
required:
450+
- id
449451
type: object
450452
type: array
453+
x-kubernetes-list-map-keys:
454+
- id
455+
x-kubernetes-list-type: map
451456
vpc:
452457
description: VPC configuration.
453458
properties:
@@ -1719,8 +1724,13 @@ spec:
17191724
description: Tags is a collection of tags describing the
17201725
resource.
17211726
type: object
1727+
required:
1728+
- id
17221729
type: object
17231730
type: array
1731+
x-kubernetes-list-map-keys:
1732+
- id
1733+
x-kubernetes-list-type: map
17241734
vpc:
17251735
description: VPC configuration.
17261736
properties:

config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,13 @@ spec:
11531153
description: Tags is a collection of tags describing the
11541154
resource.
11551155
type: object
1156+
required:
1157+
- id
11561158
type: object
11571159
type: array
1160+
x-kubernetes-list-map-keys:
1161+
- id
1162+
x-kubernetes-list-type: map
11581163
vpc:
11591164
description: VPC configuration.
11601165
properties:

config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,13 @@ spec:
757757
description: Tags is a collection of tags describing
758758
the resource.
759759
type: object
760+
required:
761+
- id
760762
type: object
761763
type: array
764+
x-kubernetes-list-map-keys:
765+
- id
766+
x-kubernetes-list-type: map
762767
vpc:
763768
description: VPC configuration.
764769
properties:

0 commit comments

Comments
 (0)