Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tekton/hive-mce-210-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-210-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-211-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-211-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-26-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-26-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-27-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-27-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-28-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-28-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-29-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-mce-29-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
2 changes: 1 addition & 1 deletion .tekton/hive-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
- CONTAINER_SUB_MANAGER_OFF=1
- EL8_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g35b6b0c.el8
- EL9_BUILD_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24.4-202507171054.g2f6f49f.el9
- BASE_IMAGE=registry.redhat.io/rhel9-6-els/rhel:9.6
- BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
- name: build-source-image
value: 'true'
- name: build-image-index
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG CONTAINER_SUB_MANAGER_OFF=0
ARG EL8_BUILD_IMAGE=${EL8_BUILD_IMAGE:-registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.24-openshift-4.20}
ARG EL9_BUILD_IMAGE=${EL9_BUILD_IMAGE:-registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.20}
ARG BASE_IMAGE=${BASE_IMAGE:-registry.ci.openshift.org/ocp/4.20:base-rhel9}
ARG BASE_IMAGE=${BASE_IMAGE:-registry.access.redhat.com/ubi9/ubi-minimal:latest}

FROM ${EL8_BUILD_IMAGE} as builder_rhel8
ARG GO=${GO:-go}
Expand Down Expand Up @@ -37,10 +37,7 @@ RUN make build-hiveadmission build-manager build-operator && \
FROM ${BASE_IMAGE}
ARG CONTAINER_SUB_MANAGER_OFF
ENV SMDEV_CONTAINER_OFF=${CONTAINER_SUB_MANAGER_OFF}
ARG DNF=dnf

# CVE-2023-6597
RUN ${DNF} upgrade -y python3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ubi9-minimal (with microdnf) has no python3 dependency at all, this package is not present anymore

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that might cause a problem with our makefile, which currently uses python on load to try to compute the semver. Time to resurrect HIVE-2862 / #2692 ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only for the final image, not the builder images

ARG DNF=${DNF:-microdnf}

RUN if [ -e "/activation-key/org" ]; then unlink /etc/rhsm-host; subscription-manager register --force --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey"); fi

Expand Down
22 changes: 18 additions & 4 deletions hack/hermetic/redhat.repo
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@
# a "yum repolist" to refresh available repos
#

[ubi-9-for-$basearch-baseos-rpms]
name = Red Hat Universal Base Image 9 (RPMs) - BaseOS
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/baseos/os
enabled = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

[ubi-9-for-$basearch-appstream-rpms]
name = Red Hat Universal Base Image 9 (RPMs) - AppStream
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/appstream/os
enabled = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

[rhel-9-for-$basearch-baseos-eus-rpms]
name = Red Hat Enterprise Linux 9 for $basearch - BaseOS - Extended Update Support (RPMs)
baseurl = https://cdn.redhat.com/content/eus/rhel9/9.6/$basearch/baseos/os
Expand All @@ -17,8 +31,8 @@ gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/6968121214801895763-key.pem
sslclientcert = /etc/pki/entitlement/6968121214801895763.pem
sslclientkey = /etc/pki/entitlement/8683845599944482170-key.pem
sslclientcert = /etc/pki/entitlement/8683845599944482170.pem
sslverifystatus = 1
metadata_expire = 86400
enabled_metadata = 1
Expand All @@ -31,8 +45,8 @@ gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/6968121214801895763-key.pem
sslclientcert = /etc/pki/entitlement/6968121214801895763.pem
sslclientkey = /etc/pki/entitlement/8683845599944482170-key.pem
sslclientcert = /etc/pki/entitlement/8683845599944482170.pem
sslverifystatus = 1
metadata_expire = 86400
enabled_metadata = 1
2 changes: 1 addition & 1 deletion hack/hermetic/rpms.in.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
contentOrigin:
repofiles:
- ./redhat.repo
packages: [openssh-clients, libvirt-libs, tar, krb5-libs, krb5-devel] # this should be kept in sync with the Dockerfile
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest version of krb5 included in ubi9-minimal is high enough that CVE-2023-39975 is not present

packages: [openssh-clients, libvirt-libs, tar] # this should be kept in sync with the Dockerfile
arches:
- x86_64
- ppc64le
Expand Down
Loading