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 default value for CustomPlatform #804

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

BarDweller
Copy link
Contributor

CustomPlatform doesn't work quite like the other Kaniko options.

Internally it must always have a value, normally achieved by this bit of code..
https://github.com/GoogleContainerTools/kaniko/blob/3589382378b89f6868623efdeb33da338195526e/cmd/warmer/cmd/root.go#L91-L97

The extender seems to bypass that code, leading to that option not having a value at runtime, which leads to failures if any Dockerfile parsed by the extender tries to pull a new image (eg, if it tries to use FROM to reference a new image).

time="2022-02-17T18:34:55Z" level=info msg="Retrieving image manifest redhat/ubi8-minimal:latest"
time="2022-02-17T18:34:55Z" level=info msg="Retrieving image redhat/ubi8-minimal:latest from registry index.docker.io"
time="2022-02-17T18:34:55Z" level=error msg="Error parsing the serverURL" error="docker-credential-ecr-login can only be used with Amazon Elastic Container Registry." serverURL=index.docker.io
ERROR: no child with platform  in index redhat/ubi8-minimal:latest

Note the empty platform name between 'with platform' and 'in index'.

This PR sets the CustomPlatform to have the same default as the kaniko code above has.

This does not address if CustomPlatform should be exposed by the extender, it merely ensures the default platform is set appropriately.,

@BarDweller BarDweller requested a review from a team as a code owner February 22, 2022 14:45
@BarDweller BarDweller mentioned this pull request Feb 22, 2022
@natalieparellano natalieparellano merged commit 9b34d15 into buildpacks:extender-lib Feb 22, 2022
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.

3 participants