-
create application config
kubectl create configmap cos-fleetshard-operator-debezium-config \ --from-file=../etc/kubernetes/operator-debezium/base/app-config/application.properties
Importantthe 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 varOVERRIDE_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 =
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 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 Additionally, the |
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
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 |
-
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.