File tree Expand file tree Collapse file tree 4 files changed +59
-5
lines changed
deployment/src/main/java/io/quarkiverse/operatorsdk/deployment/helm
runtime/src/main/java/io/quarkiverse/operatorsdk/runtime
docs/modules/ROOT/pages/includes Expand file tree Collapse file tree 4 files changed +59
-5
lines changed Original file line number Diff line number Diff line change 28
28
import io .quarkiverse .operatorsdk .deployment .GeneratedCRDInfoBuildItem ;
29
29
import io .quarkiverse .operatorsdk .deployment .RoleBindings ;
30
30
import io .quarkiverse .operatorsdk .deployment .helm .model .Chart ;
31
+ import io .quarkiverse .operatorsdk .runtime .BuildTimeOperatorConfiguration ;
31
32
import io .quarkus .deployment .annotations .BuildStep ;
32
33
import io .quarkus .deployment .annotations .BuildSteps ;
33
34
import io .quarkus .deployment .annotations .Produce ;
@@ -64,8 +65,12 @@ public class HelmChartProcessor {
64
65
public static final String ADDITIONAL_CRD_ROLE_BINDING_YAML = "additional-crd-role-binding.yaml" ;
65
66
66
67
@ BuildStep
67
- HelmTargetDirectoryBuildItem createRelatedDirectories (OutputTargetBuildItem outputTarget ) {
68
- final var helmDir = outputTarget .getOutputDirectory ().resolve ("helm" ).toFile ();
68
+ HelmTargetDirectoryBuildItem createRelatedDirectories (BuildTimeOperatorConfiguration config ,
69
+ OutputTargetBuildItem outputTarget ) {
70
+ final var helmDir = outputTarget .getOutputDirectory ()
71
+ .resolve ("helm" )
72
+ .resolve (config .helm ().name ().orElse ("" ))
73
+ .toFile ();
69
74
log .infov ("Generating helm chart to {0}" , helmDir );
70
75
FileUtils .ensureDirectoryExists (helmDir );
71
76
FileUtils .ensureDirectoryExists (new File (helmDir , TEMPLATES_DIR ));
Original file line number Diff line number Diff line change 1
1
package io .quarkiverse .operatorsdk .runtime ;
2
2
3
+ import java .util .Optional ;
4
+
3
5
import io .quarkus .runtime .annotations .ConfigGroup ;
4
6
import io .smallrye .config .WithDefault ;
5
7
6
8
@ ConfigGroup
7
9
public interface HelmConfiguration {
8
10
9
11
/**
10
- * Can be used to disable helm chart generation.
12
+ * Can be used to disable Helm chart generation.
11
13
*/
12
14
@ WithDefault ("false" )
13
15
Boolean enabled ();
14
16
17
+ /**
18
+ * Specifies the name of the generated Helm chart. This will generate the Helm chart in {@code target/helm/<name>} instead
19
+ * of {@code target/helm} directly, if specified.
20
+ */
21
+ Optional <String > name ();
15
22
}
Original file line number Diff line number Diff line change @@ -424,7 +424,7 @@ endif::add-copy-button-to-config-props[]
424
424
425
425
[.description]
426
426
--
427
- Can be used to disable helm chart generation.
427
+ Can be used to disable Helm chart generation.
428
428
429
429
430
430
ifdef::add-copy-button-to-env-var[]
@@ -437,6 +437,27 @@ endif::add-copy-button-to-env-var[]
437
437
|boolean
438
438
|`false`
439
439
440
+ a|icon:lock[title=Fixed at build time] [[quarkus-operator-sdk_quarkus-operator-sdk-helm-name]] [.property-path]##link:#quarkus-operator-sdk_quarkus-operator-sdk-helm-name[`quarkus.operator-sdk.helm.name`]##
441
+ ifdef::add-copy-button-to-config-props[]
442
+ config_property_copy_button:+++quarkus.operator-sdk.helm.name+++[]
443
+ endif::add-copy-button-to-config-props[]
444
+
445
+
446
+ [.description]
447
+ --
448
+ Specifies the name of the generated Helm chart. This will generate the Helm chart in `target/helm/<name>` instead of `target/helm` directly, if specified.
449
+
450
+
451
+ ifdef::add-copy-button-to-env-var[]
452
+ Environment variable: env_var_with_copy_button:+++QUARKUS_OPERATOR_SDK_HELM_NAME+++[]
453
+ endif::add-copy-button-to-env-var[]
454
+ ifndef::add-copy-button-to-env-var[]
455
+ Environment variable: `+++QUARKUS_OPERATOR_SDK_HELM_NAME+++`
456
+ endif::add-copy-button-to-env-var[]
457
+ --
458
+ |string
459
+ |
460
+
440
461
a| [[quarkus-operator-sdk_quarkus-operator-sdk-concurrent-reconciliation-threads]] [.property-path]##link:#quarkus-operator-sdk_quarkus-operator-sdk-concurrent-reconciliation-threads[`quarkus.operator-sdk.concurrent-reconciliation-threads`]##
441
462
ifdef::add-copy-button-to-config-props[]
442
463
config_property_copy_button:+++quarkus.operator-sdk.concurrent-reconciliation-threads+++[]
Original file line number Diff line number Diff line change @@ -424,7 +424,7 @@ endif::add-copy-button-to-config-props[]
424
424
425
425
[.description]
426
426
--
427
- Can be used to disable helm chart generation.
427
+ Can be used to disable Helm chart generation.
428
428
429
429
430
430
ifdef::add-copy-button-to-env-var[]
@@ -437,6 +437,27 @@ endif::add-copy-button-to-env-var[]
437
437
|boolean
438
438
|`false`
439
439
440
+ a|icon:lock[title=Fixed at build time] [[quarkus-operator-sdk_quarkus-operator-sdk-helm-name]] [.property-path]##link:#quarkus-operator-sdk_quarkus-operator-sdk-helm-name[`quarkus.operator-sdk.helm.name`]##
441
+ ifdef::add-copy-button-to-config-props[]
442
+ config_property_copy_button:+++quarkus.operator-sdk.helm.name+++[]
443
+ endif::add-copy-button-to-config-props[]
444
+
445
+
446
+ [.description]
447
+ --
448
+ Specifies the name of the generated Helm chart. This will generate the Helm chart in `target/helm/<name>` instead of `target/helm` directly, if specified.
449
+
450
+
451
+ ifdef::add-copy-button-to-env-var[]
452
+ Environment variable: env_var_with_copy_button:+++QUARKUS_OPERATOR_SDK_HELM_NAME+++[]
453
+ endif::add-copy-button-to-env-var[]
454
+ ifndef::add-copy-button-to-env-var[]
455
+ Environment variable: `+++QUARKUS_OPERATOR_SDK_HELM_NAME+++`
456
+ endif::add-copy-button-to-env-var[]
457
+ --
458
+ |string
459
+ |
460
+
440
461
a| [[quarkus-operator-sdk_quarkus-operator-sdk-concurrent-reconciliation-threads]] [.property-path]##link:#quarkus-operator-sdk_quarkus-operator-sdk-concurrent-reconciliation-threads[`quarkus.operator-sdk.concurrent-reconciliation-threads`]##
441
462
ifdef::add-copy-button-to-config-props[]
442
463
config_property_copy_button:+++quarkus.operator-sdk.concurrent-reconciliation-threads+++[]
You can’t perform that action at this time.
0 commit comments