Skip to content

Latest commit

 

History

History
111 lines (86 loc) · 3.44 KB

File metadata and controls

111 lines (86 loc) · 3.44 KB

cos-fleetshard-operator-debezium

configuration

  • create application config

    kubectl create configmap cos-fleetshard-operator-debezium-config \
        --from-file=../etc/kubernetes/operator-debezium/base/app-config/application.properties
    Important

    the provided application.properties is only a template, copy it somewhere and adapt the command above

  • override some properties

    There is a way to override application properties in environments where cos-fleetshard-sync-config configmap can not be modified (i.e. It can be useful to troubleshoot issues in an addon installations).

    To do so the application mounts a configmap named cos-fleetshard-sync-config-override as optional. If present, this can be used to override application properties. In order to enable it the env var OVERRIDE_PROPERTIES_LOCATION must point where the config map is mounted.

    An example of the configmap:

    apiVersion: v1
    data:
      override.properties: |-
        #
        # quarkus :: log
        #
        quarkus.log.category."org.bf2.cos.fleetshard.sync".level = INFO
        quarkus.log.category."org.bf2.cos.fleetshard.client".level = INFO
        quarkus.log.category."io.fabric8.kubernetes.client.internal.VersionUsageUtils".level = ERROR
    
        # cos.image_pull_secrets_name =

local profile

Start Quarkus in dev mode and read the application configuration from the current namespace.

export KUBERNETES_NAMESPACE=$(oc project -q)
export COS_OPERATOR_ID=${some_value}
export COS_OPERATOR_VERSION==${some_value}

./mvnw -Dlocal
Important

The COS_OPERATOR_ID should be synchronized with the value assigned by the addon bundle. As of this commit, this would be cos-fleetshard-operator-debezium-1.0.1.

Please check the bundles repository for this operator’s latest cluster service version configuration and make sure this is set to the same value as the container’s COS_OPERATOR_ID environment variable.

Additionally, the COS_OPERATOR_VERSION should be synchronized from the same location but should match the cluster service version configuration’s environment variable of the same name. As of this commit, this would be 1.5.0.

By default, the application searches for:

  • ConfigMap: cos-fleetshard-operator-debezium-config

To change the default values, use the following system properties: - quarkus.kubernetes-config.namespace - quarkus.kubernetes-config.config-maps

configuration options

Property Default Description

cos.operator.id

the id of the operator

cos.operator.version

the version of the operator

cos.namespace

${kubernetes.namespace}

the namespace where operator related resources are created

Overriding connector log level

  • When a debezium connector is created, an empty ConfigMap is created with it.

  • This ConfigMap can be used to override log levels.

  • It is created in the same namespace as the connector, with the name mctr-<deploymentId>-configmap.

  • See org.bf2.cos.fleetshard.support.resources.ConfigMaps.generateConnectorConfigMapId and it’s usages for more details.

One can then use that ConfigMap to override log levels for the connector, by applying the following configuration to the ConfigMap:

apiVersion: v1
data:
  override.properties: |-
    io.debezium=DEBUG
    org.apache.kafka.connect=DEBUG

Changes made to this ConfigMap triggers a redeployment of the connector with the specified log levels.