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

228 Commits

Author SHA1 Message Date
Patrick Dillon
298f04a1b3 OCPBUGS-69734S: filter for only CRDS needed by CAPZ
CAPZ filters ASO CRDs so it only includes a small subset of ASO CRDs.
Prior to this commit, we were not filtering ASO CRDs, which leads to
a bug when ASO and CAPZ create conflicting CRDs. By filtering the ASO
CRDs in the same manner as CAPZ we can avoid the bug.
2026-01-14 15:45:58 -05:00
Patrick Dillon
73193a7ad9 hack/verify-capi-manifests: download nutanix crds
We have not been able to reliably automate the generation of the
nutanix CRDs. Instead, download them from the release.
2026-01-14 15:45:57 -05:00
Brandon Palm
ae49b022eb Upgrade GolangCI-lint to v2 2025-12-01 09:38:34 -06: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
sarthakpurohit
f6101bb752 Removed fcos references 2025-10-13 18:14:39 +05:30
Patrick Dillon
2ebd2b9fd8 hack/rhcos: add README
Documents how to run the rhcos stream marketplace populator program.
2025-08-21 11:48:52 -04:00
Patrick Dillon
bc46191d3b hack: add marketplace stream to coreos manifest
Updates the generation of the coreos stream manifest, which runs
during container building, to merge the contents of the
marketplace-rhcos.json file with rhcos.json when creating the coreos
stream configmap.
2025-08-18 16:38:49 -04:00
Patrick Dillon
eace8b4949 hack/rhcos: add cmd to populate marketplace json
Adds a standalone go program that generates
data/data/coreos/marketplace-rhcos.json

This file is combined with rhcos.json to create the coreos stream,
but the files are updated at different cadences by different teams.
2025-08-18 16:12:50 -04:00
ehila
96c32c71ae upkeep: update golint-ci version and config
Signed-off-by: ehila <ehila@redhat.com>
2025-07-29 23:10:04 -04:00
ehila
0f7780173b upkeep: update hack scripts to use go 1.24
Signed-off-by: ehila <ehila@redhat.com>
2025-07-29 23:10:04 -04:00
Patrick Dillon
8aa4a92def hack/: remove terraform build
All terraform providers have been removed from installs, so we can
stop building them.
2025-04-16 12:52:32 -04:00
Prashanth684
ca251c3e4a Add stream metadata for scos to be used by OKD
OKD will now use centos pure os bootimages
This change was generated using:

```
plume cosa2stream \
    --distro rhcos --no-signatures --name c9s \
    --url https://rhcos.mirror.openshift.com/art/storage/prod/streams \
    x86_64=9.0.20250222-0 \
    aarch64=9.0.20250222-0 \
    ppc64le=9.0.20250222-0 \
    s390x=9.0.20250222-0
```

Co-authored-by: Patrick Dillon <pdd@redhat.com>
2025-02-26 09:22:52 -08:00
Patrick Dillon
e1f1348d7a switch to go.uber.org/mock/gomock
Our existing genmock package is deprecated. go.uber.org/mock/gomock is
now recognized as the official fork.
2025-01-30 17:06:24 -05:00
Thuan Vo
822f8283a1 lint: pin golangci-lint version to v1.63.4
Sync version with CI
2025-01-27 09:46:02 -08:00
Thuan Vo
e5738d5c43 lint: bump local lint version to latest and apply fixes
Since CI is using tag latest, we can also use the same tag here. There
might be a case where latest mirrored image on CI points to an older
version. In that case, we can adjust local version accordingly.

Current version: golangci-lint v1.63.4
2025-01-24 20:33:25 -08:00
Thuan Vo
aac05ce454 lint: bump local golint version and fix lint configurations
The file .golangci.yaml contains configurations for golangci-lint.
As golangci-lint version is bumped, some configurations are deprecated
and moved/removed. With this patch, the file is now compatible.

For gosec, we can safely exclude G115 (integer overflow converting between int types).
For errcheck, we skip checking type assertions.
2025-01-24 13:31:46 -08:00
Thuan Vo
20d304f7dc build: bump go version to 1.23 2025-01-24 13:31:46 -08:00
Rafael F.
cbcd65fa6b CORS-3295: hack: add script to verify capi CRDs (#8106)
* CORS-3295: hack: add script to verify capi CRDs

This script will be used to create a test in CI to check that the capi
CRDs in data/data/cluster-api match what's expected from the provider
version used in cluster-api/providers.

As a side effect, this script can be used to generate the CRD, allowing
a dev to then commit the result.

* hack: add capi CRD generation to verify-capi-manifests script

* hack/verify-capi-manifests: use Golang 1.22 image

* hack: add azureaso to the manifest generation

Although we are not technically generating the manifest, only
downloading it from the upstream repo.

* data/data/cluster-api: reconcile CRDs differences

This is the diff generated by running `hack/verify-capi-manifests.sh`
2025-01-15 11:14:41 +00:00
Andrea Fasano
8ec2abd9e0 pin setup-envtest to v0.19 2024-10-16 05:54:50 -04:00
openshift-merge-bot[bot]
fbfb547a1b Merge pull request #9067 from jcpowermac/bump-to-k8s-131
CORS-3601: Bump api, client-go, library-go for k8s 1.31
2024-10-04 00:58:05 +00:00
Joseph Callen
c646b3e597 sync cluster-api version 2024-10-03 10:43:40 -04:00
Andrea Fasano
8d5de32688 allow node-joiner hack script to run in the CI 2024-10-02 10:38:51 -04:00
Andrea Fasano
dd03b5fac5 added envtest binaries dest dir 2024-09-30 09:50:43 -04:00
Andrea Fasano
e7f2213d61 other lint fixes 2024-09-30 09:48:14 -04:00
Andrea Fasano
3f38125bea additional lint/shellcheck fixes 2024-09-30 09:48:14 -04:00
Andrea Fasano
2ff7ccc89c add integration test (plus required test infrastructure) for node-joiner 2024-09-30 09:48:13 -04:00
Andrea Fasano
606b4d183f configure CGO_ENABLED for fips builds 2024-07-23 10:46:06 -04:00
openshift-merge-bot[bot]
c35559a137 Merge pull request #8471 from r4f4/capi-bump-envtest-tools
OCPBUGS-34456: bump envtest binaries version
2024-06-08 13:18:13 +00:00
openshift-merge-bot[bot]
f5f6a6dc9d Merge pull request #8535 from r4f4/hack-bump-golangci-lint
no-jira: hack: bump golangci-lint version
2024-06-08 04:16:45 +00:00
Rafael Fonseca
6899613aed hack: update URL of envtest binaries download
To align with https://github.com/kubernetes-sigs/controller-runtime/pull/2811
2024-06-06 15:48:51 +02:00
Rafael Fonseca
426579250b no-jira: hack: bump golangci-lint version
We are using golangci-lint v1.59.0 in CI, so let's match that in local
dev. That version is needed for Golang 1.22 support.

This is a fallout of https://github.com/openshift/installer/pull/8473.
2024-06-06 14:45:04 +02:00
Rafael Fonseca
93fa8b1351 hack/images: skip envtest download in CI/release
Because of the way in which we rebase and build our kube fork, the
binary doesn't have minor versions set correctly. For example, version
1.29.5 appears as `v1.29.0-rc.1.3970+87992f48b0ead9-dirty` and that
breaks the version detection in our scripts.

Since we already have pre-built binaries in CI/release, there is no
reason for downloading those binaries. The only case in which it's
needed is for local dev. So we introduce an env var `SKIP_ENVTEST` to
skip the download when building images.
2024-05-25 16:39:01 +02:00
Rafael Fonseca
93541aa05b hack: bump golang to 1.22 2024-05-25 15:25:54 +02:00
Rafael Fonseca
36f4a6b63a OCPBUGS-34456: bump envtest binaries version
We are using 1.30 in CI/release [1], so let's try to match that for
local dev.

[1] https://github.com/openshift/kubernetes/pull/1942
2024-05-25 12:17:55 +02:00
Rafael Fonseca
02a3183cf4 hack: fix envtest version detection fallback 2024-05-11 16:41:17 +02:00
Rafael Fonseca
dbfec7eda8 CORS-3516: hack: do not execute cross-compiled binaries
We cannot execute cross-compiled binaries, otherwise we get an error saying:
```
hack/build-cluster-api.sh: line 26: /go/src/github.com/openshift/installer/cluster-api/bin/darwin_amd64/kube-apiserver: cannot execute binary file: Exec format error
```
The check should be skipped in those cases.
2024-05-11 16:17:25 +02:00
Rafael Fonseca
c66138e27f CORS-3477: hack: build capi + providers by default.
Always build capi providers in the Installer so we can deprecate/remove
the terraform providers.
2024-05-07 00:28:56 +02:00
openshift-merge-bot[bot]
be92db7384 Merge pull request #8021 from shiftstack/capo-master
OSASINFRA-3434: Use cluster-api-provider-openstack v0.10 and CAPO v1beta1 manifests
2024-04-26 23:27:14 +00:00
Pierre Prinetti
c2f06a6f69 openstack: Apply FeatureSet in manifest-test
With this patch, manifest-tests parse feature-set and feature-gates
information from the environment variables `FEATURE_SET` and
`FEATURE_GATES`.

This change enables testing the generation of manifests in the CAPI
flow.
2024-04-26 11:31:42 +02:00
Rafael Fonseca
2a373d10cc hack: use >= for capi binaries version comparison
Only download the binaries if the existing binaries' version is lower
than the minimum version (currently 1.28.0). This change will be needed
when we copy etcd/kas binaries from existing container images which
build them from source.
2024-04-24 18:05:11 +02:00
Rafael Fonseca
3eea7226c5 hack: bump golangci-lint for go 1.21 support 2024-04-19 14:03:13 +02:00
Zane Bitter
b4351e8261 Use new build tag to differentiate dynamic build
When we linked to libvirt directly, having the libvirt platform in the
build was synonymous with a dynamically linked build. Now that we use a
pure-Go libvirt library, the build type can be independent of whether
libvirt is included.

Once the baremetal installer build no longer includes the libvirt
platform, we still want it to be dynamically linked.
2024-04-09 13:09:32 +12:00
Andrea Fasano
0bf79d6245 Fix build script 2024-04-02 06:31:05 -04:00
Andrea Fasano
298975a4df utlity script for building node-joiner binary 2024-04-02 06:31:05 -04:00
Rafael Fonseca
b097966aac hack: bump golang to 1.21 2024-01-27 10:10:06 +01:00
Rafael Fonseca
cdf477d08a build: drop vsphereprivate build workaround
Initially we were using the provider's module version in the go.sum
file to determine if a provider needed to be rebuilt. Since
vsphereprivate is locally developed, not an imported module, it required
special treatment. Now that we are using the `go.mod` git hash to check
if a terraform provider needs to be rebuilt, we don't need to give
vsphereprivate special treatment. Unfortunately, this implementation
detail slipped through even though we changed the approach.

If we don't drop the workaround, the build script will think
`vsphereprivate` always needs to be rebuilt since it's comparing values
that will never match.
2023-12-15 18:10:40 +01:00
Rafael Fonseca
fd7211248c hack: only rebuild terraform providers if needed
Look at the Golang module information from the binary to determine
whether the providers need to be rebuilt. It'll be useful when we use an
external container image containing pre-built binaries for the providers.
2023-12-06 09:35:59 +01:00
Rafael Fonseca
7fa84e0f44 hack: drop hardcoded -j8 in make invocations.
Parallel builds can be achieved by setting the MAKEFLAGS env var.
Hardcoding the value is causing some container builds to fail in CI with
```
{  error occurred handling build openstack-installer-amd64: build not successful after 5 attempts: [the build openstack-installer-amd64 failed after 7m36s with reason BuildPodEvicted: The node was low on resource: memory. Threshold quantity: 100Mi, available: 65128Ki. Container docker-build was using 10522940Ki, request is 5Gi, has larger consumption of memory. , the build openstack-installer-amd64 failed after 6m31s with reason BuildPodEvicted: The node was low on resource: memory. Threshold quantity: 100Mi, available: 53452Ki. Container docker-build was using 10936476Ki, request is 5Gi, has larger consumption of memory.
```
2023-12-05 16:06:41 +01:00
openshift-merge-bot[bot]
2596e5d46c Merge pull request #7656 from patrickdillon/altinfra-image-tags
CORS-2835: use build tags to produce installer with alternate infrastructure providers
2023-11-07 15:51:06 +00:00
Patrick Dillon
701464780f hack/build.sh: skip terraform for altinfra or aro
When building the altinfra or ARO images, no terraform dependencies
should be involved, so skip them in the build script.
2023-11-01 14:49:43 -04:00