Skip to content

Latest commit

 

History

History
135 lines (105 loc) · 3.02 KB

README.adoc

File metadata and controls

135 lines (105 loc) · 3.02 KB

cos-fleetshard-sync

configuration

  • create application config

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

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

  • create application secret

    kubectl create secret generic cos-fleetshard-sync-config \
        --from-file=../etc/kubernetes/sync/base/app-secret/application.properties
    Important

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

  • 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 =
        cos.observability.enabled = true

local profile

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

export KUBERNETES_NAMESPACE=$(oc project -q)

./mvnw -Plocal

To use a different set of configmaps/secrets:

export KUBERNETES_NAMESPACE=$(oc project -q)

./mvnw -Plocal \
  -Dquarkus.kubernetes-config.secrets=cos-fleetshard-sync-config-1 \
  -Dquarkus.kubernetes-config.config-maps=cos-fleetshard-sync-config-1

By default, the application searches for:

  • Secret: cos-fleetshard-sync-config

  • ConfigMap: cos-fleetshard-sync-config

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

configuration options

Property Default Description

cos.namespace

${kubernetes.namespace}

the namespace where operators are installed

cos.resources.poll-interval

15s

the interval between pool for resources

cos.resources.resync-interval

60s

the interval between full re-sync

cos.resources.update-interval

15s

the interval between resources update

mas-sso-base-url

sso base url

mas-sso-realm

sso realm

client-id

connector cluster client id

client-secret

connector cluster client secret

control-plane-base-url

control plane base url

cluster-id

connector cluster id