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.
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
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.
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.
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.
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.
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.
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.
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.
```
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>
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>
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.