1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00

78 Commits

Author SHA1 Message Date
Stephen Finucane
a84719caef Add ORC API to local control plane
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-21 14:26:25 +00:00
Stephen Finucane
e184dc659a Add openstack-resource-controller
This is split out from CAPO starting with CAPO v0.12.0. Start deploying it manually
in preparation for a CAPO bump.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-21 14:26:24 +00:00
openshift-merge-bot[bot]
324432ac91 Merge pull request #10107 from patrickdillon/bump-capa
no-jira: bump CAPA controller
2025-11-20 13:15:56 +00:00
Patrick Dillon
ae200267a9 CAPA: disable MachinePool feature gate
The MachinePool feature requires the S3:PutBucketLifecycleConfiguration
permission. The installer does not support machine pools, so
we can disable the featgure gate to bypass this permission requirement.
2025-11-19 14:21:32 -05: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
Patrick Dillon
1071658bf1 nolint deprecated capi v1beta1
Upgrading from capi v1beta1 -> v1beta2 will take a not
insignificant amount of work. I have captured that work in
https://issues.redhat.com/browse/CORS-3563
and set nolint to disable the linters from failing on this package.
2025-11-11 16:19:45 -05:00
Patrick Dillon
47812b1e00 CAPI: update API package paths
CAPI divided the API into subpackages.

For example:
sigs.k8s.io/cluster-api/exp/ipam/api/v1beta1 ->
sigs.k8s.io/cluster-api/api/ipam/v1beta1

sigs.k8s.io/cluster-api/api/v1beta1 ->
sigs.k8s.io/cluster-api/api/core/v1beta1

See: https://github.com/kubernetes-sigs/cluster-api/pull/12262

This updates the import paths accordingly.
2025-11-07 09:03:40 -05:00
openshift-merge-bot[bot]
8fe36038e8 Merge pull request #10041 from bear-redhat/issue/CORS-4275
CORS-4275: Add Windows support
2025-10-31 19:52:18 +00:00
Bear
5166c3e4e4 Fix issue CORS-4275 Add Windows support
This PR improves cross-platform compatibility.
It solves two main issues:
1. inconsistent line endings
2. inconsistent path separators

Path separators, in installer, needs to target two different
environments:
1. the OS where the installer runs
2. the OS where the injected files been used

This PR unified path separators used in 2 to be UNIX path separators,
while in 1 to be platform-dependant.

Ref: https://forum.golangbridge.org/t/filepath-join-or-path-join/13479

Known issues:
The spawn processes, including etcd.exe, kube-apiserver.exe,
and openshift-installer.exe, will not exit once installation
aborted or completed. Users need to manually terminate those
processes in task manager.
2025-10-29 14:53:54 -02:30
Patrick Dillon
6ff73ae88b OCPBUGS-36360: Support certificate authentication with CAPZ
Adds support for certificate based authentication in the CAPI Azure
installation method. Azure Service Operator requires that the
certificate's contents, rather than the path, is passed as an
environment variable. .pfx certificates are in binary format, so
we must convert it to a pem certifcate and pass that.
2025-10-15 16:43:18 -04:00
Patrick Dillon
6324d48798 clusterapi: use default envtest timeouts
We're seeing the local control plane fail to start on systems with
resource restrictions (say a laptop in "quiet" mode). This commit
removes the hardcoded 10 second envtest timeouts to use the default
20 second timeouts. By using the defaults, it also allows the timeouts
to be tuned with the environment variables:
KUBEBUILDER_CONTROLPLANE_START_TIMEOUT
KUBEBUILDER_CONTROLPLANE_STOP_TIMEOUT
2025-08-06 13:43:50 -04:00
Patrick Dillon
6e834b3a42 Revert "Merge pull request #9665 from patrickdillon/revert-azurestack-ipi"
This reverts commit 2d3f2c5763, reversing
changes made to 63e0c358e0.
2025-04-16 10:06:31 -04:00
Patrick Dillon
dfabdf1f8a Revert "Merge pull request #9645 from patrickdillon/azurestack-mark-iii"
This reverts commit 63e0c358e0, reversing
changes made to d9c19b4517.
2025-04-16 07:50:56 -04:00
Patrick Dillon
b185990627 CAPZASH Fork: Add CAPZASH Controller support
Selects and runs the CAPZASH controller when using Azure Stack.
2025-04-15 11:12:13 -04:00
Patrick Dillon
6fe8690a54 Set azure stack environment filepath for controller
Provide the auzrestack environment file to the
capi controllers.

https://github.com/kubernetes-sigs/cloud-provider-azure/issues/151
https://cloud-provider-azure.sigs.k8s.io/install/configs/
2025-04-15 11:12:12 -04:00
Patrick Dillon
f7cdd5e82f Azure: set correct audience in ASO
Updates the environment variable setting the token audience on the
Azure Service Operator controller in order to authenticate azure
stack successfully.
2025-04-12 16:43:12 -04:00
openshift-merge-bot[bot]
262d0c6d0c Merge pull request #9401 from cjschaef/ocpbugs-49319
OCPBUGS-49319: IBMCloud: Drop CAPI metrics-bind-addr
2025-02-11 17:46:52 +00:00
Yanhua Li
2ed5a347b3 OCPBUGS-48044: [Nutanix] upgrade vendoring for cluster-api-provider-nutanix 2025-01-30 15:45:18 -05:00
Maysa Macedo
9346289726 Envtest: Configure IPv6 service network for API Service
When the host that runs the OpenShift install is configured with
IPv6 only, the kube-apiserver created with envtest would fail
as the service-cluster-ip-range would be configured with a default
IPv4 CIDR and the public address family, which is the host address,
would be configured with an IPv6. This commit fixes the issue by setting
a default IPv6 CIDR to service-cluster-ip-range, in case the host
has no IPv4 available.
2025-01-28 10:00:28 -03:00
cjschaef
7fb2984da8 OCPBUGS-49319: IBMCloud: Drop CAPI metrics-bind-addr
Drop the metrics-bind-addr flag for the IBM Cloud CAPI
deployment, as it does not appear to be supported in newer
cluster-api releases.

Related: https://issues.redhat.com/browse/OCPBUGS-49319
2025-01-24 15:18:18 -06:00
Hiro Miyamoto
8fc735142e Creates VPEs as needed for Disconnected install
Signed-off-by: Hiro Miyamoto <miyamotoh@us.ibm.com>
2024-11-19 16:46:36 -05:00
Mark Hamzy
c268caa52b PowerVS: Change CAPI verbosity level
Decrease the verbosity level for the IBM CAPI module.
2024-10-30 10:18:31 -05:00
cjschaef
1653eece54 IBMCloud: Add IBM Cloud CAPI Cluster manifest
Add support to create the necessary IBM Cloud VPC Cluster
manifest for CAPI.
2024-10-20 23:14:26 -05:00
Joseph Callen
54a7faee66 delete enable-keep-alive since that option has been removed 2024-10-02 10:25:13 -04:00
John Hixson
e927a6dc96 pkg/clusterapi: Pass endpoints to ASO 2024-08-19 19:14:18 -07:00
Joseph Callen
60b3308993 upstream capv bug causes session timeout
Until we can bump capv to the latest version
disable session keep alive that causes session
timeout and deadlocks as described in the links
attached to the bug.
2024-08-19 12:53:59 -04:00
Hiro Miyamoto
b67a977c6b Passes ServiceEndpoints from install-config to CAPI
Signed-off-by: Hiro Miyamoto <miyamotoh@us.ibm.com>
2024-08-01 18:08:07 -04:00
openshift-merge-bot[bot]
88dec15f0c Merge pull request #8693 from r4f4/capi-run-controller-fail-fix
OCPBUGS-36378: capi: start controllers after WaitGroup is created
2024-07-11 01:56:27 +00:00
Rafael Fonseca
9949ca9b2d capi: always stop local control plane in capi Teardown
Instead of doing the control plane shutdown as part of the controllers
shutdown process, it should be done at Teardown time instead. This makes
sure that local control plane binaries are stopped even when we fail to
create controllers, for example when creating a cloud session for
controller setup.
2024-07-02 20:58:48 +02:00
openshift-merge-bot[bot]
0115fda9a5 Merge pull request #8628 from r4f4/aws-capa-disable-eks
OCPBUGS-35752: capi/aws: disable EKS controller in CAPA
2024-07-02 16:49:34 +00:00
Rafael Fonseca
b8df7d4377 OCPBUGS-36378: capi: start controllers after WaitGroup is created
Some providers like Azure require 2 controllers to run. If a controller
fails to be spawned (e.g cluster-api-provider-azureaso), we were not
stopping controllers that were already running (e.g. the cluster-api,
cluster-api-provider-azure), resulting in leak processes even though the
Installer reported it had stopped the capi system:

```
ERROR failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to run cluster api system: failed to run controller "azureaso infrastructure provider": failed to start controller "azureaso infrastructure provider": timeout waiting for process cluster-api-provider-azureaso to start successfully (it may have failed to start, or stopped unexpectedly before becoming ready)
INFO Shutting down local Cluster API control plane...
INFO Local Cluster API system has completed operations
```

By just changing the order of operations to run the controller *after*
the WaitGroup is created, we are able to properly shutdown all running
controllers and the local control plane in case of error:

```
ERROR failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to run cluster api system: failed to run controller "aws infrastructure provider": failed to extract provider "aws infrastructure provider": fake error
INFO Shutting down local Cluster API control plane...
INFO Stopped controller: Cluster API
INFO Local Cluster API system has completed operations
```
2024-07-02 18:32:01 +02:00
Rafael Fonseca
2e34347dfe capi: do not exit if controller fails to extract.
Doing `logrus.Fatal` when a controller fails to be extracted means that
we abort the installer process without giving it a chance to stop the
capi-related processes that are still running.

Let's just return an error instead and let the Installer go through the
normal capi shutdown procedure.
2024-07-02 18:29:54 +02:00
openshift-merge-bot[bot]
aea78fbe82 Merge pull request #8637 from sadasu/azure-disable-machinepool-feature-gate
CORS-3562: azure: Setting experimental MachinePool featuregate to false
2024-06-21 00:17:07 +00:00
openshift-merge-bot[bot]
be183954a2 Merge pull request #8283 from rna-afk/capz_skip_blob_upload
CORS-3434: azure: Skip image upload if env var is set
2024-06-21 00:17:01 +00:00
Sandhya Dasu
5ea59f6efa azure: Setting experimental MachinePool featuregate to false
This feature gate was set to a default of true upstream.
Setting it to false locally.
2024-06-20 13:30:43 -04:00
Rafael Fonseca
9cef2597b5 OCPBUGS-35752: capi/aws: disable EKS controller in CAPA
The EKS controller feature gate is enabled by default in CAPA, which
causes the following lines to show up in the logs:

```
time="2024-06-18T11:43:59Z" level=debug msg="I0618 11:43:59.613409     349 logger.go:75] \"enabling EKS controllers and webhooks\" logger=\"setup\""
time="2024-06-18T11:43:59Z" level=debug msg="I0618 11:43:59.613416     349 logger.go:81] \"EKS IAM role creation\" logger=\"setup\" enabled=false"
time="2024-06-18T11:43:59Z" level=debug msg="I0618 11:43:59.613420     349 logger.go:81] \"EKS IAM additional roles\" logger=\"setup\" enabled=false"
time="2024-06-18T11:43:59Z" level=debug msg="I0618 11:43:59.613425     349 logger.go:81] \"enabling EKS control plane controller\" logger=\"setup\""
time="2024-06-18T11:43:59Z" level=debug msg="I0618 11:43:59.613449     349 logger.go:81] \"enabling EKS bootstrap controller\" logger=\"setup\""
time="2024-06-18T11:43:59Z" level=debug msg="I0618 11:43:59.613464     349 logger.go:81] \"enabling EKS managed cluster controller\" logger=\"setup\""
time="2024-06-18T11:43:59Z" level=debug msg="I0618 11:43:59.613496     349 logger.go:81] \"enabling EKS managed machine pool controller\" logger=\"setup\""
```

Although harmless, they can be confusing for users. This change
disables the feature so the lines are gone and we are not running
controllers unnecessarily.
2024-06-18 18:25:02 +02:00
Rafael Fonseca
99430f603f capi/aws: disable CAPA's TagUnmanagedNetworkResources feature gate
Otherwise CAPA will apply tags to BYO subnets.
2024-06-14 01:14:47 +02:00
Patrick Dillon
6ef6e46096 capi system: clean up etcd dir
Etcd data is preserved to support the standalone
openshift-install destroy bootstrap command. We can only delete this
once bootstrap destroy has been completed. Teardown may be called
in other cases, such as an error or user interrupt, so this commit
introduces a separate function to delete the etcd directoy specifically.
2024-06-13 10:20:43 -04:00
Patrick Dillon
151e366f72 OCPBUGS-33745: Move etcd data to its own dir
We save an etcd data dir in order to be able to restart the local
control plane to destroy the bootstrap node. Prior to this commit,
we saved etcd data in the binary directory, but that is cleaned
whenever the control plane shuts down, so it defeats the purpose
of saving the data for a restart.

Instead, save the etcd data in its own dir.
2024-06-13 10:20:43 -04:00
openshift-merge-bot[bot]
7026956b23 Merge pull request #8565 from patrickdillon/OCPBUGS-35180-multiple-invocations
OCPBUGS-35180: Prevent multiple invocations on CAPI
2024-06-11 18:32:13 +00:00
openshift-merge-bot[bot]
106787024a Merge pull request #8542 from r4f4/capi-kubeconfig-arg
OCPBUGS-35041: capi: do not override KUBECONFIG
2024-06-10 17:24:40 +00:00
Patrick Dillon
997c2eec8b clusterapi: move envtest.kubeconfig to hidden dir
Prior to this commit, envtest.kubeconfig was placed in the auth
dir which contains the cluster kubeconfigs. Leaving the
envtest.kubeconfig in this dir may confuse users. Instead, let's
hide the kubeconfig in the capi artifacts directory.
2024-06-10 12:44:55 -04:00
Patrick Dillon
426052f79c capi system: write etcd and kube-apiserver logs
Captures etcd and kube-apiserver logs to the cluster api artifacts
directory.
2024-06-07 18:06:46 -04:00
Rafael Fonseca
26f988e519 capi: do not override KUBECONFIG
Managed clusters might rely on the KUBECONFIG to reach their kube api
server. Instead of using the env var and possibly causing issues, we
can specify a custom kube config via cmdline argument for the capi
controllers. That seems a more appropriate approach for an ephemeral
kube API like the one spawned by envtest.
2024-06-07 02:46:04 +02:00
rna-afk
1646bfbb4c azure: Skip image upload if env var is set
Adding option to skip the image upload from the installer if
an environment variable is set since it takes a lot of time and
the marketplace images can be used to skip this step.
2024-06-05 11:40:48 -04:00
Patrick Dillon
d33f0130ff cluster-api: change temporary directory path
Changes the temporary directory where clusterapi dependencies
are unpacked from
<clusterdir>/bin/cluster-api
to
<clusterdir>/cluster-api

The clusterapi teardown function only removes the cluster-api dir,
so we are leaking the bin dir. There are other ways we could resolve
this issue, but ultimately we don't need to create a nested temporary
directory.
2024-05-15 14:09:15 -04:00
Patrick Dillon
73a76ac0ef pkg/clusterapi/system: run from metadata
This commit removes the dependency on the installconfig and uses
metadata instead. This will make it easier to restart the capi system
at any point because we will not need to retrieve the installconfig
asset. At the moment, the standalone bootstrap destroy command is the
only example of when we will need to restart the CAPI control plane.
2024-05-05 19:31:01 -04:00
Patrick Dillon
d263ca598e pkg/clusterapi/localcontrolplane: set etcd dir
Sets the data dir for etcd. Doing this will set the destination where
etcd will write its state and allow us to reuse that stored state.
2024-05-05 19:31:01 -04:00
Pierre Prinetti
5c107e3270 openstack: Upgrade manifests to CAPO v1beta1
This is the result of the following steps:

1. Fork cluster-api-provider-openstack and revert its go.mod to Go v1.21
2. Replace the fork in the Installer's go.mod
3. Replace imports from v1alphaX to v1beta1
4. Update manifests to use the v1beta1 spec
2024-04-26 11:45:06 +02:00
openshift-merge-bot[bot]
4c519fe7e1 Merge pull request #8306 from r4f4/capi-aws-custom-endpoints
CORS-3470: capi/aws: add custom endpoint support.
2024-04-24 22:40:33 +00:00