Skip to content

Commit

Permalink
feat: clean up and refactor (SumoLogic#72)
Browse files Browse the repository at this point in the history
* feat: add Dockerfile and Makefile for sumo-ubi-minimal

Signed-off-by: Dominik Rosiek <[email protected]>

* feat: cleanup

Signed-off-by: Dominik Rosiek <[email protected]>

* feat: hardcode ubi image

Signed-off-by: Dominik Rosiek <[email protected]>

* feat: configure dependabot

Signed-off-by: Dominik Rosiek <[email protected]>

* feat: build sumo-ubi-minimal

Signed-off-by: Dominik Rosiek <[email protected]>

* feat: use ubi9 everywhere

Signed-off-by: Dominik Rosiek <[email protected]>

* fix: fix hanging fluent-bit build

Signed-off-by: Dominik Rosiek <[email protected]>

---------

Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
sumo-drosiek authored May 28, 2024
1 parent 1121d07 commit 7560f11
Show file tree
Hide file tree
Showing 111 changed files with 44 additions and 1,441 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
groups:
dependencies:
applies-to: "version-updates"
patterns:
- "*"
104 changes: 0 additions & 104 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,107 +1,3 @@
build-fluent-bit-v1.6.10:
${MAKE} -C fluent-bit/v1.6.10

build-kube-state-metrics-v1.9.7:
${MAKE} -C kube-state-metrics/v1.9.7

build-kube-state-metrics-v1.9.8:
${MAKE} -C kube-state-metrics/v1.9.8

build-prometheus-operator-v0.43.2:
${MAKE} -C prometheus-operator/v0.43.2

build-prometheus-operator-v0.44.0:
${MAKE} -C prometheus-operator/v0.44.0

build-prometheus-v2.22.1:
${MAKE} -C prometheus/v2.22.1

build-node-exporter-v1.0.1:
${MAKE} -C node-exporter/v1.0.1

build-node-exporter-v1.3.1:
${MAKE} -C node-exporter/v1.3.1

build-prometheus-config-reloader-v0.43.2:
${MAKE} -C prometheus-config-reloader/v0.43.2

build-prometheus-config-reloader-v0.44.0:
${MAKE} -C prometheus-config-reloader/v0.44.0

build-thanos-v0.10.0:
${MAKE} -C thanos/v0.10.0

build-thanos-v0.25.2:
${MAKE} -C thanos/v0.25.2

build-metrics-server-0.4.2-debian-10-r58:
${MAKE} -C metrics-server/0.4.2-debian-10-r58

build-metrics-server-0.6.1-debian-10-r67:
${MAKE} -C metrics-server/0.6.1-debian-10-r67

build-sumologic-kubernetes-setup-v3.0.0:
${MAKE} -C sumologic-kubernetes-setup/v3.0.0

build-sumologic-kubernetes-setup-v3.3.0:
${MAKE} -C sumologic-kubernetes-setup/v3.3.0

build-sumologic-kubernetes-setup-v3.4.0:
${MAKE} -C sumologic-kubernetes-setup/v3.4.0

build-telegraf-operator-v1.1.1:
${MAKE} -C telegraf-operator/v1.1.1

build-telegraf-operator-v1.3.5:
${MAKE} -C telegraf-operator/v1.3.5

.PHONY: build-sumo-ubi-minimal-8.4
build-sumo-ubi-minimal-8.4:
${MAKE} -C sumo-ubi-minimal/8.4 build

.PHONY: push-sumo-ubi-minimal-8.4
push-sumo-ubi-minimal-8.4:
${MAKE} -C sumo-ubi-minimal/8.4 push

build-kube-rbac-proxy-v0.5.0:
${MAKE} -C kube-rbac-proxy/v0.5.0

build-kube-rbac-proxy-v0.8.0:
${MAKE} -C kube-rbac-proxy/v0.8.0

build-telegraf-1.14.4:
${MAKE} -C telegraf/1.14.4

build-telegraf-1.21.2:
${MAKE} -C telegraf/1.21.2

build-opentelemetry-collector-0.22.0-sumo:
${MAKE} -C opentelemetry-collector/0.22.0-sumo

build-sumologic-otel-collector-0.54.0-sumo-0:
${MAKE} -C sumologic-otel-collector/0.54.0-sumo-0

build-sumologic-otel-collector-0.56.0-sumo-0:
${MAKE} -C sumologic-otel-collector/0.56.0-sumo-0

build-sumologic-otel-collector-0.57.2-sumo-1:
${MAKE} -C sumologic-otel-collector/0.57.2-sumo-1

build-kubernetes-fluentd-1.12.2-sumo-0:
${MAKE} -C kubernetes-fluentd/1.12.2-sumo-0

build-kubernetes-fluentd-1.14.6-sumo-5:
${MAKE} -C kubernetes-fluentd/1.14.6-sumo-5

build-opentelemetry-operator-0.51.0:
${MAKE} -C opentelemetry-operator/0.51.0

build-opentelemetry-operator-0.63.1:
${MAKE} -C opentelemetry-operator/0.63.1

build-opentelemetry-collector-contib-0.64.1:
${MAKE} -C opentelemetry-collector-contrib/0.64.1

list-images-v4:
./scripts/list-images.py \
--fetch-base \
Expand Down
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ifeq ($(UPSTREAM_VERSION),"")
endif

ifeq ($(IMAGE_NAME),"")
$(error IMAGE_NAME is required)
IMAGE_NAME = $(shell basename $(shell pwd))
endif

build:
Expand Down
3 changes: 1 addition & 2 deletions autoinstrumentation-dotnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
ARG UPSTREAM_VERSION
ARG UBI_IMAGE=registry.access.redhat.com/ubi8/ubi:8.6

## Use original image to copy files from
## ref: https://github.com/SumoLogic/opentelemetry-collector-contrib/blob/5fd8754cbf0b9d88309cba2c9fee4a5342f3ed95/cmd/otelcontribcol/Dockerfile
FROM public.ecr.aws/sumologic/autoinstrumentation-dotnet:${UPSTREAM_VERSION} as builder

## Build RedHat compliant image
FROM ${UBI_IMAGE}
FROM registry.access.redhat.com/ubi9/ubi:9.4
ARG UPSTREAM_VERSION
ARG RELEASE

Expand Down
1 change: 0 additions & 1 deletion autoinstrumentation-dotnet/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/make -f

VERSION_PREFIX := "v"
IMAGE_NAME := "autoinstrumentation-dotnet"

include ../Makefile.common
3 changes: 1 addition & 2 deletions autoinstrumentation-java/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
ARG UPSTREAM_VERSION
ARG UBI_IMAGE=registry.access.redhat.com/ubi8/ubi:8.6

## Use original image to copy files from
## ref: https://github.com/SumoLogic/opentelemetry-collector-contrib/blob/5fd8754cbf0b9d88309cba2c9fee4a5342f3ed95/cmd/otelcontribcol/Dockerfile
FROM public.ecr.aws/sumologic/autoinstrumentation-java:${UPSTREAM_VERSION} as builder

## Build RedHat compliant image
FROM ${UBI_IMAGE}
FROM registry.access.redhat.com/ubi9/ubi:9.4
ARG UPSTREAM_VERSION
ARG RELEASE

Expand Down
1 change: 0 additions & 1 deletion autoinstrumentation-java/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/make -f

VERSION_PREFIX := "v"
IMAGE_NAME := "autoinstrumentation-java"

include ../Makefile.common
3 changes: 1 addition & 2 deletions autoinstrumentation-nodejs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
ARG UPSTREAM_VERSION
ARG UBI_IMAGE=registry.access.redhat.com/ubi8/ubi:8.6

## Use original image to copy files from
## ref: https://github.com/SumoLogic/opentelemetry-collector-contrib/blob/5fd8754cbf0b9d88309cba2c9fee4a5342f3ed95/cmd/otelcontribcol/Dockerfile
FROM public.ecr.aws/sumologic/autoinstrumentation-nodejs:${UPSTREAM_VERSION} as builder

## Build RedHat compliant image
FROM ${UBI_IMAGE}
FROM registry.access.redhat.com/ubi9/ubi:9.4
ARG UPSTREAM_VERSION
ARG RELEASE

Expand Down
1 change: 0 additions & 1 deletion autoinstrumentation-nodejs/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/make -f

VERSION_PREFIX := "v"
IMAGE_NAME := "autoinstrumentation-nodejs"

include ../Makefile.common
3 changes: 1 addition & 2 deletions autoinstrumentation-python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
ARG UPSTREAM_VERSION
ARG UBI_IMAGE=registry.access.redhat.com/ubi8/ubi:8.6

## Use original image to copy files from
## ref: https://github.com/SumoLogic/opentelemetry-collector-contrib/blob/5fd8754cbf0b9d88309cba2c9fee4a5342f3ed95/cmd/otelcontribcol/Dockerfile
FROM public.ecr.aws/sumologic/autoinstrumentation-python:${UPSTREAM_VERSION} as builder

## Build RedHat compliant image
FROM ${UBI_IMAGE}
FROM registry.access.redhat.com/ubi9/ubi:9.4
ARG UPSTREAM_VERSION
ARG RELEASE

Expand Down
1 change: 0 additions & 1 deletion autoinstrumentation-python/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/make -f

VERSION_PREFIX := "v"
IMAGE_NAME := "autoinstrumentation-python"

include ../Makefile.common
2 changes: 1 addition & 1 deletion busybox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/ubi:8.6
FROM registry.access.redhat.com/ubi9/ubi:9.4

ADD LICENSE /licenses/
USER 65532:65532
Expand Down
1 change: 0 additions & 1 deletion busybox/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/make -f

VERSION_PREFIX := ""
IMAGE_NAME := "busybox"

include ../Makefile.common
7 changes: 3 additions & 4 deletions fluent-bit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ARG UPSTREAM_VERSION
ARG UBI_IMAGE=registry.access.redhat.com/ubi8/ubi-minimal:8.8

FROM registry.access.redhat.com/ubi8/ubi:8.8 as builder
FROM registry.access.redhat.com/ubi9/ubi:9.4 as builder
ARG UPSTREAM_VERSION

ARG BISON_VERSION=3.8.2
Expand Down Expand Up @@ -62,7 +61,7 @@ RUN install bin/fluent-bit /fluent-bit/bin/
RUN cp /tmp/src/conf/*.conf /fluent-bit/etc/

## Build RedHat compliant image
FROM ${UBI_IMAGE}
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4
ARG UPSTREAM_VERSION
ARG RELEASE

Expand All @@ -78,7 +77,7 @@ LABEL name="Fluent Bit" \
io.k8s.description="$DESCRIPTION" \
maintainer="[email protected]"

RUN microdnf update && microdnf install -y openssl libpq systemd && microdnf clean all
RUN microdnf update -y && microdnf install -y openssl libpq systemd && microdnf clean all

COPY --from=builder /fluent-bit /fluent-bit
COPY --from=builder /tmp/src/LICENSE /licenses/
Expand Down
1 change: 0 additions & 1 deletion fluent-bit/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/make -f

VERSION_PREFIX := "v"
IMAGE_NAME := "fluent-bit"

include ../Makefile.common
2 changes: 0 additions & 2 deletions fluent-bit/v1.6.10/Makefile

This file was deleted.

3 changes: 1 addition & 2 deletions kube-rbac-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
ARG UPSTREAM_VERSION
ARG UBI_IMAGE=registry.access.redhat.com/ubi8/ubi:8.6
## Use original image to copy files from
## ref: https://github.com/brancz/kube-rbac-proxy/blob/${UPSTREAM_VERSION}/Dockerfile
FROM public.ecr.aws/sumologic/kube-rbac-proxy:v${UPSTREAM_VERSION} as builder

## Build RedHat compliant image
FROM ${UBI_IMAGE}
FROM registry.access.redhat.com/ubi9/ubi:9.4
ARG UPSTREAM_VERSION
ARG RELEASE

Expand Down
1 change: 0 additions & 1 deletion kube-rbac-proxy/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/make -f

VERSION_PREFIX := "v"
IMAGE_NAME := "kube-rbac-proxy"

include ../Makefile.common
31 changes: 0 additions & 31 deletions kube-rbac-proxy/v0.5.0/Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions kube-rbac-proxy/v0.5.0/Makefile

This file was deleted.

32 changes: 0 additions & 32 deletions kube-rbac-proxy/v0.8.0/Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions kube-rbac-proxy/v0.8.0/Makefile

This file was deleted.

3 changes: 1 addition & 2 deletions kube-state-metrics/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
ARG UPSTREAM_VERSION
ARG UBI_IMAGE=registry.access.redhat.com/ubi8/ubi:8.6

## Use original image to copy files from
## ref: https://github.com/kubernetes/kube-state-metrics/blob/v${UPSTREAM_VERSION}/Dockerfile
FROM public.ecr.aws/sumologic/kube-state-metrics:v${UPSTREAM_VERSION} as builder

## Build RedHat compliant image
FROM ${UBI_IMAGE}
FROM registry.access.redhat.com/ubi9/ubi:9.4
ARG UPSTREAM_VERSION
ARG RELEASE

Expand Down
1 change: 0 additions & 1 deletion kube-state-metrics/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/make -f

VERSION_PREFIX := "v"
IMAGE_NAME := "kube-state-metrics"

include ../Makefile.common
Loading

0 comments on commit 7560f11

Please sign in to comment.