Skip to content
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

Add Red Hat UBI base image for imps-refresher image #32

Merged
merged 1 commit into from Apr 12, 2023
Merged

Add Red Hat UBI base image for imps-refresher image #32

merged 1 commit into from Apr 12, 2023

Conversation

vhosakot
Copy link
Contributor

@vhosakot vhosakot commented Apr 10, 2023

Q A
Bug fix? no
New feature? no
API breaks? no
Deprecations? no
Related tickets none
License Apache 2.0

What's in this PR?

imagepullsecrets-refresher container is installed by the smm-operator helm chart and Red Hat certification of Cisco's Calisti 1.12 on OpenShift requires all images installed by the smm-operator helm chart to have Red Hat UBI (Universal Base Image) as the base image and the /licenses directory. So, adding them for imagepullsecrets-refresher image and updated .github/workflows/docker_refresher.yml to build a new imagepullsecrets-refresher image with UBI base image.

Why?

Needed for Red Hat certification of Cisco's Calisti 1.12 on OpenShift.

Additional context

Checklist

Test results:

docker build . --build-arg FROM_IMAGE=redhat/ubi8-micro  -f Dockerfile-refresher -t testtag/smm/imagepullsecrets-refresher:rh-ubi8

$ docker images
REPOSITORY                               TAG       IMAGE ID       CREATED          SIZE
testtag/smm/imagepullsecrets-refresher   rh-ubi8   ca3be1077a2d   24 seconds ago   75.6MB

# image has Red Hat UBI base image
$ docker inspect ca3be1077a2d | grep -i ubi
            "testtag/smm/imagepullsecrets-refresher:rh-ubi8"
                "com.redhat.component": "ubi8-micro-container",
                "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI",
                "io.k8s.display-name": "Ubi8-micro",
                "name": "ubi8/ubi-micro",
                "summary": "ubi8 micro image",
                "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8/ubi-micro/images/8.7-8",

# image has /licenses directory with the license
$ docker run --rm -it --entrypoint="/bin/sh" testtag/smm/imagepullsecrets-refresher:rh-ubi8
sh-4.4$ ls -l /licenses/LICENSE.md 
-rw-r--r-- 1 root root 11357 Apr 10 17:03 /licenses/LICENSE.md
sh-4.4$ cat /licenses/LICENSE.md 
sh-4.4$ exit

push: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
build-args: |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs about build-args: in GitHub action for docker build:

tiswanso
tiswanso previously approved these changes Apr 10, 2023
@tiswanso
Copy link

CI licensei error: might need to use v0.8.0 of licensei-- https://github.com/goph/licensei/releases/tag/v0.8.0

currently, the Makefile is using 0.7.0

Signed-off-by: Vikram Hosakote <vhosakot@cisco.com>
@vhosakot vhosakot dismissed stale reviews from shanchunyang0919 and tiswanso via fc89b50 April 10, 2023 18:48
@@ -67,7 +67,7 @@ jobs:
- name: Check dependency licenses
env:
GITHUB_TOKEN: ${{ github.token }} # Note: this is required for licensei auth in steps to avoid rate-limiting.
run: make license-check
run: go mod vendor && make license-check
Copy link
Contributor Author

@vhosakot vhosakot Apr 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vendoring in deps in CI before checking their licenses per banzaicloud/koperator#853 (comment) to resolve spurious license errors in CI when contacting github.com, thanks to @panyuenlau for this tip.

@vhosakot
Copy link
Contributor Author

CI licensei error: might need to use v0.8.0 of licensei-- https://github.com/goph/licensei/releases/tag/v0.8.0

currently, the Makefile is using 0.7.0

thanks, vendoring in the deps fixed the error in CI, more info is in #32 (comment)

Copy link

@tiswanso tiswanso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vhosakot
Copy link
Contributor Author

@Laci21, @waynz0r, can I get this PR merged please if it looks good, thanks.

@Laci21 Laci21 merged commit f230b29 into banzaicloud:main Apr 12, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants