From e82197221b8bc1f1b3081b265ab0c305ac29d682 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Mon, 25 Nov 2024 18:50:38 +0100 Subject: [PATCH] doc: clarify that CRDs are never applied in prod mode Signed-off-by: Chris Laprun --- .../operatorsdk/runtime/CRDConfiguration.java | 15 +++++++++------ .../ROOT/pages/includes/quarkus-operator-sdk.adoc | 10 ++++++---- ...quarkus-operator-sdk_quarkus.operator-sdk.adoc | 10 ++++++---- docs/modules/ROOT/pages/index.adoc | 2 +- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/core/runtime/src/main/java/io/quarkiverse/operatorsdk/runtime/CRDConfiguration.java b/core/runtime/src/main/java/io/quarkiverse/operatorsdk/runtime/CRDConfiguration.java index a6477007..b74a6d74 100644 --- a/core/runtime/src/main/java/io/quarkiverse/operatorsdk/runtime/CRDConfiguration.java +++ b/core/runtime/src/main/java/io/quarkiverse/operatorsdk/runtime/CRDConfiguration.java @@ -32,7 +32,10 @@ public interface CRDConfiguration { /** * Whether the extension should automatically apply updated CRDs when they change. - * When running on DEV mode, the CRD changes will always be applied automatically. + *

+ * NOTE that this option only when *not* in Dev mode as applying the CRD to a production cluster could be + * dangerous. + *

*/ Optional apply(); @@ -49,21 +52,21 @@ public interface CRDConfiguration { Optional outputDirectory(); /** - * Whether the extension should generate all CRDs even if some are not tied to a Reconciler. + * Whether the extension should generate all CRDs for Custom Resource implementations known to the application even if some + * are not tied to a Reconciler. */ @WithDefault("false") Boolean generateAll(); /** - * Whether the CRDs should be generated in parallel. Please note that this feature is experimental - * and it may lead to unexpected results. + * Whether the CRDs should be generated in parallel. */ @WithDefault("false") Boolean generateInParallel(); /** - * A comma-separated list of fully-qualified class names implementing custom resources to exclude from the CRD generation - * process. + * A comma-separated list of fully-qualified class names implementing {@link CustomResource} to exclude from the CRD + * generation process. */ Optional> excludeResources(); diff --git a/docs/modules/ROOT/pages/includes/quarkus-operator-sdk.adoc b/docs/modules/ROOT/pages/includes/quarkus-operator-sdk.adoc index 2fffe08d..3e6f4750 100644 --- a/docs/modules/ROOT/pages/includes/quarkus-operator-sdk.adoc +++ b/docs/modules/ROOT/pages/includes/quarkus-operator-sdk.adoc @@ -45,7 +45,9 @@ a|icon:lock[title=Fixed at build time] [[quarkus-operator-sdk_quarkus-operator-s [.description] -- -Whether the extension should automatically apply updated CRDs when they change. When running on DEV mode, the CRD changes will always be applied automatically. +Whether the extension should automatically apply updated CRDs when they change. + +*NOTE that this option only when ++*++not++*++ in Dev mode as applying the CRD to a production cluster could be dangerous.* ifdef::add-copy-button-to-env-var[] @@ -96,7 +98,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-operator-sdk_quarkus-operator-s [.description] -- -Whether the extension should generate all CRDs even if some are not tied to a Reconciler. +Whether the extension should generate all CRDs for Custom Resource implementations known to the application even if some are not tied to a Reconciler. ifdef::add-copy-button-to-env-var[] @@ -113,7 +115,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-operator-sdk_quarkus-operator-s [.description] -- -Whether the CRDs should be generated in parallel. Please note that this feature is experimental and it may lead to unexpected results. +Whether the CRDs should be generated in parallel. ifdef::add-copy-button-to-env-var[] @@ -130,7 +132,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-operator-sdk_quarkus-operator-s [.description] -- -A comma-separated list of fully-qualified class names implementing custom resources to exclude from the CRD generation process. +A comma-separated list of fully-qualified class names implementing `CustomResource` to exclude from the CRD generation process. ifdef::add-copy-button-to-env-var[] diff --git a/docs/modules/ROOT/pages/includes/quarkus-operator-sdk_quarkus.operator-sdk.adoc b/docs/modules/ROOT/pages/includes/quarkus-operator-sdk_quarkus.operator-sdk.adoc index 2fffe08d..3e6f4750 100644 --- a/docs/modules/ROOT/pages/includes/quarkus-operator-sdk_quarkus.operator-sdk.adoc +++ b/docs/modules/ROOT/pages/includes/quarkus-operator-sdk_quarkus.operator-sdk.adoc @@ -45,7 +45,9 @@ a|icon:lock[title=Fixed at build time] [[quarkus-operator-sdk_quarkus-operator-s [.description] -- -Whether the extension should automatically apply updated CRDs when they change. When running on DEV mode, the CRD changes will always be applied automatically. +Whether the extension should automatically apply updated CRDs when they change. + +*NOTE that this option only when ++*++not++*++ in Dev mode as applying the CRD to a production cluster could be dangerous.* ifdef::add-copy-button-to-env-var[] @@ -96,7 +98,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-operator-sdk_quarkus-operator-s [.description] -- -Whether the extension should generate all CRDs even if some are not tied to a Reconciler. +Whether the extension should generate all CRDs for Custom Resource implementations known to the application even if some are not tied to a Reconciler. ifdef::add-copy-button-to-env-var[] @@ -113,7 +115,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-operator-sdk_quarkus-operator-s [.description] -- -Whether the CRDs should be generated in parallel. Please note that this feature is experimental and it may lead to unexpected results. +Whether the CRDs should be generated in parallel. ifdef::add-copy-button-to-env-var[] @@ -130,7 +132,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-operator-sdk_quarkus-operator-s [.description] -- -A comma-separated list of fully-qualified class names implementing custom resources to exclude from the CRD generation process. +A comma-separated list of fully-qualified class names implementing `CustomResource` to exclude from the CRD generation process. ifdef::add-copy-button-to-env-var[] diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index 5a4b9c8b..854bf422 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -18,7 +18,7 @@ Please refer to the https://github.com/quarkiverse/quarkus-operator-sdk/blob/mai * Watches your code for changes and reload automatically your operator if needed without having to hit an endpoint * Only re-generates the CRDs if a change impacting its generation is detected * Only re-processes a reconciler's configuration if needed - * Automatically apply the CRD to the cluster when it has changed + * Automatically apply the CRD to the cluster when it has changed (only in dev mode and during tests, never in production) - Supports micrometer registry extensions (adding a Quarkus-supported micrometer registry extension will automatically inject said registry into the operator) - Automatically adds a SmallRye health check - Sets up reflection for native binary generation