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

Container image build args can be overridden following their order of precedence #3000

Open
2 tasks
rohanKanojia opened this issue Apr 30, 2024 · 1 comment
Open
2 tasks

Comments

@rohanKanojia
Copy link
Member

rohanKanojia commented Apr 30, 2024

Component

JKube Kit

Description

Originally discussed in #2994 (comment)

Currently, JKube tries to discover Docker Build Args from the following sources:

  • Build Args specified directly in ImageConfiguration
  • Build Args specified via System Properties
  • Build Args specified via Project Properties
  • Build Args specified via Plugin configuration
  • Docker Proxy Build Args detected from ~/.docker/config.json

At the moment BuildArgResolverUtil (introduced in #2994) throws an exception if the same keys are provided from different sources (mentioned above).

User's might want to override some of these build args on a single execution (for example while performing a single build from the command line).
To be able to allow for this, the behavior needs to be changed so that instead of throwing an exception in case of key collision, a warning is logged.

The proper order of precedence should be documented (and tested) too.

Acceptance Criteria

  • A warning is logged in case of same keys provided via different methods.
  • Precedence is documented in project documentation.
@rohanKanojia rohanKanojia changed the title BuildArgResolverUtil : Remove usage of com.google.common.collect.ImmutableMap BuildArgResolverUtil : Allow overriding build args from various sources Apr 30, 2024
@manusa manusa closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
@rohanKanojia
Copy link
Member Author

@manusa : We still need to change logic to allow overriding of build args. Current behavior in #2994 is to throw exception on if build args with same keys are provided.

@manusa manusa reopened this Apr 30, 2024
@manusa manusa changed the title BuildArgResolverUtil : Allow overriding build args from various sources Container image build args can be overridden following their precedence Apr 30, 2024
@manusa manusa changed the title Container image build args can be overridden following their precedence Container image build args can be overridden following their order of precedence Apr 30, 2024
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

No branches or pull requests

2 participants