Build the operator for FIPS enabled environments #456
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit does a few things to make sure the Compliance Operator is built
so that it can run in FIPS-enabled clusters.
links dynamically to the necessary openssl libraries
feature
The ubi9-micro image we were using was ideal for minimal dependencies,
but it doesn't include openssl, which we need to support FIPS. This
commit changes the operator container image to fix this.
Set CGO_ENABLE=1 so that go can link dynamically to the openssl library.
Use an image from app-sre/boilerplate to build the operator binary. This
is needed so that golang links the necessary libraries.
Set the appropriate golang experimental flags at build time so the
complier knows to build for FIPS-enabled clusters. The other part of
this change is a golang file we need to keep in-tree. If we're missing
either, the build won't produce container images for FIPS-enabled
environments.
This commit is a smattering of openshift/boilerplate code that enables
FIPS for operator builds. Eventually, we should reconsider maintaining
our hand-rolled Makefiles for boilerplate, which contains handy tools
and scripts for maintaining common operator components.