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

BaseGenerator: Verify & Align configuration options work to with properties #1489

Closed
rohanKanojia opened this issue May 6, 2022 · 1 comment · Fixed by #1491
Closed

BaseGenerator: Verify & Align configuration options work to with properties #1489

rohanKanojia opened this issue May 6, 2022 · 1 comment · Fixed by #1491
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rohanKanojia
Copy link
Member

Description

Related to #1462

BaseGenerator seems to have some common configuration options which are applicable to all generators:

https://github.com/eclipse/jkube/blob/0401297d4bcea783a94fc178af376c7a8a5a185d/jkube-kit/generator/api/src/main/java/org/eclipse/jkube/generator/api/support/BaseGenerator.java#L59-L79

Since these are generator configuration fields, they should be accessible via regular generator configuration properties i.e jkube.generator.$generatorName.name.

However, these fields are also accessible via these properties:

  • name jkube.generator.name
  • alias jkube.generator.alias
  • from jkube.generator.from
  • fromMode jkube.generator.fromMode
  • registry jkube.generator.registry

This is due to a method getConfigWithFallback which checks system and project properties with given key for config field value:

https://github.com/eclipse/jkube/blob/0401297d4bcea783a94fc178af376c7a8a5a185d/jkube-kit/generator/api/src/main/java/org/eclipse/jkube/generator/api/support/BaseGenerator.java#L185

There is one field add which doesn't seem to be accessible via this method. We need to decide whether we want to align it with rest of the options or remove these additional properties.

@manusa
Copy link
Member

manusa commented May 6, 2022

This should be applicable too for the new tags config option, unless it gets directly addressed in #1462 (not at the moment).

@rohanKanojia rohanKanojia self-assigned this May 9, 2022
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue May 9, 2022
…ork with `jkube.generator.*` properties (eclipse-jkube#1489)

BaseGenerator `add` and `tags` options also available with
`jkube.generator.add` and `jkube.generator.tags` properties
respectively.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
manusa pushed a commit to rohanKanojia/jkube that referenced this issue May 13, 2022
…ork with `jkube.generator.*` properties (eclipse-jkube#1489)

BaseGenerator `add` and `tags` options also available with
`jkube.generator.add` and `jkube.generator.tags` properties
respectively.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
manusa pushed a commit that referenced this issue May 13, 2022
…ork with `jkube.generator.*` properties (#1489)

BaseGenerator `add` and `tags` options also available with
`jkube.generator.add` and `jkube.generator.tags` properties
respectively.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants