Add default value for CustomPlatform #804
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).
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.,