Skip to content

Commit 2f62605

Browse files
committed
Remove CrunchyData packages from PGO controller image
This update allows the PGO controller image to be built without CrunchyData specific RPMs. All existing make targets continue to function in the same way as before, but the PGO controller image no longer utilizes the base image. The base image is still used by the Crunchy Postgres Exporter image. Issue: [sc-14268]
1 parent 9df6ce9 commit 2f62605

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

Makefile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,31 @@ build-crunchy-postgres-exporter:
131131
$(PGOROOT)/build/%/Dockerfile:
132132
$(error No Dockerfile found for $* naming pattern: [$@])
133133

134-
%-img-build: pgo-base-$(IMGBUILDER) build-% $(PGOROOT)/build/%/Dockerfile
134+
crunchy-postgres-exporter-img-build: pgo-base-$(IMGBUILDER) build-crunchy-postgres-exporter $(PGOROOT)/build/crunchy-postgres-exporter/Dockerfile
135135
$(IMGCMDSTEM) \
136-
-f $(PGOROOT)/build/$*/Dockerfile \
137-
-t $(PGO_IMAGE_PREFIX)/$*:$(PGO_IMAGE_TAG) \
136+
-f $(PGOROOT)/build/crunchy-postgres-exporter/Dockerfile \
137+
-t $(PGO_IMAGE_PREFIX)/crunchy-postgres-exporter:$(PGO_IMAGE_TAG) \
138138
--build-arg BASEOS=$(PGO_BASEOS) \
139139
--build-arg BASEVER=$(PGO_VERSION) \
140140
--build-arg PACKAGER=$(PACKAGER) \
141141
--build-arg PGVERSION=$(PGO_PG_VERSION) \
142142
--build-arg PREFIX=$(PGO_IMAGE_PREFIX) \
143143
$(PGOROOT)
144144

145+
postgres-operator-img-build: build-postgres-operator $(PGOROOT)/build/postgres-operator/Dockerfile
146+
$(IMGCMDSTEM) \
147+
-f $(PGOROOT)/build/postgres-operator/Dockerfile \
148+
-t $(PGO_IMAGE_PREFIX)/postgres-operator:$(PGO_IMAGE_TAG) \
149+
--build-arg BASE_IMAGE_OS=$(BASE_IMAGE_OS) \
150+
--build-arg PACKAGER=$(PACKAGER) \
151+
--build-arg PGVERSION=$(PGO_PG_VERSION) \
152+
--build-arg RELVER=$(PGO_VERSION) \
153+
--build-arg DOCKERBASEREGISTRY=$(DOCKERBASEREGISTRY) \
154+
--build-arg PACKAGER=$(PACKAGER) \
155+
--build-arg PG_FULL=$(PGO_PG_FULLVERSION) \
156+
--build-arg PGVERSION=$(PGO_PG_VERSION) \
157+
$(PGOROOT)
158+
145159
%-img-buildah: %-img-build ;
146160
# only push to docker daemon if variable PGO_PUSH_TO_DOCKER_DAEMON is set to "true"
147161
ifeq ("$(IMG_PUSH_TO_DOCKER_DAEMON)", "true")

build/postgres-operator/Dockerfile

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
1-
ARG BASEOS
2-
ARG BASEVER
3-
ARG PREFIX
4-
FROM ${PREFIX}/pgo-base:${BASEOS}-${BASEVER}
1+
ARG BASE_IMAGE_OS
2+
ARG DOCKERBASEREGISTRY
3+
FROM ${DOCKERBASEREGISTRY}${BASE_IMAGE_OS}
54

6-
LABEL name="postgres-operator" \
5+
ARG PGVERSION
6+
ARG PG_FULL
7+
ARG PACKAGER
8+
ARG RELVER
9+
10+
11+
12+
LABEL vendor="Crunchy Data" \
13+
url="https://crunchydata.com" \
14+
release="${RELVER}" \
15+
postgresql.version.major="${PGVERSION}" \
16+
postgresql.version="${PG_FULL}" \
17+
org.opencontainers.image.vendor="Crunchy Data" \
18+
io.openshift.tags="postgresql,postgres,sql,nosql,crunchy" \
19+
io.k8s.description="Trusted open source PostgreSQL-as-a-Service" \
20+
name="postgres-operator" \
721
summary="Crunchy PostgreSQL Operator" \
822
description="Crunchy PostgreSQL Operator"
923

24+
COPY licenses /licenses
25+
26+
RUN ${PACKAGER} -y update && ${PACKAGER} -y clean all
27+
1028
ADD bin/postgres-operator /usr/local/bin
1129

1230
USER 2

0 commit comments

Comments
 (0)