From e7c9bc04567093762698511346022f8e638210ab Mon Sep 17 00:00:00 2001 From: Igor Rzegocki Date: Fri, 29 Dec 2023 19:14:28 +0100 Subject: [PATCH] feat: add script-exporter --- apps/script-exporter/Dockerfile | 23 +++++++++++++++++++++++ apps/script-exporter/ci/goss.yaml | 26 ++++++++++++++++++++++++++ apps/script-exporter/metadata.json | 17 +++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 apps/script-exporter/Dockerfile create mode 100644 apps/script-exporter/ci/goss.yaml create mode 100644 apps/script-exporter/metadata.json diff --git a/apps/script-exporter/Dockerfile b/apps/script-exporter/Dockerfile new file mode 100644 index 00000000..13c3eb60 --- /dev/null +++ b/apps/script-exporter/Dockerfile @@ -0,0 +1,23 @@ +ARG TARGETPLATFORM +ARG VERSION +FROM ricoberger/script_exporter:v${VERSION} as source +FROM public.ecr.aws/bitnami/kubectl:1.29.0 as kubectl + +FROM ghcr.io/deedee-ops/alpine:3.19.0 + +ARG TARGETPLATFORM +ARG VERSION +ARG CHANNEL + +COPY --from=source /bin/script_exporter /usr/bin/script_exporter +COPY --from=kubectl /opt/bitnami/kubectl/bin/kubectl /usr/bin/kubectl + +RUN touch /config/config.yaml + +USER 65000:65000 +EXPOSE 9469 +VOLUME ["/tmp"] +ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/base-entrypoint.sh", "/usr/bin/script_exporter"] +CMD ["-config.file", "/config/config.yaml"] + +LABEL org.opencontainers.image.source="https://github.com/ricoberger/script_exporter/" diff --git a/apps/script-exporter/ci/goss.yaml b/apps/script-exporter/ci/goss.yaml new file mode 100644 index 00000000..5c9ffa38 --- /dev/null +++ b/apps/script-exporter/ci/goss.yaml @@ -0,0 +1,26 @@ +--- +# https://github.com/goss-org/goss/blob/master/docs/manual.md#group +group: + abc: + exists: true + gid: 65000 +# https://github.com/goss-org/goss/blob/master/docs/manual.md#file +file: + /usr/bin/kubectl: + exists: true + /usr/bin/script_exporter: + exists: true +# https://github.com/goss-org/goss/blob/master/docs/manual.md#mount +mount: + /tmp: + exists: true +# https://github.com/goss-org/goss/blob/master/docs/manual.md#port +port: + tcp6:9469: + listening: true +# https://github.com/goss-org/goss/blob/master/docs/manual.md#user +user: + abc: + exists: true + uid: 65000 + gid: 65000 diff --git a/apps/script-exporter/metadata.json b/apps/script-exporter/metadata.json new file mode 100644 index 00000000..a2d7be21 --- /dev/null +++ b/apps/script-exporter/metadata.json @@ -0,0 +1,17 @@ +{ + "app": "script-exporter", + "base": false, + "testMuteCmd": false, + "channels": [ + { + "name": "stable", + "renovate::dataSource": "docker", + "renovate::depName": "ricoberger/script_exporter", + "version": "2.16.0", + "platforms": [ + "linux/amd64", + "linux/arm64" + ] + } + ] +}