Skip to content

Latest commit

 

History

History
112 lines (85 loc) · 3.23 KB

File metadata and controls

112 lines (85 loc) · 3.23 KB

cos-fleetshard-operator-camel

configuration

  • create application config

    kubectl create configmap cos-fleetshard-operator-camel-config \
        --from-file=../etc/kubernetes/operator-camel/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

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

mvn -Dlocal

By default, the local profile starts the operator with the following properties

Property Value

cos.operator.id

camel-connector-operator

cos.operator.version

1.5.0

By default, the application searches for:

  • ConfigMap: cos-fleetshard-operator-camel-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 Notes

cos.operator.id

A unique id for the operator.

This value is used for label selection when such feature is enabled (dsiabled by default whe running with the local profile)

cos.operator.version

the version of the operator

This value is used for the initial operator for the initial operator selector process. It must be compatible with the ranges declared in the connector catalog

Overriding connector properties and configs

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

  • This ConfigMap can be used to override connector properties.

  • 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, for example, log levels for the connector, by applying the following configuration to the ConfigMap:

apiVersion: v1
data:
  override.properties: |-
    quarkus.log.level=INFO
    quarkus.log.min-level=ALL
    quarkus.log.category."org.apache".level=ALL
    quarkus.log.category."org.apache".min-level=ALL

Changes made to this ConfigMap triggers a redeployment of the connector with the additional supplied properties.