-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat(opensearch): Add prometheus-exporter plugin to opensearch image #1223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ba3ccaa
add elasticsearch exporter to opensearch image
labrenbe 3e0d26a
add changelog entry
labrenbe e48fb4a
switch from elasticsearch-exporter to opensearch-prometheus-exporter
labrenbe b95818e
Merge remote-tracking branch 'origin/main' into feat/opensearch-prome…
labrenbe 77b3d23
Merge remote-tracking branch 'origin/main' into feat/opensearch-prome…
labrenbe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,29 @@ | ||
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7 | ||
# check=error=true | ||
|
||
FROM stackable/image/java-devel AS opensearch-prometheus-exporter-builder | ||
|
||
ARG PRODUCT | ||
ARG RELEASE | ||
ARG STACKABLE_USER_UID | ||
|
||
USER ${STACKABLE_USER_UID} | ||
WORKDIR /stackable | ||
|
||
COPY --chown=${STACKABLE_USER_UID}:0 opensearch/opensearch-prometheus-exporter/stackable/patches/patchable.toml /stackable/src/opensearch/opensearch-prometheus-exporter/stackable/patches/patchable.toml | ||
COPY --chown=${STACKABLE_USER_UID}:0 opensearch/opensearch-prometheus-exporter/stackable/patches/${PRODUCT} /stackable/src/opensearch/opensearch-prometheus-exporter/stackable/patches/${PRODUCT} | ||
|
||
RUN <<EOF | ||
cd "$(/stackable/patchable --images-repo-root=src checkout opensearch/opensearch-prometheus-exporter ${PRODUCT})" | ||
|
||
# Create snapshot of the source code including custom patches | ||
tar -czf /stackable/opensearch-prometheus-exporter-${PRODUCT}-stackable${RELEASE}-src.tar.gz . | ||
./gradlew clean assemble -Dbuild.snapshot=false | ||
./gradlew cyclonedxBom --warning-mode=summary -Dbuild.snapshot=false | ||
EOF | ||
|
||
RUN <<EOF | ||
# Change the group permissions already in the builder image to reduce the size of the final image. | ||
# see https://github.com/stackabletech/docker-images/issues/961 | ||
chmod -R g=u /stackable | ||
EOF |
34 changes: 34 additions & 0 deletions
34
.../opensearch-prometheus-exporter/stackable/patches/3.1.0.0/0001-Add-CycloneDX-plugin.patch
This file contains hidden or 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,34 @@ | ||
From f89f753d1bc03598bfe129c367233fec6daee078 Mon Sep 17 00:00:00 2001 | ||
From: Benedikt Labrenz <[email protected]> | ||
Date: Tue, 12 Aug 2025 14:59:12 +0200 | ||
Subject: Add CycloneDX plugin | ||
|
||
--- | ||
build.gradle | 14 ++++++++++++++ | ||
1 file changed, 14 insertions(+) | ||
|
||
diff --git a/build.gradle b/build.gradle | ||
index 6c09118..d47ae14 100644 | ||
--- a/build.gradle | ||
+++ b/build.gradle | ||
@@ -63,6 +63,20 @@ buildscript { | ||
} | ||
} | ||
|
||
+plugins { | ||
+ id "org.cyclonedx.bom" version "2.3.1" | ||
+} | ||
+ | ||
+cyclonedxBom { | ||
+ includeConfigs = ["runtimeClasspath"] | ||
+ includeLicenseText = false | ||
+ skipConfigs = ["compileClasspath", "testCompileClasspath"] | ||
+ projectType = "application" | ||
+ schemaVersion = "1.6" | ||
+ outputFormat = "json" | ||
+ componentVersion = versions.version | ||
+} | ||
+ | ||
apply plugin: 'java' | ||
apply plugin: 'idea' | ||
apply plugin: 'opensearch.opensearchplugin' |
1 change: 1 addition & 0 deletions
1
opensearch/opensearch-prometheus-exporter/stackable/patches/3.1.0.0/patchable.toml
This file contains hidden or 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 @@ | ||
base = "df60b43e34d0f7fba6be9e003924a413764df85e" |
2 changes: 2 additions & 0 deletions
2
opensearch/opensearch-prometheus-exporter/stackable/patches/patchable.toml
This file contains hidden or 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,2 @@ | ||
upstream = "https://github.com/opensearch-project/opensearch-prometheus-exporter" | ||
default-mirror = "https://github.com/stackabletech/opensearch-prometheus-exporter" |
This file contains hidden or 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,6 @@ | ||
versions = [ | ||
{ | ||
"product": "3.1.0.0", | ||
"java-devel": "21", | ||
}, | ||
] |
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.