1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00

122 Commits

Author SHA1 Message Date
Sandhya Dasu
3a1ca8f3dd Check for FeatureGates when ipFamily can be set to DualStack
Make sure that ipFamily can be set to DualStackIPv4Primary and
DualStackIPv6Primary only when the platform based featuregates
have been enabled.
2026-01-15 13:17:58 -05:00
Sandhya Dasu
8812b8e56f Add ipFamily as an install-config field for AWS and Azure
Includes validation for input values and unit tests for this new
install-config parameter.
2026-01-15 13:17:42 -05:00
Thuan Vo
2a98b2b4af aws: set machine pool defaults for EBS volume type
Set the default type EBS volume for machine pools:
- Controlplane, arbiter and worker pool default to gp3 volume.
- Edge pool default to gp2 volume.

The default decision is taken from existing code [0]. This commit just
makes the defaulting earlier.

This also loosens the validation to allow 0 for volume size and iops as
they are int type (i.e. not pointer).

Reference:

[0] fd5a518e49/pkg/asset/machines/worker.go (L102-L117)
2025-12-01 20:31:03 -08:00
John Hixson
d93d030520 AWS: Add the ability to configure throughput on GP3 volumes
GP3 volumes have the ability to configure throughput from 125 MiB/s to
2000 MiB/s. This allows the ability to set this at install time in the
install-config.

https://issues.redhat.com/browse/CORS-4212
2025-12-01 17:14:07 -08:00
Jianlin Liu
33578b2ebe Revert "Merge pull request #9945 from jhixson74/main_aws_gp3_throughput"
This reverts commit e81ba7f50f, reversing
changes made to 5060ac90b9.
2025-11-26 04:46:32 -05:00
openshift-merge-bot[bot]
e81ba7f50f Merge pull request #9945 from jhixson74/main_aws_gp3_throughput
CORS-4212: AWS: Add the ability to configure throughput on GP3 volumes
2025-11-22 13:56:34 +00:00
John Hixson
fdde8b0ece AWS: Add the ability to configure throughput on GP3 volumes
GP3 volumes have the ability to configure throughput from 125 MiB/s to
2000 MiB/s. This allows the ability to set this at install time in the
install-config.

https://issues.redhat.com/browse/CORS-4212
2025-11-21 10:15:54 -08:00
Fangge Jin
bf77b3a834 aws: Add support for AMD SEV-SNP VMs
Signed-off-by: Fangge Jin <fjin@redhat.com>
2025-11-20 20:10:52 -05:00
Mark Old
8ccbf40fff Add generated DeepCopy implementations for pkg/types/installconfig 2025-11-18 22:28:04 -08:00
openshift-merge-bot[bot]
4180662515 Merge pull request #10060 from patrickdillon/capi-one-eleven
CORS-4262: update openshift/api & capi v1.11
2025-11-13 03:23:32 +00:00
Patrick Dillon
cc99514053 unit tests: fix breakage caused by client-go & apimachinery bump
Changes in the apimachinery and client-go packages broke our unit
tests after upgrade. client-go stopped serializing the empty
preferences: {} field for the kubeconfig. apimachinery, with
c58e197ee8
caused much more extensive breakage by changing the format with
which errors are returned, and our unit tests hard code the
expected error messages.

For the most part, I used claude to fix these issues, and here
is the summary it created:

Changes Made
Root Cause: The k8s apimachinery package (errors.go:93-96) now uses json.Marshal()
to format BadValue in error messages instead of Go's native format. Error Format Changes:

Arrays: []string{"a", "b"} → ["a","b"] (JSON format, no spaces)
Nil values: []string(nil) → null
Structs: aws.Subnet{ID:"x", Roles:...} → {"id":"x"} (JSON with lowercase keys)
Custom types: gcp.OSImage{Name:"x", Project:"y"} → {"name":"x","project":"y"}
2025-11-07 09:03:40 -05:00
Thuan Vo
d3fa7b007f CORS-4126: add descriptions for ap-southeast-6
The upgrade to AWS SDK v2 removes the ability to look up the region
description; thus, we are keeping the lookup map in the installer code.

This updates the lookup map to support new region ap-southeast-6

Reference

https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html
2025-11-06 13:17:48 -08:00
Sandhya Dasu
573b8dd346 Update to use the renamed featuregates 2025-07-30 09:40:43 -04:00
openshift-merge-bot[bot]
771e512a26 Merge pull request #9816 from barbacbd/OCPBUGS-57527
OCPBUGS-57527: Add descriptions back to the aws survey
2025-07-21 19:15:12 +00:00
openshift-merge-bot[bot]
fde59329e7 Merge pull request #9759 from barbacbd/CORS-4062
CORS-4062: Migrate endpoints in pkg/types/aws/platform.go to sdk v2
2025-07-09 22:09:31 +00:00
barbacbd
4e9830b82b OCPBUGS-57527: Add descriptions back to the aws survey
pkg/types/aws/regions.go: Create a map of the region to the descriptive name
pkg/asset/installconfig/aws/platform.go: Add the description information to the survey.
2025-07-01 14:31:11 -04:00
Trilok Geer
743f48dea8 Removes instances of deprecated experimentalPropagateUserTags
Signed-off-by: Trilok Geer <tgeer@redhat.com>
2025-06-05 10:37:41 +05:30
barbacbd
1d2b0cd2a5 CORS-4062: Migrate endpoints in pkg/types/aws/platform.go to sdk v2
pkg/types/aws:

** Remove the endpoints package from aws sdk v1.
** Remove the function to check for secret regions

pkg/asset/installconfig/aws:

** Add a function to check for secret regions.
** The function was moved here (and changed) because the types package
should not make api calls. As we migrated to aws sdk v2 the partitions are no
longer publicly available BUT we can access them through endpoints. To get the
partition we go through the ec2 api (make a proxy call) and get the endpoint
from that call then the endpoint will provide us with the partition.
2025-06-02 15:51:00 -04:00
Thuan Vo
97fffacbe5 CORS-3867: fix CRD descriptor to mention required BootstrapNode role
In manual role selection, BootstrapNode role is required. This should be
reflected in the CRD descriptor (i.e. openshift-install explain).
2025-04-10 20:49:08 -07:00
Thuan Vo
bb806dfa48 OCPBUGS-53439: fix inconsistent subnet role name for bootstrap node
Previously, the installer supports role BootstrapNode but the CRD
descriptor says Bootstrap.
2025-04-09 16:04:59 -07:00
Thuan Vo
0b6e985258 test: assertions should be performed on the expected err message
Previously, the expected error message is not actually being compared for
assertions.
2025-04-04 16:47:19 -07:00
Thuan Vo
25b01075d7 crd: adjust wordings for no-untagged-subnets requirement
This ensures that the users understand the installer rejects BYO VPC
that has "other" untagged subnets, that are not provided in the
install-config.
2025-04-04 16:47:18 -07:00
Thuan Vo
306643dd8a CORS-3869: static validation for new vpc.subnets field
This include static validations for the vpc.subnets field (no call to
AWS API is performed). The validation criteria can be found at jira
ticket [0] and enhancement proposal [1]. Summary of validation criteria:

- There are no duplicate subnet IDs.
- There can only be maximum 10 subnets assigned IngressControllerLB role.
- Either all subnets must have roles assigned or none at all.
- For a subnet that has defined roles
  - Roles must be of supported types (i.e. from a set of defined roles)
  - Roles must not be duplicate. This and * check naturally validates that a subnet can only have max 5 roles
  - EdgeNode cannot be combined with any other roles
  - ClusterNode, IngressControllerLB, ControlPlaneExternalLB (if cluster is external), and ControlPlaneInternalLB must be assigned to at least 1 subnet
  - A subnet cannot have both role ControlPlaneExternalLB and ControlPlaneInternalLB *
  - If the cluster is internal, ControlPlaneExternalLB must not be assigned to any subnets.

References:

[0] https://issues.redhat.com/browse/CORS-3869
[1] 30f44ee0cd/enhancements/installer/aws-lb-subnet-selection.md (installer-validation-rules)
2025-02-26 18:32:53 -08:00
Thuan Vo
a77ee2433e migration: replace usage of deprecated subnets field with vpc.subnets
This include changes to the aws metadata: the field subnets now has type
[]Subnet (where type Subnet is defined in pkg/types/aws/platform.go).
2025-02-18 09:03:17 -08:00
Thuan Vo
4c4b4b948b CORS-3868: convert deprecated platform.aws.subnets to platform.aws.vpc.subnets if used
The field platform.aws.subnets is deprecated but replaced by
platform.aws.vpc.subnets for more flexible configurations.

If the users use the old field (i.e. an existing install-config), the
install will convert that to the new one. However, only either one of
the field can be defined (i.e. exit error if both are specified).
2025-02-18 09:03:17 -08:00
Thuan Vo
effc67bc6b CORS-3867: define platform.vpc.subnets field in install-config
Following proposal for selecting LB subnets, the field
platform.vpc.subnets will be introduced for more flexible
configurations. This enhancement proposal is available reference [0].

There are some adjustments to the API markers and descriptions in comparison to
the proposal.
- Organize field description for easier read.
- Correct kubebuilder:validation:MaxItems on array field

References:

[0] 2890cccf20/enhancements/installer/aws-lb-subnet-selection.md
2025-02-18 09:03:17 -08:00
Marco Braga
c3af0f4d73 OCPBUGS-47477: aws: add supported zones to skip undesired
Add the method to skip undesired zones when discoverying zones from
metadata.

This change targets explicity to skup the zone us-east-1e which provides
very limited offerings of EC2, with no EC2 supported by installer.

This change prevents creating infrastructure in such zone as it will
not be supported to run workloads (create instances) on it.
2024-12-20 10:40:27 -03:00
Brent Barbachem
9e7332c267 OCPBUGS-44199: Allow spaces in the aws tags
** White space should be allowed in aws tags.
2024-11-13 07:36:46 -05:00
Brent Barbachem
390cd0dfd8 OCPBUGS-44171: Validate aws userTags when supplied
** AWS User tags support white space as valid characters.
** User tags should be validated every time that they are supplied not
only when propagateTags is True.
2024-11-04 15:21:50 -05:00
Brent Barbachem
8cfff41ef1 ** Added the AWSClusterHostedDNS Featureset from API. 2024-10-18 12:27:04 -04:00
Brent Barbachem
bf66e76d42 CORS-3696: Add AWS User Provisioned DNS option to install config
** The AWS platform will now include the userProvisionedDNS option. The
user can Enable the feature with "Enabled". The default value is "Disabled".
2024-10-18 12:27:04 -04:00
Rafael Fonseca
f4f481925f aws: move public-only subnets env var check to function
The check was duplicated in multiple places which makes it harder to
update the logic around the env var if we ever need to.
2024-08-20 16:47:17 +02:00
openshift-merge-bot[bot]
fe126cafe8 Merge pull request #8755 from r4f4/aws-deprec-platform-amiid
CORS-3608: aws: deprecate platform.aws.amiID field
2024-08-07 23:44:23 +00:00
Rafael Fonseca
e390b89ea3 ic/aws: add iamProfile input field to install-config
With this field, a user will be able to BYO instance profile.
2024-07-24 09:53:17 +02:00
Rafael Fonseca
85a3545ebc CORS-3608: aws: deprecate platform.aws.amiID field
This field was introduced [1] before the Installer had support for
custom AMIs in machine pools [2]. Now that it does, the same
functionality is achieved via the defaultMachinePlatform field
`platform.aws.defaultMachinePlatform.amiID`

[1] fdf94e39ee
[2] bc47222576
2024-07-19 21:42:16 +02:00
Rafael Fonseca
f5cfcd41c4 OCPBUGS-33661: capi/aws: rename preserveBootstrapIgnition
The name doesn't really reflect the purpose of the field, but the
terraform implementation instead. Since the implementation has changed
in capi/capa, let's rename it so users don't expect the ignition object
to not be destroyed when there are enough permissions.

The old field is kept for the deprecation period but will be removed in
the future in favor of the new `BestEffortDeleteIgnition`.
2024-06-07 10:53:47 +02:00
Brent Barbachem
c6f91d6878 OCPBUGS-31711: AWS update explain docs
** The go docs in the install-config's platform.aws.lbType is misleading as well as on the ingress object (oc explain ingresses.config.openshift.io.spec.loadBalancer.platform.aws.type).
Update the docs to further explain the ingress controller info.
2024-04-15 09:36:05 -04:00
Patrick Dillon
9c31c63b1d pkg/types/aws: limit additionalSecurityGroups to 10
AWS has a limit of 16 security groups. This limits the users to supply
10 security groups and reserves the additional 6 for OpenShift, which
leaves room for additional features such as using CAPI for installs.
2024-03-19 18:37:04 -04:00
Marco Braga
1fc258ee15 aws/type/api: add support of field publicIpv4Pool
Add the support of publicIpv4Pool (platform.aws) on install-config
to set the Public IPv4 Pool ID that the user brought to the AWS
Account.
2024-02-21 15:10:49 -03:00
Marco Braga
d655486bf6 typo/aws/type: correct service name for AWS Wavelentgh Zones
The commit[1] introduced the AWS Wavelength Zones type, which has a typo
in the correct service name[2].

[1] 5bc9c3bae8
[2] https://aws.amazon.com/wavelength/
2023-12-04 15:33:31 -03:00
Marco Braga
d850e1174e aws instances: appending r5.2xlarge to preferred list for WLZ
AWS offers limited instance types in Wavelength Zones. It is required
to installer choose at least one supported (by RH, tested by QE) EC2 Type.
To do so, it is required to query AWS EC2 API to check offerings across
all Wavelength Zones in all regions.

The following data is insights about that:

2023-08-08 19:00:39.278646>> EC2 Offerings summary (total zones)
Total items: 4
t3.xlarge: 30
r5.2xlarge: 30
t3.medium: 30
g4dn.2xlarge: 30

2023-08-08 19:00:39.278646>> Zones by Family

			   g4dn.2x t3.medium t3.xlarge r5.2xlarge
zone
ap-northeast-1-wl1-kix-wlz-1	X	X	X	X
ap-northeast-1-wl1-nrt-wlz-1	X	X	X	X
ap-northeast-2-wl1-cjj-wlz-1	X	X	X	X
ap-northeast-2-wl1-sel-wlz-1	X	X	X	X
ca-central-1-wl1-yto-wlz-1	X	X	X	X
eu-central-1-wl1-ber-wlz-1	X	X	X	X
eu-central-1-wl1-dtm-wlz-1	X	X	X	X
eu-central-1-wl1-muc-wlz-1	X	X	X	X
eu-west-2-wl1-lon-wlz-1		X	X	X	X
eu-west-2-wl1-man-wlz-1		X	X	X	X
eu-west-2-wl2-man-wlz-1		X	X	X	X
us-east-1-wl1-atl-wlz-1		X	X	X	X
us-east-1-wl1-bna-wlz-1		X	X	X	X
us-east-1-wl1-bos-wlz-1		X	X	X	X
us-east-1-wl1-chi-wlz-1		X	X	X	X
us-east-1-wl1-clt-wlz-1		X	X	X	X
us-east-1-wl1-dfw-wlz-1		X	X	X	X
us-east-1-wl1-dtw-wlz-1		X	X	X	X
us-east-1-wl1-iah-wlz-1		X	X	X	X
us-east-1-wl1-mia-wlz-1		X	X	X	X
us-east-1-wl1-msp-wlz-1		X	X	X	X
us-east-1-wl1-nyc-wlz-1		X	X	X	X
us-east-1-wl1-tpa-wlz-1		X	X	X	X
us-east-1-wl1-was-wlz-1		X	X	X	X
us-west-2-wl1-den-wlz-1		X	X	X	X
us-west-2-wl1-las-wlz-1		X	X	X	X
us-west-2-wl1-lax-wlz-1		X	X	X	X
us-west-2-wl1-phx-wlz-1		X	X	X	X
us-west-2-wl1-sea-wlz-1		X	X	X	X
us-west-2-wl1-sfo-wlz-1		X	X	X	X
2023-11-22 18:58:11 -03:00
Marco Braga
5bc9c3bae8 types/aws/zone: adding the Zone Type for Wavelength
AWS Wavelength Zone is identified by wavelength-zone by API.
The same type is created internally to represent that zone
following the same convention of other zone types.
2023-11-22 18:58:11 -03:00
OpenShift Merge Robot
fe762c7d08 Merge pull request #7288 from rna-afk/make_s3_deletion_optional
CORS-2700: Make bootstrap S3 bucket optional during bootstrap destroy
2023-08-15 21:06:06 -02:30
OpenShift Merge Robot
b3fc87432f Merge pull request #7345 from r4f4/aws-max-sg
OCPBUGS-16207: ic: aws: validate max security groups
2023-07-26 08:01:18 +02:00
rna-afk
2efcb0b9ee aws: Make bootstrap S3 bucket optional during bootstrap destroy
Making a copy of the AWS bootstrap S3 bucket in the cluster stage
and adding a field to the install config. If the user does not want
to delete the S3 bucket created for the bootstrap, they need to
set the new field to true.

This causes the S3 bucket to be created during the cluster stage
and not the boostrap stage which will then be ignored when the
bootstrap destroy code runs.

More details: https://issues.redhat.com/browse/CORS-2661
2023-07-25 10:57:55 -04:00
Marco Braga
17cd0e9a03 aws cfg meta: add support to store zone attributes
The AWS Zone provides a few attributes that is essential for the
edge compute pool when setting up AWS Local Zones.

The `GroupName` is used to create the labels that can be used
by user-workloads when deploying applications into specific locations.

The `Type` is used to aggregate edge and regular worker zones. Only
`local-zone` type is valid for edge compute pool. This field also
can be used on the user-workloads and it is exposed through Machine/node
label.

The `ParentZoneName` the zone in the region that the Local Zone is attached to.
It is used by installer to discover which VPC private route table the private
subnets on the Local Zones will be associated as t Local Zones does not
support Nat Gateways (and other network resources).

This change create the structure to store the zone attribute to installer
be used into different places (MachineSet creation, EC2 offerings, Gateway
map for tfvars, etc).

It also introduce functions used to discover and filter the zones in the
region.
2023-07-22 01:44:31 -03:00
Rafael Fonseca
9864367beb types: aws: add test for security group validation
Test that the validation fails when the number of security groups
exceeds the maximum.
2023-07-19 21:06:23 +02:00
Rafael Fonseca
4601cad579 OCPBUGS-16207: types: aws: validate max security groups
According to
https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html,
the default Security groups number per network interface is 5 and could
be 16 at most, so we better have some pre-check on the number of
provided custom security groups.

When it's more than 15 (since the maximum is 16, but installer will also
create one (`${var.cluster_id}-master-sg/${var.cluster_id}-worker-sg`),
installer should quit and warn user about this.
2023-07-19 21:06:10 +02:00
OpenShift Merge Robot
156e883801 Merge pull request #7253 from patrickdillon/aws-shared-phz-2
CORS-2645: AWS Cross-Account Private Hosted Zone: Add Further Validations
2023-06-28 22:49:26 +02:00
OpenShift Merge Robot
a4e933c069 Merge pull request #6184 from r4f4/aws-secret-regions
OCPBUGS-13636: new Aws secret regions support
2023-06-21 07:54:05 +02:00