Skip to content

Commit 5393904

Browse files
Merge pull request #576 from openshift-cloud-team/rebase-bot-main
OCPBUGS-63046: Merge https://github.com/kubernetes-sigs/cluster-api-provider-aws:v2.9.2 (d3a7da1) into main
2 parents 1949662 + 8d90d95 commit 5393904

File tree

8,541 files changed

+549539
-217497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,541 files changed

+549539
-217497
lines changed

PROJECT

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,9 @@ resources:
5858
- group: infrastructure
5959
version: v1beta2
6060
kind: AWSManagedCluster
61+
- group: infrastructure
62+
kind: ROSARoleConfig
63+
version: v1beta2
64+
- group: infrastructure
65+
kind: ROSANetwork
66+
version: v1beta2

api/v1beta2/awsmachine_webhook.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,13 @@ func (r *AWSMachine) validateNetworkElasticIPPool() field.ErrorList {
384384
func (r *AWSMachine) validateCapacityReservation() field.ErrorList {
385385
var allErrs field.ErrorList
386386
if r.Spec.CapacityReservationID != nil && r.Spec.CapacityReservationPreference != CapacityReservationPreferenceOnly && r.Spec.CapacityReservationPreference != "" {
387-
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationPreference"), "when a reservation ID is specified, capacityReservationPreference may only be 'CapacityReservationsOnly' or empty"))
387+
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationPreference"), "when capacityReservationId is specified, capacityReservationPreference may only be 'CapacityReservationsOnly' or empty"))
388388
}
389389
if r.Spec.CapacityReservationPreference == CapacityReservationPreferenceOnly && r.Spec.MarketType == MarketTypeSpot {
390-
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationPreference"), "when MarketType is set to 'Spot', capacityReservationPreference cannot be set to 'CapacityReservationsOnly'"))
390+
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationPreference"), "when marketType is set to 'Spot', capacityReservationPreference cannot be set to 'CapacityReservationsOnly'"))
391391
}
392392
if r.Spec.CapacityReservationPreference == CapacityReservationPreferenceOnly && r.Spec.SpotMarketOptions != nil {
393-
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationPreference"), "when capacityReservationPreference is 'CapacityReservationsOnly', SpotMarketOptions cannot be set (which implies MarketType: 'Spot')"))
393+
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationPreference"), "when capacityReservationPreference is 'CapacityReservationsOnly', spotMarketOptions cannot be set (which implies marketType: 'Spot')"))
394394
}
395395
return allErrs
396396
}

cloudbuild-nightly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# See https://cloud.google.com/cloud-build/docs/build-config
2-
timeout: 3000s
2+
timeout: 7200s
33
options:
44
substitution_option: ALLOW_LOOSE
55
steps:

cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# See https://cloud.google.com/cloud-build/docs/build-config
2-
timeout: 3000s
2+
timeout: 7200s
33
options:
44
substitution_option: ALLOW_LOOSE
55
steps:

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

Lines changed: 64 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,25 @@ spec:
6363
AuditLogRoleARN defines the role that is used to forward audit logs to AWS CloudWatch.
6464
If not set, audit log forwarding is disabled.
6565
type: string
66+
autoNode:
67+
description: autoNode set the autoNode mode and roleARN.
68+
properties:
69+
mode:
70+
default: Disabled
71+
description: mode specifies the mode for the AutoNode. Setting
72+
Enable/Disable mode will allows/disallow karpenter AutoNode
73+
scaling.
74+
enum:
75+
- Enabled
76+
- Disabled
77+
type: string
78+
roleARN:
79+
description: |-
80+
roleARN sets the autoNode role ARN, which includes the IAM policy and cluster-specific role that grant the necessary permissions to the Karpenter controller.
81+
The role must be attached with the same OIDC-ID that is used with the ROSA-HCP cluster.
82+
maxLength: 2048
83+
type: string
84+
type: object
6685
availabilityZones:
6786
description: |-
6887
AvailabilityZones describe AWS AvailabilityZones of the worker nodes.
@@ -525,8 +544,9 @@ spec:
525544
- name
526545
type: object
527546
installerRoleARN:
528-
description: InstallerRoleARN is an AWS IAM role that OpenShift Cluster
529-
Manager will assume to create the cluster..
547+
description: |-
548+
InstallerRoleARN is an AWS IAM role that OpenShift Cluster Manager will assume to create the cluster.
549+
Required if RosaRoleConfigRef is not specified.
530550
type: string
531551
network:
532552
description: Network config for the ROSA HCP cluster.
@@ -560,7 +580,9 @@ spec:
560580
type: string
561581
type: object
562582
oidcID:
563-
description: The ID of the internal OpenID Connect Provider.
583+
description: |-
584+
The ID of the internal OpenID Connect Provider.
585+
Required if RosaRoleConfigRef is not specified.
564586
type: string
565587
x-kubernetes-validations:
566588
- message: oidcID is immutable
@@ -576,8 +598,9 @@ spec:
576598
description: The AWS Region the cluster lives in.
577599
type: string
578600
rolesRef:
579-
description: AWS IAM roles used to perform credential requests by
580-
the openshift operators.
601+
description: |-
602+
AWS IAM roles used to perform credential requests by the openshift operators.
603+
Required if RosaRoleConfigRef is not specified.
581604
properties:
582605
controlPlaneOperatorARN:
583606
description: "ControlPlaneOperatorARN is an ARN value referencing
@@ -777,6 +800,38 @@ spec:
777800
x-kubernetes-validations:
778801
- message: rosaClusterName is immutable
779802
rule: self == oldSelf
803+
rosaNetworkRef:
804+
description: |-
805+
ROSANetworkRef references ROSANetwork custom resource that contains the networking infrastructure
806+
for the ROSA HCP cluster.
807+
properties:
808+
name:
809+
default: ""
810+
description: |-
811+
Name of the referent.
812+
This field is effectively required, but due to backwards compatibility is
813+
allowed to be empty. Instances of this type with an empty value here are
814+
almost certainly wrong.
815+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
816+
type: string
817+
type: object
818+
x-kubernetes-map-type: atomic
819+
rosaRoleConfigRef:
820+
description: |-
821+
RosaRoleConfigRef is a reference to a RosaRoleConfig resource that contains account roles, operator roles and OIDC configuration.
822+
RosaRoleConfigRef and role fields such as installerRoleARN, supportRoleARN, workerRoleARN, rolesRef and oidcID are mutually exclusive.
823+
properties:
824+
name:
825+
default: ""
826+
description: |-
827+
Name of the referent.
828+
This field is effectively required, but due to backwards compatibility is
829+
allowed to be empty. Instances of this type with an empty value here are
830+
almost certainly wrong.
831+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
832+
type: string
833+
type: object
834+
x-kubernetes-map-type: atomic
780835
subnets:
781836
description: |-
782837
The Subnet IDs to use when installing the cluster.
@@ -788,6 +843,7 @@ spec:
788843
description: |-
789844
SupportRoleARN is an AWS IAM role used by Red Hat SREs to enable
790845
access to the cluster account in order to provide support.
846+
Required if RosaRoleConfigRef is not specified.
791847
type: string
792848
version:
793849
description: OpenShift semantic version, for example "4.14.5".
@@ -806,22 +862,16 @@ spec:
806862
- AlwaysAcknowledge
807863
type: string
808864
workerRoleARN:
809-
description: WorkerRoleARN is an AWS IAM role that will be attached
810-
to worker instances.
865+
description: |-
866+
WorkerRoleARN is an AWS IAM role that will be attached to worker instances.
867+
Required if RosaRoleConfigRef is not specified.
811868
type: string
812869
required:
813-
- availabilityZones
814870
- channelGroup
815-
- installerRoleARN
816-
- oidcID
817871
- region
818-
- rolesRef
819872
- rosaClusterName
820-
- subnets
821-
- supportRoleARN
822873
- version
823874
- versionGate
824-
- workerRoleARN
825875
type: object
826876
status:
827877
description: RosaControlPlaneStatus defines the observed state of ROSAControlPlane.

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ spec:
8888
AvailabilityZone is an optinal field specifying the availability zone where instances of this machine pool should run
8989
For Multi-AZ clusters, you can create a machine pool in a Single-AZ of your choice.
9090
type: string
91+
capacityReservationID:
92+
description: |-
93+
CapacityReservationID specifies the ID of an AWS On-Demand Capacity Reservation and Capacity Blocks for ML.
94+
The CapacityReservationID must be pre-created in advance, before creating a NodePool.
95+
type: string
9196
instanceType:
9297
description: InstanceType specifies the AWS instance type
9398
type: string

0 commit comments

Comments
 (0)