We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b981759 commit 9da4315Copy full SHA for 9da4315
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/MDCUtils.java
@@ -29,7 +29,9 @@ public static void addResourceInfo(HasMetadata resource) {
29
MDC.put(API_VERSION, resource.getApiVersion());
30
MDC.put(KIND, resource.getKind());
31
MDC.put(NAME, resource.getMetadata().getName());
32
- MDC.put(NAMESPACE, resource.getMetadata().getNamespace());
+ if (resource.getMetadata().getNamespace() != null) {
33
+ MDC.put(NAMESPACE, resource.getMetadata().getNamespace());
34
+ }
35
MDC.put(RESOURCE_VERSION, resource.getMetadata().getResourceVersion());
36
if (resource.getMetadata().getGeneration() != null) {
37
MDC.put(GENERATION, resource.getMetadata().getGeneration().toString());
0 commit comments