Skip to content

Commit f456229

Browse files
NickLarsenNZlabrenbe
authored andcommitted
chore(opa): Update versions ahead of 25.7.0 (#1103)
* chore(opa): Remove 0.67.1 * chore(opa): Remove legacy bundle-builder * chore(opa): Bump ubi9 base image * chore(opa): Add 1.4.2 * fix(opa): Manually install Go version NOTE: The dnf package was 1.23.6 and OPA required 1.23.8 NOTE: I tried making the version paramaterized, but bake wouldn't allow it (it worked fine with `docker build` and `docker build xbuild`). * ci(mirror): Add golang * chore(opa): Use mirrored golang image * chore(opa): Parameterise golang container version * chore: Update changelog
1 parent 3b0674f commit f456229

File tree

5 files changed

+20
-41
lines changed

5 files changed

+20
-41
lines changed

.github/workflows/mirror.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- registry.k8s.io/sig-storage/csi-node-driver-registrar
1515
- registry.k8s.io/sig-storage/csi-provisioner
1616
- registry.k8s.io/git-sync/git-sync
17+
- registry-1.docker.io/library/golang
1718
image-index-manifest-tag:
1819
description: |
1920
The image index manifest tag, like 1.0.14 or v1.0.14

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file.
2323
`check-permissions-ownership.sh` provided in stackable-base image ([#1027]).
2424
- opa: check for correct permissions and ownerships in /stackable folder via
2525
`check-permissions-ownership.sh` provided in stackable-base image ([#1038]).
26+
- opa: Add `1.4.2` ([#1103]).
2627
- spark-k8s: check for correct permissions and ownerships in /stackable folder via
2728
`check-permissions-ownership.sh` provided in stackable-base image ([#1055]).
2829
- superset: check for correct permissions and ownerships in /stackable folder via
@@ -33,11 +34,13 @@ All notable changes to this project will be documented in this file.
3334
`check-permissions-ownership.sh` provided in stackable-base image ([#1043]).
3435
- nifi: Add OPA authorizer plugin with workaround ([#1058]).
3536
- java: Add JDK 24 ([#1097]).
37+
- ci: Add golang image to mirror workflow ([#1103]).
3638

3739
### Changed
3840

3941
- ubi-rust-builder: Bump Rust toolchain to 1.85.0, cargo-cyclonedx to 0.5.7, and cargo-auditable to 0.6.6 ([#1050]).
4042
- ubi9-rust-builder: Bump base image and update protoc to `30.2` ([#1091]).
43+
- stackable-devel: Bump ubi9 base image ([#1103]).
4144
- spark-k8s: Include spark-connect jars, replace OpenJDK with Temurin JDK, cleanup ([#1034]).
4245
- spark-connect-client: Image is now completely based on spark-k8s and includes JupyterLab and other demo dependencies ([#1071]).
4346
- jmx_exporter: Bump products to use `1.2.0` ([#1090]).
@@ -56,6 +59,7 @@ All notable changes to this project will be documented in this file.
5659
- Add `--locked` flag to `cargo install` commands for reproducible builds ([#1044]).
5760
- nifi: reduce docker image size by removing the recursive chown/chmods in the final image ([#1027]).
5861
- opa: reduce docker image size by removing the recursive chown/chmods in the final image ([#1038]).
62+
- opa: Manually install Go 1.23.9 ([#1103]).
5963
- spark-k8s: reduce docker image size by removing the recursive chown/chmods in the final image ([#1042]).
6064
- trino: reduce docker image size by removing the recursive chown/chmods in the final image ([#1025]).
6165
- zookeeper: reduce docker image size by removing the recursive chown/chmods in the final image ([#1043]).
@@ -67,6 +71,8 @@ All notable changes to this project will be documented in this file.
6771
Also remove the old release workflow.
6872
- zookeeper: Remove 3.9.2 ([#1093]).
6973
- Remove ubi8-rust-builder image ([#1091]).
74+
- opa: Remove `0.67.1` ([#1103]).
75+
- opa: Remove legacy bundle-builder from container build ([#1103]).
7076

7177
[#1025]: https://github.com/stackabletech/docker-images/pull/1025
7278
[#1027]: https://github.com/stackabletech/docker-images/pull/1027
@@ -92,6 +98,7 @@ All notable changes to this project will be documented in this file.
9298
[#1093]: https://github.com/stackabletech/docker-images/pull/1093
9399
[#1097]: https://github.com/stackabletech/docker-images/pull/1097
94100
[#1098]: https://github.com/stackabletech/docker-images/pull/1098
101+
[#1103]: https://github.com/stackabletech/docker-images/pull/1103
95102

96103
## [25.3.0] - 2025-03-21
97104

opa/Dockerfile

+7-36
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,9 @@
11
# syntax=docker/dockerfile:1.10.0@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5
2-
# check=error=true
2+
# check=error=true;skip=InvalidDefaultArgInFrom
33

4-
FROM stackable/image/stackable-base AS opa-bundle-builder
4+
ARG GOLANG
55

6-
ARG BUNDLE_BUILDER_VERSION
7-
8-
# Update image and install everything needed for Rustup & Rust
9-
RUN <<EOF
10-
microdnf update
11-
microdnf install \
12-
cmake \
13-
gcc \
14-
gcc-c++ \
15-
git \
16-
make \
17-
openssl-devel \
18-
pkg-config \
19-
systemd-devel \
20-
unzip
21-
rm -rf /var/cache/yum
22-
EOF
23-
24-
WORKDIR /
25-
26-
# WARNING (@NickLarsenNZ): We should pin the rustup version
27-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
28-
RUN git clone --depth 1 --branch ${BUNDLE_BUILDER_VERSION} https://github.com/stackabletech/opa-bundle-builder
29-
RUN <<EOF
30-
cd ./opa-bundle-builder
31-
. "$HOME/.cargo/env"
32-
rustup toolchain install
33-
cargo --quiet build --release
34-
# set correct groups
35-
chmod -R g=u /opa-bundle-builder/target/release/
36-
EOF
6+
FROM oci.stackable.tech/sdp/library/golang:${GOLANG} AS golang-image
377

388
FROM stackable/image/stackable-base AS multilog-builder
399

@@ -81,19 +51,21 @@ ENV GOOS=$TARGETOS
8151

8252
# gzip, tar - used to unpack the OPA source
8353
# git - needed by the cyclonedx-gomod tool to determine the version of OPA
84-
# golang - used to build OPA
8554
RUN <<EOF
8655
microdnf update
8756
microdnf install \
8857
git \
89-
golang \
9058
gzip \
9159
tar
9260
microdnf clean all
9361
EOF
9462

9563
COPY --chown=${STACKABLE_USER_UID}:0 opa/stackable/bin /stackable/opa/bin
9664

65+
# Manually install Go since the dnf package is sometimes not recent enough
66+
COPY --from=golang-image /usr/local/go/ /usr/local/go/
67+
ENV PATH="/usr/local/go/bin:${PATH}"
68+
9769
RUN <<EOF
9870
# We use version 1.7.0, since a newer version of cyclonedx-gomod is not compatible with the version of Golang (>= 1.23.1)
9971
go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@v1.7.0
@@ -137,7 +109,6 @@ LABEL name="Open Policy Agent" \
137109
COPY --chown=${STACKABLE_USER_UID}:0 opa/licenses /licenses
138110

139111
COPY --from=opa-builder --chown=${STACKABLE_USER_UID}:0 /stackable/opa /stackable/opa
140-
COPY --from=opa-bundle-builder --chown=${STACKABLE_USER_UID}:0 /opa-bundle-builder/target/release/stackable-opa-bundle-builder /stackable/opa-bundle-builder
141112
COPY --from=multilog-builder --chown=${STACKABLE_USER_UID}:0 /daemontools/admin/daemontools/command/multilog /stackable/multilog
142113

143114
RUN <<EOF

opa/versions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
versions = [
22
{
3-
"product": "1.0.1",
3+
"product": "1.4.2",
44
"vector": "0.46.1",
5-
"bundle_builder_version": "1.1.2",
5+
"golang": "1.23.9",
66
"stackable-base": "1.0.0",
77
},
88
{
9-
"product": "0.67.1",
9+
"product": "1.0.1",
1010
"vector": "0.46.1",
11-
"bundle_builder_version": "1.1.2",
11+
"golang": "1.23.9",
1212
"stackable-base": "1.0.0",
1313
},
1414
]

stackable-devel/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Find the latest version at https://catalog.redhat.com/software/containers/ubi9/ubi-minimal/615bd9b4075b022acc111bf5?container-tabs=gti
99
# IMPORTANT: Make sure to use the "Manifest List Digest" that references the images for multiple architectures
1010
# rather than just the "Image Digest" that references the image for the selected architecture.
11-
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:c0e70387664f30cd9cf2795b547e4a9a51002c44a4a86aa9335ab030134bf392
11+
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:e1c4703364c5cb58f5462575dc90345bcd934ddc45e6c32f9c162f2b5617681c
1212

1313
# intentionally unused
1414
ARG PRODUCT

0 commit comments

Comments
 (0)