eclipse-jkube / jkube

Build and Deploy java applications on Kubernetes
https://www.eclipse.dev/jkube/
Eclipse Public License 2.0
775 stars 521 forks source link

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

Open rohanKanojia opened 6 months ago

rohanKanojia commented 6 months ago

Component

JKube Kit

Description

_Originally discussed in https://github.com/eclipse-jkube/jkube/pull/2994#discussion_r1584135590_

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

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

rohanKanojia commented 6 months ago

@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.

clarenced commented 2 months ago

Hi @rohanKanojia , do you still need help on this issue ?

rohanKanojia commented 2 months ago

@clarenced : Sorry for the late reply, yes it would be nice to get this issue addressed. However, I'm not sure if it's clear enough for you to pick up. I'll check and get back to you.

clarenced commented 2 months ago

@rohanKanojia I look at it this weekend and come later if have further questions :)

rohanKanojia commented 2 months ago

@clarenced : Have you already started working on it?

clarenced commented 2 months ago

@rohanKanojia Not yet, I just read the discussions to have an idea.