Skip to content

Commit 0cb694a

Browse files
committed
fix: grafana integration fail when SGCONFIG_NAMESPACE is not set
1 parent da71789 commit 0cb694a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

stackgres-k8s/src/operator/src/main/java/io/stackgres/operator/conciliation/factory/config/webconsole/WebConsoleGrafanaIntegrationJob.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
public class WebConsoleGrafanaIntegrationJob
5555
implements ResourceGenerator<StackGresConfigContext> {
5656

57+
private final String sgConfigNamespace = OperatorProperty.SGCONFIG_NAMESPACE.get()
58+
.orElseGet(OperatorProperty.OPERATOR_NAMESPACE::getString);
59+
5760
private final LabelFactoryForConfig labelFactory;
5861
private final KubectlUtil kubectl;
5962
private final WebConsolePodSecurityFactory webConsolePodSecurityContext;
@@ -215,8 +218,7 @@ public WebConsoleGrafanaIntegrationJob(
215218
.withEnv(
216219
new EnvVarBuilder()
217220
.withName("SGCONFIG_NAMESPACE")
218-
.withValue(OperatorProperty.SGCONFIG_NAMESPACE.get()
219-
.orElseGet(OperatorProperty.OPERATOR_NAMESPACE::getString))
221+
.withValue(sgConfigNamespace)
220222
.build(),
221223
new EnvVarBuilder()
222224
.withName("OPERATOR_NAME")

0 commit comments

Comments
 (0)