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

1499 Commits

Author SHA1 Message Date
Pablo Fontanilla
5797d192d6 OCPEDGE-1517: add-tnf-agent-based-installer (#9946)
* agent/installconfig: Add two-node-with-fencing topology and refactor
two-node validation

* feat: add override for control plane fencing creds

Signed-off-by: ehila <ehila@redhat.com>

* Add TNF fencing credentials override test

* Update integration test with new validation result

* Update installer verification and tests to only allow URLs with redfish on them for Two Nodes with Fencing topology

* Update validation check for redfish

* Remove simultaneous dual replica feature set restriction

* Update fencing address validation to include port

* Update validation to disallow http

* Update and expand url validation tests

* Revert "Update validation to disallow http"

This reverts commit e9595a8d4f.

* Update variable name

* Update tests

* Add YAML tags to Credential struct for fencing

Add explicit yaml struct tags to the Credential type to ensure proper
YAML serialization with lowercase field names (e.g., 'hostname' instead
of 'hostName'). This is required for the assisted-service to correctly
parse the fencing credentials file.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add fencing credentials file generation for TNF clusters

Generate /etc/assisted/hostconfig/fencing-credentials.yaml containing
all fencing credentials from controlPlane.fencing.credentials[]. This
file is embedded in the agent ISO and consumed by assisted-service
during TNF cluster installation.

Key changes:
- Add OptionalInstallConfig to Ignition Dependencies()
- Add addFencingCredentials() function to generate the YAML file
- Call addFencingCredentials() in Generate() after NTP sources
- Add comprehensive unit tests for the new function

The single-file approach avoids directory naming collisions between
MAC-based host directories and hostname-based fencing credentials.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Revert fencing credentials override

The fencing credentials are now passed to assisted-service via the
hostconfig/fencing-credentials.yaml file embedded in the ISO, making
the install-config annotation override unnecessary.

This reverts commits:
- 105b3c95c9 Add TNF fencing credentials override test
- a06d1a766b feat: add override for control plane fencing creds

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Improve fencing credentials test coverage

Enhance TestIgnition_addFencingCredentials with:
- File owner verification (assert root ownership)
- Append behavior test with pre-existing files
- Fix misleading test name and add second credential to match
  valid TNF configuration (2 credentials required)
- Remove unused expectError field from test struct

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Support vendor-specific redfish schemes in fencing validation

Vendor-specific redfish schemes like idrac-redfish:// and ilo5-redfish://
use HTTPS (port 443) by default, so they should be valid without an
explicit port number.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* unit tests: Add missing OptionalInstallConfig dependency in ignition test

The TestIgnition_Generate test was panicking because the
OptionalInstallConfig asset was missing from the test dependencies.
This caused dependencies.Get() to return a nil value when the
addFencingCredentials function tried to access it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* agent: Refactor fencing credentials into standalone asset

Move fencing credentials generation from inline ignition.go code into a
proper FencingCredentials asset following the installer's asset pattern.

This refactor:
- Creates pkg/asset/agent/manifests/fencingcredentials.go as a
  WritableAsset with Dependencies, Generate, Files, and Load methods
- Adds comprehensive unit tests in fencingcredentials_test.go
- Integrates FencingCredentials into AgentManifests dependency graph
- Removes addFencingCredentials() from ignition.go
- Adds positive integration test for TNF with fencing credentials
- Changes output path from /etc/assisted/hostconfig/ to
  /etc/assisted/manifests/ (standard manifests location)

The asset automatically returns empty Files() for non-TNF clusters,
so no fencing-credentials.yaml is generated unless fencing is configured.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* agent: Improve fencing credentials code quality

- Add explicit YAML library aliasing for clarity (goyaml for marshal,
  k8syaml for unmarshal) with documentation explaining why different
  libraries are used for each operation
- Improve error message to include credential count for debugging
- Add test case for empty fencing credentials array

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* agent: Fix CI failures for gofmt and integration tests

- Add blank line between k8s.io and github.com/openshift import groups
  in ignition_test.go to satisfy gci formatting requirements
- Add featureSet: TechPreviewNoUpgrade to tnf_with_fencing_credentials
  integration test to enable the DualReplica feature gate required for
  TNF fencing configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* agent: Move fencing credentials to agentconfig package

FencingCredentials is a host-scoped configuration asset, not a
cluster-scoped manifest. Moving it from manifests/ to agentconfig/
aligns with the package's purpose and follows the pattern used by
other host configuration assets like AgentHosts.

This change also updates ignition.go to import from the new location
and removes the now-unused fencing credentials from agent.go manifests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* agent: Add FencingCredentials to ignition test dependencies

The TestIgnition_Generate test was failing with a panic because the
FencingCredentials asset was added as a dependency to Ignition.Generate()
but wasn't included in the test's buildIgnitionAssetDefaultDependencies()
helper function.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* agent: Fix fencing credentials path in integration test

The integration test expected the fencing credentials file at
/etc/assisted/manifests/ but assisted-service reads it from
/etc/assisted/hostconfig/ (HOST_CONFIG_DIR default). The installer
correctly embeds the file at hostconfig/, so the test expectation
was wrong.

Changed test path from manifests to hostconfig to match both the
installer implementation and assisted-service expectations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* agent: Add nolint directive for gosec G101 false positive

The gosec linter flags fencingCredentialsFilename as "potential
hardcoded credentials" (G101) because the variable name contains
"credentials". This is a false positive - the variable contains
a filename string, not actual credentials.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* agent: Fix expected YAML field order in TNF integration test

The expected fencing-credentials.yaml had fields in a different order
than the actual YAML serialization output. Updated the expected file
to match the actual field order: hostname, username, password, address,
certificateVerification.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Signed-off-by: ehila <ehila@redhat.com>
Co-authored-by: ehila <ehila@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-02-05 12:30:34 +00:00
Vincenzo Mauro
ef751a9235 Add support for platform External in TNA clusters 2026-02-04 15:15:38 +01:00
openshift-merge-bot[bot]
2e77e61a96 Merge pull request #10236 from vimauro/tna-platform-none-support
OCPEDGE-2276: Add support for platform None in TNA (Two-Node Arbiter) clusters
2026-02-03 23:49:36 +00:00
Jinyun Ma
de51668ab4 Add validation to reject userProvisionedDNS on Azure Stack Hub
Custom DNS (userProvisionedDNS) is not supported on Azure Stack Hub. This
change adds validation to prevent users from setting userProvisionedDNS on
Azure Stack Hub.
2026-01-30 11:46:50 +08:00
openshift-merge-bot[bot]
5aa688f0a7 Merge pull request #10211 from barbacbd/installer-n4a-instances
CORS-4299,CORS-4300: Allow N4A Instance Types in the installer
2026-01-27 06:23:08 +00:00
barbacbd
8066014ea0 OCPBUGS-74363: Remove region option for the GCP Private Service Connect Endpoint
** While the regional support is valid, we will not be using this in openshift. Regional support
requires that each api have its own endpoint. Only one api is associated with an endpoint, and managing
this access will be difficult and unnessary at this time.
2026-01-23 09:19:39 -05:00
barbacbd
f7eb72b373 CORS-4300: Update installer to allow n4a instances
pkg/types/gcp/machinepools.go:

Include the n4a instance type in the map as well as the (current) supported disk types:
- hyperdisk-balanced

pkg/asset/installconfig/gcp/validation.go:

Include n4a in the types of arm instance families.
2026-01-19 11:28:45 -05:00
Vincenzo Mauro
bb7d56e927 Added support for platform None in TNA clusters 2026-01-19 16:05:04 +01:00
openshift-merge-bot[bot]
e04b9d5eab Merge pull request #10207 from sadasu/dual-stack-config
CORS-4075, CORS-4113: Install-config and Infra manifest updates for DualStack for AWS and Azure
2026-01-17 02:18:31 +00:00
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
Gaoyun Pei
15d1d85a87 OCPBUGS-66943: Validate cluster name against Azure reserved words (#10221)
* azure: validate cluster name against Azure reserved words

  Azure prohibits the use of certain reserved words and trademarks
  in resource names. This change adds validation to reject cluster
  names containing any of the 43 reserved words documented by Azure,
  preventing deployment failures with ReservedResourceName errors.

  Reserved words checked include:
  - Complete reserved words (40): AZURE, OFFICE, EXCHANGE, etc.
  - Substring forbidden (2): MICROSOFT, WINDOWS
  - Prefix forbidden (1): LOGIN

* update the checking logic on reserved words

* fix the gofmt issues
2026-01-15 04:17:16 +00:00
openshift-merge-bot[bot]
ff6438bc69 Merge pull request #10138 from barbacbd/fix-basic-linting-issues
no-jira: Fix linting issues for golangci-lint v2
2025-12-19 20:45:29 +00:00
openshift-merge-bot[bot]
93ba4638d6 Merge pull request #10086 from jcpowermac/OCPBUGS-17667
OCPBUGS-17667: Validate vCenter datacenters in failure domain topology
2025-12-18 10:59:07 +00:00
openshift-merge-bot[bot]
e1126ebd75 Merge pull request #10157 from barbacbd/OCPBUGS-62870-make-backwards-compatible
OCPBUGS-62870: installing into GCP Shared VPC with minimal permissions
2025-12-18 05:55:16 +00:00
barbacbd
209355133f OCPBUGS-62870: installing into GCP Shared VPC with minimal permissions
** Ensure that the feature is backwards compatible for original XPN cases. The new field
firewallRulesManagement is an explicit setting of whether the user has the firewall rules
or not. In old versions this did not exist but XPN installs did not need firewall rules.
Now we will default to checking permissions when no field value is provided. If the rules
do not exist, the rules management is set to unmanaged.
2025-12-15 09:37:23 -05:00
Honza Pokorny
5f377f6898 baremetal: allow multi-arch 2025-12-09 17:10:33 -04:00
openshift-merge-bot[bot]
b35dbe664b Merge pull request #10132 from tthvo/CORS-4212
CORS-4212: AWS: Add the ability to configure throughput on GP3 volumes
2025-12-04 21:00:05 +00:00
openshift-merge-bot[bot]
3b6ba6b3d0 Merge pull request #9924 from cybertron/disable-internal-dns
OPNET-678: Allow disabling internal DNS
2025-12-03 01:02:56 +00:00
barbacbd
1a338cf729 Fix naming convention issues on common name packages. 2025-12-02 14:31:48 -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
openshift-merge-bot[bot]
5060ac90b9 Merge pull request #10114 from barbacbd/remove-gcp-endpoints-fg
no-jira: Remove the GCP Custom Endpoints Feature Gate
2025-11-22 10:23:36 +00:00
openshift-merge-bot[bot]
6661dac8b8 Merge pull request #10076 from patrickdillon/az-mkt
CORS-3657: Default Azure Installs to Marketplace Images
2025-11-22 10:23:30 +00:00
openshift-merge-bot[bot]
e22009cb97 Merge pull request #10072 from dtantsur/bmc-ca
METAL-1105: support specifying CA to verify BMC connections
2025-11-22 10:23:23 +00:00
openshift-merge-bot[bot]
64cc933207 Merge pull request #10018 from barbacbd/CORS-4259
CORS-4259, CORS-4260, CORS-4265: Move the gcp permission check to a common file in install config.
2025-11-22 06:03:30 +00: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
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
barbacbd
3833cec681 data/data/install.openshift.io_installconfigs.yaml:
pkg/types/gcp/platform.go:

Add FirewallManagementPolicy. The policy will indicate whether the cluster or user
will manage the firewall rules.

Add validation to ensure that a network is provided when the install config
is set to Unmanaged to FirewallManagement.

pkg/types/gcp/metadata.go:

Add the management policy to the metadata so that the bootstrap destroy process
knows whether to delete the bootstrap firewall rules or not.
2025-11-21 11:42:40 -05:00
openshift-merge-bot[bot]
0e43b96aec Merge pull request #10012 from fangge1212/aws_sev_snp
CORS-4188: AWS - Add support to AMD SEV-SNP confidential VMs
2025-11-21 16:22:24 +00:00
Aditya Narayanaswamy
13b9636e77 fixing broken deep copy object. 2025-11-20 20:59:28 -05: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
Zane Bitter
2cb75632c3 Merge branch 'main' into bmc-ca 2025-11-20 18:29:14 -05:00
Aditya Narayanaswamy
059a7c9f07 added mock files and changed test files 2025-11-20 15:48:45 -05:00
Aditya Narayanaswamy
a9af27250b azure: Add support for multi zonal NAT gateways
Adding support to install multiple NAT gateways per subnet in
the specific zones they need to be in.

Also, allowing the users to bring their own subnets.

(NAT gateways on BYO subnets are not supported by CAPZ, it just
creates a dummy NAT gateway and doesn't attach it to the subnet).
2025-11-20 15:48:40 -05:00
Patrick Dillon
793c411cb4 no-jira: generate powervc deep copy
Generate the deep copy functions for powervc.
2025-11-20 14:39:34 -05:00
Patrick Dillon
23a61732c9 Merge pull request #10025 from dlom/add-deepcopy-to-types
CORS-4266: Add generated DeepCopy implementations for pkg/types/installconfig
2025-11-20 13:37:56 -05:00
barbacbd
f256cf8e21 no-jira: Remove the GCP Custom Endpoints Feature Gate
** Remove the validation when the `endpoint` field is filled out in install-config.
The feature has been tested and the feature gate should no longer be required.

** Remove the test for the featuregate.
2025-11-20 09:16:10 -05:00
openshift-merge-bot[bot]
18c57a015f Merge pull request #9806 from hamzy/PowerVC-add-new-type
MULTIARCH-5358: PowerVC: Add new platform for PowerVC
2025-11-20 09:00:13 +00:00
Ben Nemec
307d0b0e4c Populate platformStatus for all on-prem platforms
Also makes the featuregate validations consistent with the existing
checks.
2025-11-19 11:47:50 -06:00
Ben Nemec
8f91fb56a4 OPNET-678: Allow disabling internal DNS
Wire in the internalDNSRecords API field to install-config so we can
disable the internal DNS records for deployments using a
user-managed loadbalancer.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 11:10:51 -06:00
Mark Hamzy
0324f33df0 PowerVC: Add new platform for PowerVC
PowerVC is an OpenStack based cloud provider with some significant
differences.  Since we can use the OpenStack provider for most of the
work, we will create a thin provider which will only handle the
differences.
2025-11-19 08:57:03 -06:00
openshift-merge-bot[bot]
ef519b9746 Merge pull request #10101 from swghosh/gcp-g2-standard
no-jira: add support for g2-standard* GCP instances
2025-11-19 09:01:29 +00:00
Mark Old
f8aa3f7d8f Remove UniqueItem=true validation for API/Ingress ip addresses
Iff the intent of adding kubebuilder/DeepCopy code generation is to
enable these types to be used in CRD definitions, it stands to reason
that these CRDs should be usable in a k8s cluster.  UniqueItem=true is
not permitted on CRDs for k8s.

This might be controversial because it relaxes validation requirements
2025-11-18 22:28:08 -08:00
Mark Old
8ccbf40fff Add generated DeepCopy implementations for pkg/types/installconfig 2025-11-18 22:28:04 -08:00
Swarup Ghosh
99ead66529 Add support for g2-standard* GCP instances
Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
2025-11-19 00:41:03 +05:30
Joseph Callen
64e5e4ed3f OCPBUGS-17667: Validate vCenter datacenters in failure domain topology
Add validation to ensure failureDomain.Topology.Datacenter is listed
in the associated vCenter.Datacenters array. Previously, users could
specify a datacenter that wasn't in the vCenter's datacenters list,
which would only fail at runtime during installation.

This change provides early validation with a clear error message
indicating which vCenter's datacenters list is missing the entry.

Assisted by Claude.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 14:37:07 -05:00
barbacbd
2b8f0c7b43 CORS-4282: Remove the installer gcp service endpoints.
Service endpoints are no longer needed in favor of the PSCEndpoint.
2025-11-13 06:40:30 -05:00