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

197 Commits

Author SHA1 Message Date
Rafael Fonseca
99615a3fa5 hack: update URL of envtest binaries download
To align with
https://github.com/kubernetes-sigs/controller-runtime/pull/2811.

Also we now have access to the same version we use in the release which
is 1.29.5.
2024-06-06 16:01:11 +02:00
Rafael Fonseca
7cf05aa7fb 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:40:37 +02:00
Rafael Fonseca
15c6fc2629 OCPBUGS-34457: bump envtest binaries version
We are using 1.29.5 in CI/release [1], so let's try to match that for
local dev. The closest version available in kubebuilder-tools is 1.29.3.

[1] https://github.com/openshift/kubernetes/pull/1972
2024-05-25 12:07:00 +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
Vince Prignano
17a7a4c2ea CORS-2852: Introduce pkg/clusterapi, system, and local control plane
Signed-off-by: Vince Prignano <vincepri@redhat.com>
2023-11-01 11:43:46 -07:00
Vince Prignano
b199f34775 Revisit linters, enable parallel workers
Signed-off-by: Vince Prignano <vincepri@redhat.com>
2023-10-30 07:41:41 -07:00
Vince Prignano
22c6bde87b hack/lint: bump golangci-lint version to v1.53.1
Signed-off-by: Vince Prignano <vincepri@redhat.com>
2023-10-30 07:33:47 -07:00
Vince Prignano
f25b4cf1dd hack/build: build cluster api when OPENSHIFT_INSTALL_CLUSTER_API is set
Signed-off-by: Vince Prignano <vincepri@redhat.com>
2023-10-23 11:31:46 -07:00
Vince Prignano
8e8df20915 hack/verify-vendor: update for cluster-api
Signed-off-by: Vince Prignano <vincepri@redhat.com>
2023-10-23 11:29:31 -07:00
Vince Prignano
d33bede015 hack/shellcheck: update for cluster-api folder
Signed-off-by: Vince Prignano <vincepri@redhat.com>
2023-10-23 11:29:31 -07:00
Andrea Fasano
5f459534b4 disabling test timeout 2023-10-16 08:49:36 -04:00
Andrea Fasano
778a5a303e Enforcing the serial execution of the integration tests 2023-10-13 11:01:09 -04:00
Richard Su
72275500cf AGENT-678: Fix concurrency issue in agent integration tests
Force the integration tests to run in serial until the function
extractFileFromImage in pkg/asset/agent/image/oc.go has been
fixed.

Signed-off-by: Richard Su <rwsu@redhat.com>
2023-07-07 16:56:10 -04:00
Richard Su
5f99df589b Update /hack/go-test.sh to golang 1.20
It was previously set to 1.18 and needed to be bumped to match
move to golang 1.20.
2023-06-22 10:59:12 +08:00
Patrick Dillon
33109b7034 Bump to Go 1.20
Bumps core Installer to Go v1.20. Terraform and providers will be
updated separately.
2023-06-01 11:44:20 -04:00
Pierre Prinetti
8801811574 openstack-manifests: Export JUnit results
Expose test results as JUnit to let Prow parse them.
2023-03-14 11:11:16 +01:00
Pierre Prinetti
34b53ca9d3 openstack-manifests: Refactor 2023-03-12 17:39:56 +01:00
OpenShift Merge Robot
6fde21d5b8 Merge pull request #6935 from Juneezee/refactor/yaml
refactor: replace `github.com/ghodss/yaml` with `sigs.k8s.io/yaml`
2023-03-10 00:03:48 -05:00
Eng Zer Jun
66a8a2abd4 refactor: replace github.com/ghodss/yaml with sigs.k8s.io/yaml
At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-03-05 16:13:33 +08:00
Pierre Prinetti
1b03f46088 openstack-manifest: Show assets dir if persisted
Ease manual runs.
2023-03-03 09:35:32 +01:00
OpenShift Merge Robot
41e436eecc Merge pull request #6908 from shiftstack/manifest_test_run
openstack-manifests: Option to run selected test cases
2023-02-28 17:10:46 +01:00
Pierre Prinetti
0c67140ae8 openstack-manifests: Option to run selected test cases
Add a `-r <regexp>` to `test-manifests.sh` to optionally only run test
cases with a matching name.
2023-02-28 11:15:40 +01:00
Vadim Rutkovsky
8db73f591f hack/build-coreos-manifest: support OKD
If TAGS env var contains "okd" CoreOS manifest script should use
FCOS json. This is necessary for OKD clusters to be installable via
Hypershift
2023-02-27 16:35:54 +01:00
OpenShift Merge Robot
2659252502 Merge pull request #6859 from r4f4/go-lint-1.48
linter: bump version to sync with CI
2023-02-16 07:07:56 -05:00
Rafael Fonseca
c3f8ad75b4 linter: bump version to sync with CI
CI now has golangci-lint 1.48 which supports Golang 1.19. Let's make
sure our hack/ tool uses the same version.
2023-02-15 16:45:55 +01:00
OpenShift Merge Robot
a4f98fced7 Merge pull request #6835 from jcpowermac/add-debugging-to-builds
installer dev build settings to enable delve
2023-02-13 22:44:28 -05:00
OpenShift Merge Robot
e901621f40 Merge pull request #6839 from shiftstack/manifest_test_persist_option
openstack-manifests: Add a debug option
2023-02-10 19:00:51 -05:00
Joseph Callen
e24b0255c7 installer dev build settings to enable delve
Using MODE=dev ./hack/build.shwith this PR will allow the use
of Delve (and rr). It disables:

compiler optimizations
inlining
DWARF stripping

MODE=release remains unchanged.
2023-02-09 09:18:46 -05:00
Pierre Prinetti
03da672b8f openstack-manifests: Beautify output 2023-02-09 15:08:21 +01:00
Pierre Prinetti
62ed473dfd openstack-manifests: Add a debug option
Add the `-p` (Persist) option to prevent the automated cleanup of
generated manifests.
2023-02-09 12:25:23 +01:00
Rafael Fonseca
3243c88cdf hack: go-genmock: also generate mock for destroy pkg 2023-02-03 16:04:08 +01:00
Rafael Fonseca
83d0a6a2dd CORS-2340: hack: replace deprecated go-lint
Use golangci-lint instead, which is an aggregator of linters.

Resolves https://issues.redhat.com/browse/CORS-2340
2022-12-15 17:52:21 +01:00
Rafael Fonseca
6039d415ec tooling: add gci tool to standardize import order
The imports are ordered in 4 sections:
 - standard lib
 - default imports
 - prefix(github.com/openshift)
 - blank imports (_ <import_path>)
2022-12-13 15:40:57 +01:00
Andrea Fasano
55d450ad37 agent: add integration tests
This patch adds an initial set of integration test for the agent installer, based on the testscript package
2022-12-06 08:31:21 -05:00
Rafael Fonseca
428688c9cd Replace deprecated io/ioutil package
`io/ioutil` has been deprecated since go-1.16 [1]. We should use `io`
and `os` instead.

[1] https://github.com/golang/go/issues/42026
2022-11-18 20:08:57 +01:00