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)
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.
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.
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
- 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>
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.
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
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>
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.
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.
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
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>
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.
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".
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
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>
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.
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.
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.
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.
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.
* 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.
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
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.