-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HOSTEDCP-1079: RHTAP HO Containerfile
This adds a containerfile for RHTAP to build the HyperShift Operator. It is based on ubi 9 and on the 1.19 Go toolset (both rhel9) Signed-off-by: Antoni Segura Puimedon <antoni@redhat.com>
- Loading branch information
Showing
5 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
bin/ | ||
.github/ | ||
.tekton/ | ||
.ci-operator.yaml | ||
.ko.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ tools/bin | |
|
||
.kube | ||
/kubeconfig | ||
.dockerignore | ||
vendor/**/.dockerignore | ||
.docker | ||
|
||
# ignore util binaries | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM registry.access.redhat.com/ubi9/go-toolset:1.19 as builder | ||
|
||
COPY . . | ||
|
||
# Go toolset runs as user default(1001) with group root. To be able to build in | ||
# rootless mode as podman and ocp do, it is necessary to give permissions for | ||
# file creation to the root group, of which the user default is a member. | ||
# | ||
# Due to CVE-2022-24765, git refuses actions on .git repository it does not own | ||
# Since the COPY command leaves the owner as root but the build is done as the | ||
# default user, we need to set the global git config to consier the working | ||
# directory as a safe one | ||
RUN chmod g+w . && \ | ||
git config --global --add safe.directory "$PWD" && \ | ||
make build | ||
|
||
FROM registry.access.redhat.com/ubi9-minimal:9.2 | ||
COPY --from=builder \ | ||
/opt/app-root/src/bin/hypershift \ | ||
/opt/app-root/src/bin/hcp \ | ||
/opt/app-root/src/bin/hypershift-operator \ | ||
/opt/app-root/src/bin/control-plane-operator \ | ||
/usr/bin/ | ||
|
||
RUN cd /usr/bin && \ | ||
ln -s control-plane-operator ignition-server && \ | ||
ln -s control-plane-operator konnectivity-socks5-proxy && \ | ||
ln -s control-plane-operator availability-prober && \ | ||
ln -s control-plane-operator token-minter | ||
|
||
ENTRYPOINT ["/usr/bin/hypershift"] | ||
|
||
LABEL io.openshift.hypershift.control-plane-operator-subcommands=true | ||
LABEL io.openshift.hypershift.control-plane-operator-skips-haproxy=true | ||
LABEL io.openshift.hypershift.ignition-server-healthz-handler=true | ||
LABEL io.openshift.hypershift.control-plane-operator-manages-ignition-server=true | ||
LABEL io.openshift.hypershift.control-plane-operator-manages.cluster-machine-approver=true | ||
LABEL io.openshift.hypershift.control-plane-operator-manages.cluster-autoscaler=true | ||
LABEL io.openshift.hypershift.control-plane-operator-manages.decompress-decode-config=true | ||
LABEL io.openshift.hypershift.control-plane-operator-creates-aws-sg=true | ||
LABEL io.openshift.hypershift.control-plane-operator-applies-management-kas-network-policy-label=true | ||
LABEL io.openshift.hypershift.restricted-psa=true |