generated from quarkiverse/quarkiverse-template
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Treat empty runtime namespaces as All Namespaces mode (#658)
If the runtime configuration specifies an empty string as the namespaces to watch, we should treat that as all namespaces mode, mainly because that's how OLM signifies that an operator should watch all namespaces. An empty string is treated the same as unset by the configuration parser, so we need to set a default on the field so we can explicitly check for it being unset, to determine if the empty string was used. Fixes #656 Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
- Loading branch information
Showing
4 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
core/runtime/src/main/java/io/quarkiverse/operatorsdk/runtime/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package io.quarkiverse.operatorsdk.runtime; | ||
|
||
import java.util.Collections; | ||
import java.util.Set; | ||
|
||
public final class Constants { | ||
private Constants() { | ||
} | ||
|
||
public static final Set<String> QOSDK_USE_BUILDTIME_NAMESPACES_SET = Collections | ||
.singleton(Constants.QOSDK_USE_BUILDTIME_NAMESPACES); | ||
|
||
public static final String QOSDK_USE_BUILDTIME_NAMESPACES = "QOSDK_USE_BUILDTIME_NAMESPACES"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters