-
Notifications
You must be signed in to change notification settings - Fork 104
oc-mirror configurability #775
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| acrRegistryName: "" | ||
| stableVersions: "" | ||
|
|
||
| azureClientId: "" | ||
| azureTenantId: "" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 AS downloader | ||
| FROM --platform=linux/amd64 mcr.microsoft.com/cbl-mariner/base/core:2.0 AS downloader | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to specify platform here? Should the container infer it depending on the platform you run on? |
||
|
|
||
| RUN set -eux; \ | ||
| # Upgrade all packages per https://eng.ms/docs/more/containers-secure-supply-chain/updating | ||
| tdnf update -y; \ | ||
| tdnf -y install unzip wget tar ca-certificates; \ | ||
| tdnf -y install unzip wget tar ca-certificates; \ | ||
| tdnf clean all | ||
|
|
||
| ENV OC_VERSION=4.16.3 | ||
|
|
@@ -17,19 +17,22 @@ RUN curl -sfL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OC_VER | |
| tar -zvxf oc-mirror.tar.gz && \ | ||
| mv oc-mirror /usr/local/bin | ||
|
|
||
| FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 | ||
| FROM --platform=linux/amd64 mcr.microsoft.com/cbl-mariner/base/core:2.0 | ||
|
|
||
| RUN mkdir --mode=777 /workspace; \ | ||
| mkdir --mode=777 /config; \ | ||
| tdnf update -y; \ | ||
| tdnf -y install ca-certificates; \ | ||
| tdnf clean all | ||
|
|
||
| WORKDIR /workspace | ||
|
|
||
| ADD mirror.sh /usr/local/bin/mirror.sh | ||
|
|
||
| COPY --chown=0:0 --chmod=755 --from=downloader \ | ||
| /usr/local/bin/oc-mirror \ | ||
| /usr/local/bin/oc \ | ||
| /usr/local/bin/kubectl \ | ||
| /usr/local/bin/ | ||
|
|
||
| ENTRYPOINT ["oc-mirror", "--continue-on-error", "--config", "/etc/oc-mirror/imageset-config.yml"] | ||
| ENTRYPOINT ["/usr/local/bin/mirror.sh"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,6 @@ 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} . | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docs say "podman" can we update |
||
|
|
||
| push: image | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| kind: ImageSetConfiguration | ||
| apiVersion: mirror.openshift.io/v1alpha2 | ||
| storageConfig: | ||
| registry: | ||
| imageURL: {{ .RegistryUrl }}/mirror/oc-mirror-metadata | ||
| skipTLS: false | ||
| mirror: | ||
| platform: | ||
| architectures: | ||
| - multi | ||
| - amd64 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need amd64 images still, or can we switch everything to multi yet? |
||
| channels: | ||
| {{- range .StableVersions }} | ||
| - name: stable-{{ . }} | ||
| type: ocp | ||
| full: true | ||
| {{- end }} | ||
| graph: true | ||
| additionalImages: | ||
| {{- range .StableVersions }} | ||
| - name: registry.redhat.io/redhat/redhat-operator-index:v{{ . }} | ||
| - name: registry.redhat.io/redhat/certified-operator-index:v{{ . }} | ||
| - name: registry.redhat.io/redhat/community-operator-index:v{{ . }} | ||
| - name: registry.redhat.io/redhat/redhat-marketplace-index:v{{ . }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/sh | ||
|
|
||
| echo ${IMAGE_SET_CONFIG} | base64 -d /config/imageset-config.yml | ||
| /usr/local/bin/oc-mirror --continue-on-error --config /config/imageset-config.yml docker://${REGISTRY_URL} @$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a param?