Skip to content

Commit 1dc61e9

Browse files
committed
chore: Merge branch 'main' into feat/boil
2 parents 06638fc + 18eece9 commit 1dc61e9

File tree

8 files changed

+102
-0
lines changed

8 files changed

+102
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
99
- ubi9-rust-builder: Include `.tar.gz` snapshots of the operator source code in container images ([#1207])
1010
- opensearch: Add Opensearch as new product with version `3.1.0` ([#1215]).
1111
- opensearch: Use build-repo.stackable.tech instead of Maven Central ([#1222]).
12+
- opensearch: Add the `opensearch-prometheus-exporter` plugin to the image ([#1223]).
1213
- nifi: Backport NIFI-14848 to NiFi ([#1225])
1314

1415
### Changed
@@ -21,6 +22,7 @@ All notable changes to this project will be documented in this file.
2122
[#1219]: https://github.com/stackabletech/docker-images/pull/1219
2223
[#1220]: https://github.com/stackabletech/docker-images/pull/1220
2324
[#1222]: https://github.com/stackabletech/docker-images/pull/1222
25+
[#1223]: https://github.com/stackabletech/docker-images/pull/1223
2426
[#1225]: https://github.com/stackabletech/docker-images/pull/1225
2527

2628
## [25.7.0] - 2025-07-23

opensearch/Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
# check=error=true
33

44
FROM local-image/opensearch/security-plugin AS opensearch-security-plugin
5+
FROM local-image/opensearch/opensearch-prometheus-exporter AS opensearch-prometheus-exporter
56
FROM local-image/java-devel AS opensearch-builder
67

78
ARG PRODUCT_VERSION
89
ARG RELEASE_VERSION
910
ARG OPENSEARCH_SECURITY_PLUGIN_VERSION
11+
ARG OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER_VERSION
1012
ARG STACKABLE_USER_UID
1113
ARG TARGETARCH
1214

@@ -56,6 +58,18 @@ rm opensearch-security-${OPENSEARCH_SECURITY_PLUGIN_VERSION}.zip
5658
mv config /stackable/opensearch-${PRODUCT_VERSION}/config/opensearch-security
5759
EOF
5860

61+
WORKDIR /stackable/opensearch-prometheus-exporter
62+
COPY \
63+
--chown=${STACKABLE_USER_UID}:0 \
64+
--from=opensearch-prometheus-exporter \
65+
/stackable/src/opensearch/opensearch-prometheus-exporter/patchable-work/worktree/${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER_VERSION}/build/distributions/prometheus-exporter-${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER_VERSION}.zip \
66+
opensearch-prometheus-exporter-${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER_VERSION}.zip
67+
68+
RUN <<EOF
69+
unzip opensearch-prometheus-exporter-${OPENSEARCH_SECURITY_PLUGIN_VERSION}.zip
70+
rm opensearch-prometheus-exporter-${OPENSEARCH_SECURITY_PLUGIN_VERSION}.zip
71+
EOF
72+
5973
WORKDIR /stackable/opensearch-${PRODUCT_VERSION}
6074

6175
RUN <<EOF
@@ -77,6 +91,7 @@ FROM local-image/jdk-base AS final
7791
ARG PRODUCT_VERSION
7892
ARG RELEASE_VERSION
7993
ARG OPENSEARCH_SECURITY_PLUGIN_VERSION
94+
ARG OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER_VERSION
8095
ARG STACKABLE_USER_UID
8196

8297
ARG NAME="OpenSearch"
@@ -109,6 +124,11 @@ COPY \
109124
--from=opensearch-builder \
110125
/stackable/opensearch-security \
111126
/stackable/opensearch-${PRODUCT_VERSION}-stackable${RELEASE_VERSION}/plugins/opensearch-security
127+
COPY \
128+
--chown=${STACKABLE_USER_UID}:0 \
129+
--from=opensearch-builder \
130+
/stackable/opensearch-prometheus-exporter \
131+
/stackable/opensearch-${PRODUCT_VERSION}-stackable${RELEASE_VERSION}/plugins/prometheus-exporter
112132
COPY \
113133
--chown=${STACKABLE_USER_UID}:0 \
114134
--from=opensearch-builder \
@@ -119,6 +139,11 @@ COPY \
119139
--from=opensearch-security-plugin \
120140
/stackable/opensearch-security-${OPENSEARCH_SECURITY_PLUGIN_VERSION}-stackable${RELEASE_VERSION}-src.tar.gz \
121141
/stackable
142+
COPY \
143+
--chown=${STACKABLE_USER_UID}:0 \
144+
--from=opensearch-prometheus-exporter \
145+
/stackable/opensearch-prometheus-exporter-${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER_VERSION}-stackable${RELEASE_VERSION}-src.tar.gz \
146+
/stackable
122147
COPY \
123148
--chown=${STACKABLE_USER_UID}:0 \
124149
--from=opensearch-builder \
@@ -129,6 +154,11 @@ COPY \
129154
--from=opensearch-security-plugin \
130155
/stackable/src/opensearch/security-plugin/patchable-work/worktree/${OPENSEARCH_SECURITY_PLUGIN_VERSION}/build/reports/bom.json \
131156
/stackable/opensearch-security-${OPENSEARCH_SECURITY_PLUGIN_VERSION}-stackable${RELEASE_VERSION}.cdx.json
157+
COPY \
158+
--chown=${STACKABLE_USER_UID}:0 \
159+
--from=opensearch-prometheus-exporter \
160+
/stackable/src/opensearch/opensearch-prometheus-exporter/patchable-work/worktree/${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER_VERSION}/build/reports/bom.json \
161+
/stackable/opensearch-prometheus-exporter-${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER_VERSION}-stackable${RELEASE_VERSION}.cdx.json
132162

133163
RUN <<EOF
134164
microdnf update
@@ -140,6 +170,7 @@ rm -rf /var/cache/yum
140170
chown ${STACKABLE_USER_UID}:0 ${HOME}
141171
chmod g=u /stackable/opensearch-${PRODUCT_VERSION}-stackable${RELEASE_VERSION}
142172
chmod g=u /stackable/opensearch-${PRODUCT_VERSION}-stackable${RELEASE_VERSION}/plugins/opensearch-security
173+
chmod g=u /stackable/opensearch-${PRODUCT_VERSION}-stackable${RELEASE_VERSION}/plugins/prometheus-exporter
143174
chmod g=u /stackable/*-src.tar.gz
144175
chmod g=u /stackable/*.cdx.json
145176
ln -s /stackable/opensearch-${PRODUCT_VERSION}-stackable${RELEASE_VERSION} ${OPENSEARCH_HOME}

opensearch/boil-config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
java-devel = "21"
33
jdk-base = "21"
44
"opensearch/security-plugin" = "3.1.0.0"
5+
"opensearch/opensearch-prometheus-exporter" = "3.1.0.0"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
2+
# check=error=true
3+
4+
FROM local-image/java-devel AS opensearch-prometheus-exporter-builder
5+
6+
ARG PRODUCT_VERSION
7+
ARG RELEASE_VERSION
8+
ARG STACKABLE_USER_UID
9+
10+
USER ${STACKABLE_USER_UID}
11+
WORKDIR /stackable
12+
13+
COPY --chown=${STACKABLE_USER_UID}:0 opensearch/opensearch-prometheus-exporter/stackable/patches/patchable.toml /stackable/src/opensearch/opensearch-prometheus-exporter/stackable/patches/patchable.toml
14+
COPY --chown=${STACKABLE_USER_UID}:0 opensearch/opensearch-prometheus-exporter/stackable/patches/${PRODUCT_VERSION} /stackable/src/opensearch/opensearch-prometheus-exporter/stackable/patches/${PRODUCT_VERSION}
15+
16+
RUN <<EOF
17+
cd "$(/stackable/patchable --images-repo-root=src checkout opensearch/opensearch-prometheus-exporter ${PRODUCT_VERSION})"
18+
19+
# Create snapshot of the source code including custom patches
20+
tar -czf /stackable/opensearch-prometheus-exporter-${PRODUCT_VERSION}-stackable${RELEASE_VERSION}-src.tar.gz .
21+
./gradlew clean assemble -Dbuild.snapshot=false
22+
./gradlew cyclonedxBom --warning-mode=summary -Dbuild.snapshot=false
23+
EOF
24+
25+
RUN <<EOF
26+
# Change the group permissions already in the builder image to reduce the size of the final image.
27+
# see https://github.com/stackabletech/docker-images/issues/961
28+
chmod -R g=u /stackable
29+
EOF
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[versions."3.1.0.0".local-images]
2+
java-devel = "21"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From f89f753d1bc03598bfe129c367233fec6daee078 Mon Sep 17 00:00:00 2001
2+
From: Benedikt Labrenz <[email protected]>
3+
Date: Tue, 12 Aug 2025 14:59:12 +0200
4+
Subject: Add CycloneDX plugin
5+
6+
---
7+
build.gradle | 14 ++++++++++++++
8+
1 file changed, 14 insertions(+)
9+
10+
diff --git a/build.gradle b/build.gradle
11+
index 6c09118..d47ae14 100644
12+
--- a/build.gradle
13+
+++ b/build.gradle
14+
@@ -63,6 +63,20 @@ buildscript {
15+
}
16+
}
17+
18+
+plugins {
19+
+ id "org.cyclonedx.bom" version "2.3.1"
20+
+}
21+
+
22+
+cyclonedxBom {
23+
+ includeConfigs = ["runtimeClasspath"]
24+
+ includeLicenseText = false
25+
+ skipConfigs = ["compileClasspath", "testCompileClasspath"]
26+
+ projectType = "application"
27+
+ schemaVersion = "1.6"
28+
+ outputFormat = "json"
29+
+ componentVersion = versions.version
30+
+}
31+
+
32+
apply plugin: 'java'
33+
apply plugin: 'idea'
34+
apply plugin: 'opensearch.opensearchplugin'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
base = "df60b43e34d0f7fba6be9e003924a413764df85e"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
upstream = "https://github.com/opensearch-project/opensearch-prometheus-exporter"
2+
default-mirror = "https://github.com/stackabletech/opensearch-prometheus-exporter"

0 commit comments

Comments
 (0)