quarkiverse / quarkus-operator-sdk

Quarkus Extension to create Kubernetes Operators in Java using the Java Operator SDK (https://github.com/java-operator-sdk/java-operator-sdk) project
Apache License 2.0
119 stars 50 forks source link

Watch environment variables are generated incorrectly in OLM bundle #855

Closed jcechace closed 6 months ago

jcechace commented 6 months ago

The following duplicity gets generated in OLM CSV

              containers:
              - env:
                - name: KUBERNETES_NAMESPACE
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.namespace
                - name: QUARKUS_OPERATOR_SDK_CONTROLLERS_DEBEZIUMSERVER_NAMESPACES
                  value: "{watchNamespaces}"
                - name: QUARKUS_OPERATOR_SDK_CONTROLLERS_DEBEZIUMSERVER_NAMESPACES
                  valueFrom:
                    fieldRef:
                      fieldPath: "metadata.annotations['olm.targetNamespaces']"

The problem exists at minimum since 6.6.3

metacosm commented 6 months ago

Please check the associated PR and let me if this fixes your issue.