Skip to content

Commit

Permalink
Change Container builds
Browse files Browse the repository at this point in the history
Add the configuration to this repo and reference it in the Dockerfile, thus add it to the image
  • Loading branch information
janboll committed Oct 23, 2024
1 parent 6db562c commit 62a464c
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 1 deletion.
9 changes: 9 additions & 0 deletions image-sync/configuration/mvp-image-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repositories:
- registry.k8s.io/external-dns/external-dns
- quay.io/acm-d/rhtap-hypershift-operator
- quay.io/pstefans/controlplaneoperator
- quay.io/app-sre/uhc-clusters-service
numberOfTags: 10
quaySecretfile: /etc/containers/quayio-auth.json
acrRegistry: arohcpdev.azurecr.io
tenantId: 64dc69e4-d083-49fc-9569-ebece1dd1408
30 changes: 30 additions & 0 deletions image-sync/configuration/mvp-oc-mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
registry:
imageURL: arohcpdev.azurecr.io/mirror/oc-mirror-metadata
skipTLS: false
mirror:
platform:
architectures:
- multi
- amd64
channels:
- name: stable-4.16
minVersion: 4.16.0
maxVersion: 4.16.3
type: ocp
- name: stable-4.17
minVersion: 4.17.0
maxVersion: 4.17.0
type: ocp
graph: true
additionalImages:
- name: registry.redhat.io/redhat/redhat-operator-index:v4.16
- name: registry.redhat.io/redhat/certified-operator-index:v4.16
- name: registry.redhat.io/redhat/community-operator-index:v4.16
- name: registry.redhat.io/redhat/redhat-marketplace-index:v4.16
- name: registry.redhat.io/redhat/redhat-operator-index:v4.17
- name: registry.redhat.io/redhat/certified-operator-index:v4.17
- name: registry.redhat.io/redhat/community-operator-index:v4.17
- name: registry.redhat.io/redhat/redhat-marketplace-index:v4.17
2 changes: 2 additions & 0 deletions image-sync/oc-mirror/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ COPY --chown=0:0 --chmod=755 --from=downloader \
/usr/local/bin/oc \
/usr/local/bin/kubectl \
/usr/local/bin/

ENTRYPOINT ["oc-mirror", "--continue-on-error", "--config", "/etc/oc-mirror/imageset-config.yml"]
1 change: 1 addition & 0 deletions image-sync/oc-mirror/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ OC_MIRROR_IMAGE_TAGGED ?= $(OC_MIRROR_IMAGE):$(COMMIT)
build-push: image push

image:
cp ../configuration/mvp-oc-mirror.yml config.yml
docker build --platform="linux/amd64" -f "./Dockerfile" -t ${OC_MIRROR_IMAGE_TAGGED} .

push: image
Expand Down
30 changes: 30 additions & 0 deletions image-sync/oc-mirror/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
registry:
imageURL: arohcpdev.azurecr.io/mirror/oc-mirror-metadata
skipTLS: false
mirror:
platform:
architectures:
- multi
- amd64
channels:
- name: stable-4.16
minVersion: 4.16.0
maxVersion: 4.16.3
type: ocp
- name: stable-4.17
minVersion: 4.17.0
maxVersion: 4.17.0
type: ocp
graph: true
additionalImages:
- name: registry.redhat.io/redhat/redhat-operator-index:v4.16
- name: registry.redhat.io/redhat/certified-operator-index:v4.16
- name: registry.redhat.io/redhat/community-operator-index:v4.16
- name: registry.redhat.io/redhat/redhat-marketplace-index:v4.16
- name: registry.redhat.io/redhat/redhat-operator-index:v4.17
- name: registry.redhat.io/redhat/certified-operator-index:v4.17
- name: registry.redhat.io/redhat/community-operator-index:v4.17
- name: registry.redhat.io/redhat/redhat-marketplace-index:v4.17
3 changes: 2 additions & 1 deletion tooling/image-sync/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ RUN CGO_ENABLED=1 go build -tags=containers_image_openpgp,requirefips .
FROM --platform=${TARGETPLATFORM:-linux/amd64} mcr.microsoft.com/cbl-mariner/distroless/base:2.0-nonroot@sha256:ef0dc582fc2a8dd34fbb41341a3a9a1aaa70d4542ff04ce4e33a641e52e4807e
WORKDIR /

ADD config.yml /app/config.yml
COPY --from=builder /app/image-sync .
ENTRYPOINT ["/image-sync"]
CMD ["/image-sync", "-c", "/app/config.yml"]
1 change: 1 addition & 0 deletions tooling/image-sync/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ clean:
build-push: image push

image:
cp ../../image-sync/configuration/mvp-image-sync.yml config.yml
docker build --platform="linux/amd64" -f "./Dockerfile" -t ${ARO_HCP_IMAGE_SYNC_IMAGE}:${COMMIT} .

push:
Expand Down
9 changes: 9 additions & 0 deletions tooling/image-sync/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repositories:
- registry.k8s.io/external-dns/external-dns
- quay.io/acm-d/rhtap-hypershift-operator
- quay.io/pstefans/controlplaneoperator
- quay.io/app-sre/uhc-clusters-service
numberOfTags: 10
quaySecretfile: /etc/containers/quayio-auth.json
acrRegistry: arohcpdev.azurecr.io
tenantId: 64dc69e4-d083-49fc-9569-ebece1dd1408

0 comments on commit 62a464c

Please sign in to comment.