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

feat (jkube-kit/resource) : Adds condition to HelmDependency #2353

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Usage:
./scripts/extract-changelog-for-version.sh 1.3.37 5
```
### 1.14-SNAPSHOT
* Fix #2353: Add condition and alias to HelmDependency model
* Fix #1713: Add HelidonHealthCheckEnricher to add Kubernetes health checks for Helidon applications
* Fix #1714: Add HelidonGenerator to add opinionated container image for Helidon applications
* Fix #1929: Docker Image Name parsing fix
Expand Down
6 changes: 6 additions & 0 deletions jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ Defaults to empty string.
| *repository*
| URL pointing to a chart repository.

| *condition*
| Optional reference to a boolean value that toggles the inclusion of the dependency. IE `subchart.enabled`. For more information see helm https://helm.sh/docs/topics/charts/#tags-and-condition-fields-in-dependencies[documentation].

| *alias*
| Optional reference to the map that will be passed as the value scope for the subchart. For more information see helm https://helm.sh/docs/topics/charts/#alias-field-in-dependencies[documentation].

|===

[[helm-parameters]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,10 @@ public class HelmDependency {
@JsonProperty
private String repository;

@JsonProperty
private String condition;

@JsonProperty
private String alias;

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ void equalsAndHashCodeTest() {
.name("name")
.repository("repository")
.version("version")
.alias("alias")
.condition("is.enabled")
.build();

HelmDependency sameHelmDependency = HelmDependency
.builder()
.name("name")
.alias("alias")
.condition("is.enabled")
.repository("repository")
.version("version")
.build();
Expand All @@ -59,6 +63,7 @@ void emptyConstructorTest() {
assertThat(helmDependency)
.hasFieldOrPropertyWithValue("name", "name")
.hasFieldOrPropertyWithValue("repository", "repository")
.hasFieldOrPropertyWithValue("version", "version");
.hasFieldOrPropertyWithValue("version", "version")
.hasNoNullFieldsOrPropertiesExcept("alias", "condition");
}
}