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

48 Commits

Author SHA1 Message Date
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
Patrick Dillon
8fa9860b37 pkg/types: set Azure machine pool defaults from defaultMachinePlatform
This commit updates default value handling when loading the
install config to set values in machine pools based on the
defaultMachinePlatform.

By populating the values directly in the install config, we can
avoid repetitive checks throughout the codebase to ensure the
default machine platform is applied to the relevant machine pool.
2025-11-21 15:37:52 -05:00
Patrick Dillon
c0d0721a4d pkg/types: remove nodeswap featuregate
Featuregate was removed from openshift/api in
https://github.com/openshift/api/pull/2494/
2025-11-07 09:03:40 -05:00
openshift-merge-bot[bot]
c36c0d7600 Merge pull request #9734 from shiftstack/OCPBUGS-43783
OSASINFRA-3915: openstack: Start setting CredentialsMode
2025-10-14 03:27:57 +00:00
openshift-merge-bot[bot]
3b1baa0286 Merge pull request #9781 from barbacbd/OCPBUGS-51299-validation
OCPBUGS-51299: Add default values for validation to kms keys
2025-08-15 23:40:46 +00:00
barbacbd
dc5a636c0f OCPBUGS-51299: Add default values for validation to kms keys
installconfig/gcp:

** Add default location and project to the kms key validation. The installer does not
require these fields to be entered, so the defaults will be selected from the projectID and
region fields of the GCP Platform.
2025-08-13 20:01:04 -04:00
Joseph Callen
a5c9a11fe7 Setup disks via MachineConfigs
Added platform-agnostic multi-disk support using Ignition configuration embedded in MachineConfigs
Created new disk types: etcd, swap, and user-defined disks
Implemented disk setup validation and feature gates
Added machine config generation for disk provisioning

Review and unit tests were assisted-by: cursor
2025-07-28 08:05:09 -04:00
Stephen Finucane
6c83f9f3ef openstack: Start setting CredentialsMode
This is done for the other platforms. Do it now for OpenStack.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-07-16 16:46:03 +01:00
Michael Shitrit
e2e3ccf8c2 Apply review feedback
- refactor some method location for clearer code
- use feature gate in a better structured way to align with standards
- Add compute validation
- tests for added changes
- use log in a old legacy method
- better API description

Signed-off-by: Michael Shitrit <mshitrit@redhat.com>
2025-03-21 08:08:20 +02:00
Gilad Ravid
b28846bd41 OCPEDGE-1635: Set default values for arbiter 2025-03-03 21:45:25 +02:00
Mark Hamzy
836e6b1dd9 PowerVS: Listen to machineNetwork
In CAPI, we use a random machineNetwork instead of using the one passed
in by the user.
2024-12-03 14:40:32 -06:00
Rafael Fonseca
9211013e1d OCPBUGS-35523: remove terraform libvirt from the installer
libvirt IPI has never been supported.
2024-06-15 10:33:26 +02:00
Marco Braga
02eadd003b aws validation: install-config for edge pool to new subnets
The edge pool is valid for AWS Local Zones when installing a
cluster in existing subnets and, now, in new clusters.

The edge compute pool in install-config.yaml requires the platform
specific zone field when the subnets is not provided, assuming
a new cluster, so the installer will create the subnets into those
zones.
2023-07-22 01:44:31 -03:00
Mark Hamzy
c47f0d0d11 MULTIARCH-3492: Avoid conflicting subnets
Use a random number for DefaultMachineCIDR: 192.168.%d.0/24
This should significantly reduce the chances for collisions.
2023-05-16 07:32:10 -05:00
Marco Braga
a801265f16 RFE-2782/phase-1: Support edge compute pool for AWS Local Zones
The 'edge' compute pool is created to deploy nodes in Local Zones
which should not share the same pool as the regular 'worker', due
the design details, use case, and availability of edge locations in AWS.

This change allows the installer to accept the item 'name=edge' on the
'compute' list on install-config.yaml, when installing a cluster in existing VPC with subnetIds located in Local Zones.

The design details are available in the Enhancement Proposal[1].

[1] Enhancement Proposal: https://github.com/openshift/enhancements/pull/1232
2023-03-02 11:04:04 -03:00
Richard Vanderpool
532bd4c968 addressing linting issues 2023-01-10 13:10:23 -05:00
Richard Vanderpool
e883e0c9ba OCPBUGS-881: fail to create install-config.yaml as apiVIP and ingressVIP are not in machine networks
validate VIPs are in machineNetwork in survey
2022-10-07 15:16:28 -04:00
TrilokGeer
4cb6ab0d0a A new field additionalTrustBundlePolicy is added to enable policies for usage of additionalTrustBundle 2022-09-13 22:36:41 +05:30
Jamo Luhrsen
74486c10c6 Change defaultNetworkType to ovn-kubernetes
In 4.12, the default CNI will be OVNKubernetes.
This change will deploy ovnk by default as well
as adjust tests, docs and comments to reflect
the same.

Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
2022-07-28 22:26:08 -07:00
openshift-ci[bot]
94979915c6 Merge pull request #5940 from bkhadars/MachineCIDR
[release-4.11.0] Bug 2092296: Changed DefaultMachineCIDR of PowerVS to 192.168.0.0/16
2022-06-16 21:48:51 +00:00
Basheer K
50bb3d01e7 Changed DefaultMachineCIDR of PowerVS to 192.168.0.0/16 2022-06-01 12:18:51 +00:00
Sandhya Dasu
3e58797b34 Update the default networkType and add validations for SNO
The default networkType for Single Node OpenShift has changed to
OVNKubernetes and configuring it with OpenShiftSDN should be
disallowed.
2022-05-26 15:58:06 -04:00
Yanhua Li
87058bfa62 Remove the code generating the nutanix-credentials secret 2022-04-27 13:47:54 -07:00
Sid Shukla
3e1a3b6d11 Add the package defaults for Nutanix platform
This enables us to set defaults for nutanix later down the line.
2022-03-15 15:12:31 +01:00
Christy Norman
1604905af3 Add IBM Power VS: types only
For more background on IPI on Power VS, refer to the enhancement
proposal here: openshift/enhancements#736

Older discussions on some of the code here can be found in
https://github.com/openshift/installer/pull/5224.
An older unreviewed version of this PR can be found here:
https://github.com/openshift/installer/pull/5292

Signed-off-by: Christy Norman <christy@linux.vnet.ibm.com>
2022-02-26 11:06:02 -06:00
Nir Argaman
a13695ad4b Remove kubevirt platform from the installer 2021-10-19 20:03:56 +03:00
patrickdillon
ed77989876 Azure Stack: Set Manual Credentials Mode
When onboarding new platforms, we are now defaulting to credentials mode
manual. This sets the credentials mode to manual when the platform is
Azure Stack so that a cluster creds secret is not created.

Also adds validation/test for credentials mode based on platform and
updates the explain wording.
2021-08-26 15:26:10 -04:00
Vadim Rutkovsky
e9277f48b9 pkg/types/defaults: enable OVN by default in OKD installs 2021-07-03 09:44:32 +02:00
Yaakov Selkowitz
729882a8a2 Set default cluster architecture based on build host
All installer binaries extracted from a payload, regardless of their
runtime OS or architecture, are built on the payload architecture.
Therefore, GOHOSTARCH can be used to assume the cluster architecture for
which its payload was built.  This is set through the Dockerfiles so that
manual builds of installer will continue to default to amd64.
2021-06-20 00:58:44 -04:00
Bobby Radford
49b4da9f5b ibmcloud: Add scaffolding for the IBM Cloud platform
ibmcloud: add ibm cloud types

support the new ibm cloud platform by adding required types

ibmcloud: add initial assets

Add ibmcloud assets to support the new ibmcloud platform. These changes are functional, but additional functionality will be built out over time

ibmcloud: resolve linting issues

ibmcloud: obtain the cisInstanceCRN for install-config

The cisInstanceCRN field is derived from the user-provided baseDomain. It is needed for all DNS configuration.

types: fix ibmcloud machinepool file name

ibmcloud: rename platform ResourceGroupID field

Rename the field `ResourceGroupID` in the Platform type to
`ResourceGroup`

ibmcloud: add initial metadata

ibmcloud: add ClusterOSImage customization

The ClusterOSImage field will allow the user to specify the custom
RHCOS image to use for their cluster VSIs

ibmcloud: add fields to Platform type

Add the DefaultMachinePlatform, VPC, VPCResourceGroup, and Subnets
fields to the Platform type. These are needed to fully define a
cluster.

ibmcloud: improve platform validation and tests

Add in additional validation to the ibmcloud Platform. Also,
add unit tests around that new validation. This is just a start
and more validation and unit tests are required.

ibmcloud: fix linting issues

These issues were discovered using golangci-lint

ibmcloud: use resource group name in install config

Use the resource group name instead of ID in the install config. This
will be more human friendly. The ID will also still be valid, but
name will be preferred.

ibmcloud: improve default resource group check

Check for the default resource group based off of the 'default'
field in the resource group struct.

ibmcloud: fix typo

ibmcloud: remove vpcResourceGroup and use vpc ID

vpcResourceGroup is no longer needed if the vpc field holds the
ID of the VPC instead of the name.

ibmcloud: enforce clusterOSImage region

The clusterOSImage refers to a custom image in a user's VPC. That
image is regionally scoped and the region should be honored. Users
should not be allowed to pick a custom image from a region that
differes from the value of the region field in the install config.

ibmcloud: use resourcev2 API

The resourcev2 API should be used in place of v1. This is the most
up-to-date and well supported version.

ibmcloud: fix log message

Co-Authored-By: Hidematsu Sueki <Hidematsu.Sueki@ibm.com>

ibmcloud: add machinepool type and validation

Add the MachinePool type for the IBM Cloud platform. Also include
initial validation on the fields.

ibmcloud: update survey version

ibmcloud: use ibm go sdks instead of bluemix-go

The ibm-go-sdk and corresponding service SDKs in the IBM GH org
are more up-to-date and routinely supported. The old bluemix-go
SDKs should no longer be used.

update go mod

update vendor

fix: make validateVPCConfig a private function

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: improve log message for resource group not found

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: simplify subnet return statement

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: improve log message for vpc not found

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: images slice declaration

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: improve images range loop

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: typo in baseDomain help string

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: clarify resource group help message

fix: use platformPath as variable name

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: ibmcloud platform reference

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: remove unnecessary conditionals in validation

fix: check encryptionKey exists before validation

fix: improve zone validation message

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: keep errors out of happy path

fix: add index to subnets validation

fix: create VPCResourceNotFoundError

fix: use sets.String for contains

fix: ibmcloud platform type comments

fix: improve vpc config validation messages

fix: add omitempty for encryptionKey

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: improve BootVolume copying

Co-authored-by: Matthew Staebler <staebler@redhat.com>

fix: rename MachinePool.Type to InstanceType

fix: remove validateRegion

fix: remove unnecessary context from client

fix: remove context timeout in ic Platform

fix: remove superfluous edit

fix: update unit tests

fix: move types used by cilent to same package

fix: update OWNERS and OWNERS_ALIASES

fix: improve client call to load services

fix: improve GetZoneIDByName range loop

fix: whitepsace in OWNERS

fix: populate ibmcloud OWNERS_ALIASES

fix: make cisServiceID a const

Co-authored-by: Matthew Staebler <staebler@redhat.com>

ibmcloud: refactor resource groups

Allow users to have VPC resources in a different resource
group from the cluster creation. This will enable CI and E2E
testing along with making it easier to destroy clusters.

This commit also adds a "Name" suffix to resource groups to align
with other platforms naming convention.

fix: error message format

fix: update unit test

ibmcloud: move ibmcloud to hidden platforms

The IBMCloud platform will be in a developer preview for 4.9. As a result
we will move it to the list of hidden platforms. This commit does that by
default, but allows for it to show up in the survey via a build flag:
'ibmcloud'.

ibmcloud: remove cisInstanceCRN field

The cisInstanceCRN platform field is not needed. Though it is possible
to manage a single DNS zone with multiple CIS instances, only one zone
can be in the "Active" state at a time. As a result, we know which CIS
instance to use based off of its managed zone's state.

fix: address pr comments

update codegen
2021-06-15 11:30:15 -04:00
Gal-Zaidman
4c99fd6c09 oVirt: call the defaults when we load/create the install-config
Call the oVirt defaults functions on all machines
2021-04-26 14:28:42 +03:00
Nir Argaman
63cb364619 Add kubevirt platform defaults 2020-12-04 07:42:04 +02:00
Dan Winship
3b2bdbf0cc Use consts from operv1 rather than hardcoding network plugin names 2020-09-23 14:35:57 -04:00
Roy Golan
2d2fe0be24 ovirt: add vnic profile
The vnic profile that all the VM shares can now be configurable through
the platform and is part of the wizard, in case there are multiple for the
selected network.

```yaml
platform:
  ovirt:
    vnicProfileID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

Signed-off-by: Roy Golan <rgolan@redhat.com>
2020-05-06 00:00:56 +03:00
Emilio Garcia
ecf8a2cfbf custom API and Ingress vip addresses
co-authored-by: Fedosin mfedosin@redhat.com
2020-04-08 09:33:55 -04:00
Alex Crawford
2583ba4dfb *: add support for multi-arch rhcos image lookup
This adds an architecture parameter to the RHCOS image lookup process
and a corresponding field to MachinePool. This is a backward-compatible
change, defaulting the architecture to AMD64 if none has been specified.
This also enforces that the control plane and compute nodes share an
architecture, since we don't support heterogeneous clusters today.
2020-01-15 11:40:48 -08:00
Clayton Coleman
103098955c types: Replace MachineCIDR with MachineNetwork, an array of CIDRs
For IPv6 dual-stack support we need to support multiple
machine networks in order to register both an IPv4 machine prefix
and an IPv6 prefix (Azure in particular requires the user to define
a prefix which could conflict with the service or pod networks).

Update core types and validation to react to the change from a
single field to an array. Update the validation messages to be
consistent with the field the user would see (a "machine network")
instead of using "subnets" or "machineCIDR".
2019-12-19 14:57:46 -05:00
Abhinav Dahiya
31a9d5274f pkg/types: add the publish strategy to install-config
This commit adds a enum(string) type PublishingStrategy. It supports 2 options

* ExternalPublishingStrategy : the endpoints are exposed to the Internet
* InternalPublishingStrategy : the endpoints are exposed to the `Private Network` only

This enum type is added to the InstallConfig to control the strategy for the cluster endpoints. Cluster endpoints include the API server,
the default Ingress controller, public IPs etc.

Also adds the defaulting to make sure this strategy is `External` by default, keeping the backward-compatible behavior, and validation to make sure only valid enum options are set.

Also it looks like gofmt prefers `{}` over `struct{}{}` in validation map.
https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/pr-logs/pull/openshift_installer/2526/pull-ci-openshift-installer-master-gofmt/6229
2019-10-18 07:00:48 -07:00
Stephen Benjamin
0055065143 baremetal: add baremetal IPI platform
This adds experimental support for the baremetal IPI platform. Baremetal
IPI is implemented via a libvirt bootstrap VM, and an Ironic instance
that handles provisioning of baremetal nodes.

This baremetal platform is still experimental and relies on the
openshift-metal3/dev-scripts to perform a complete deployment.

Co-authored-by: Antoni Segura Puimedon <antoni@redhat.com>
Co-authored-by: Ben Nemec <bnemec@redhat.com>
Co-authored-by: Derek Higgins <derekh@redhat.com>
Co-authored-by: Eduardo Minguez Perez <e.minguez@gmail.com>
Co-authored-by: Mark McLoughlin <markmc@redhat.com>
Co-authored-by: Russell Bryant <rbryant@redhat.com>
Co-authored-by: Sandhya Dasu <sdasu@redhat.com>
Co-authored-by: Stephen Benjamin <stephen@redhat.com>
Co-authored-by: Steven Hardy <shardy@redhat.com>
Co-authored-by: Yolanda Robla <yroblamo@redhat.com>
2019-07-16 22:11:38 -04:00
Patrick Dillon
f3a1b730d9 Add required GCP types
Adds required types for creating the GCP platform from the install config, including validation and tests.

Jira: CORS-1114
2019-06-25 10:30:36 -04:00
staebler
5f141d65d0 Add the Hyperthreading field to MachinePool which allows the user to
enable or disable hyperthreading for machines. The default is for
hyperthreading to be enabled.

RHCOS ships with pivot.service that uses the `/etc/pivot/kernel-args` to override the kernel arguments for hosts. Adding `nosmt` kernel argument switches hyperthreading off.

Add MachineConfig to disable hyperthreading for control plane and compute that have the hyperthreading option disabled.
2019-04-10 17:17:03 -07:00
Stephane Erbrech
4258aa36ac pkg/types: Add required azure types
This adds the azure-specific structures for installer
configuration and management.
The property BaseDomainResourceGroupName in pkg/types/azure/platform
should disapear when the installconfig supports the azure
requirements to identify a dns zone.
2019-04-08 09:10:16 -07:00
staebler
6bc9e17104 upi/vsphere: add vsphere to cloudproviderconfig
Add the config for vsphere to cloudproviderconfig.

Add vsphere cloud creds to cloud-creds-secret.yaml.

Add fields to vsphere platform in installconfig to support cloudproviderconfig.

Set the enable_disk_uuid attribute to true for vsphere VMs as that
is required to ensure the VMDK properly mounts disks.

See https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/existing.html
for details on the vsphere cloud config file.
2019-04-03 14:04:45 -04:00
Casey Callendrello
2e7ecd3ab3 types: rename network type to match Network.config.openshift.io.
Renames:
- serviceCIDR -> serviceNetwork
- clusterNetworks -> clusterNetwork
- type -> networkType
- hostSubnetLength -> hostPrefix

Add significantly more network validation, especially around overlapping
cidrs.

This adds an upconversion step to loading install config. It will
convert any deprecated install configs to the latest version.
2019-03-05 17:21:18 +01:00
staebler
ccdc32e3fe installconfig: separate control plane and compute machine pools
There should always be a control plane machine pool, so the declaration
is moved from a generic machines field to a specific controlPlane field.
The machines field contains only compute machines, so it is renamed to
compute.
2019-02-14 21:20:08 -05:00
Casey Callendrello
dafc79f024 Generate Network.cluster config instead of NetworkConfig.networkoperator
* Add the Network.config.openshift.io CRD
* Generate the network config from the install config
* Remove networkoperator types from install config (but use the same
    schema)
* Move network CRDs to templates to match #943

This doesn't change the json/yaml serialization of the install config, but it
changes it internally.
2019-01-31 14:55:22 +01:00
W. Trevor King
4b553cd245 pkg/types/defaults/installconfig: Set defaults for null replicas
We don't currently support configuring zero workers [1], largely
because some key operators still do not tolerate masters.  Still, some
users are attempting to work around our checks by leaving 'replicas'
unset (which ends up as nil in Go) [2].  This commit adjusts our
install-config defaulting to fill in the default replica counts when
the user provides machine-pool entries but leaves replicas unset.

[1]: https://github.com/openshift/installer/pull/958
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1670005#c1
2019-01-29 15:13:20 -08:00
staebler
ec92355be7 assets/installconfig: apply defaults to install config
The Install Config asset will apply defaults to fields for which there
are reasonable defaults. This applies to a generated Install Config
asset and to an Install Config asset loaded from disk.
2019-01-12 07:29:14 -08:00