Parameters

The parent key for all of the following parameters is appuio_cloud_reporting.

namespace

type

string

default

${_instance}

The namespace in which to deploy this component.

images

type

dictionary

default

See `class/defaults.yml.

Dictionary containing the container images used by this component.

images.reporting

type

dictionary

The image used for managing data in the reporting database.

images.erp_adapter

type

dictionary

The image used for creating invoices and syncing target fields.

schedules

type

dictionary

default
backfill: '15 * * * *'
check_missing: '30 8-14 * * *'
invoice: '0 10 1 * *'

Dictionary managing the schedules of the periodic jobs (implemented as Kubernetes CronJobs).

development_mode

type

boolean

default

false

This parameter allows to enable development mode for the component. The component prevents periodic jobs from being disabled, unless development mode is active.

schedules_suspend

type

dictionary

default
backfill: false
check_missing: false
invoice: false

This parameter allows users to selectively suspend one or more of the periodic jobs.

A suspended CronJob still exists on the cluster, but no new jobs are created based on the CronJob’s schedule.

Never use this parameter to disable CronJobs because they trigger alerts. Instead investigate why the alerts are triggered, and resolve the actual cause, such as missing data in the billing database.

By disabling one or more of the periodic jobs, you’ll most likely break the usage-based billing for the APPUiO Cloud instance. Breaking the usage-based billing will lead to lost income for the APPUiO Cloud instance.

database

type

dictionary

default
url: postgres://$(DB_USER):$(DB_PASSWORD)@$(DB_HOST):$(DB_PORT)/$(DB_NAME)?$(DB_PARAMS)
parameters: ''

Dictionary managing the connection to the reporting database.

database_secret

type

dictionary

default
database_secret: {}

Dictionary containing key value pairs that are stored in a secret and loaded as environment variables.

Example

database_secret:
  DB_USER: appuio-cloud-reporting
  DB_PASSWORD: letmein
  DB_HOST: db.example.com
  DB_PORT: 5432
  DB_NAME: appuio-cloud-reporting

database_env

type

dictionary

default
database_env: {}

Dictionary containing additional environment variables.

Example

database_env:
  DB_USER:
    secretKeyRef:
      name: reporting-db-prod-cred
      key: POSTGRESQL_USER
  DB_PASSWORD:
    secretKeyRef:
      name: reporting-db-prod-cred
      key: POSTGRESQL_PASSWORD
  DB_HOST:
    secretKeyRef:
      name: reporting-db-prod-cred
      key: POSTGRESQL_HOST
  DB_PORT:
    secretKeyRef:
      name: reporting-db-prod-cred
      key: POSTGRESQL_PORT
  DB_NAME:
    secretKeyRef:
      name: reporting-db-prod-cred
      key: POSTGRESQL_DB

extra_volumes

type

dictionary

default
extra_volumes: {}

Mount additional volumes to the pods.

Example

extra_volumes:
  dbsecret:
    mount_spec:
      readOnly: true
      mountPath: /secrets/database
    volume_spec:
      secret:
        secretName: reporting-db-prod-cred
        defaultMode: 0600

prometheus.url

type

string

default

null

URL used to connect with the Prometheus/Thanos Instance.

prometheus.org_id

type

string

default

null

If set, this value is sent as the X-Scope-OrgID header in all requests to Prometheus.

erp_adapter.url

type

string

default

null

URL used to connect with the ERP Instance. For Odoo the URL must be in the format of :port/db-name.

erp_adapter.invoice_title

type

string

default

"APPUiO Cloud"

Invoice title to be used by the ERP adapter when generating invoices.

backfill.queries

type

dictionary

default
appuio_cloud_memory: true
appuio_cloud_loadbalancer: true
appuio_cloud_persistent_storage: true
appcat_postgresql_vshn_standalone: true

Queries to use when backfilling metrics data. true enables the query, every other value disables the query. Every query is run in its own CronJob.

Check the reporting database for possible queries. Currently known queries are appuio_cloud_memory, appuio_cloud_loadbalancer, appuio_cloud_persistent_storage, and appcat_postgresql_vshn_standalone.

network_policies.target_namespaces

type

dictionary

default

{}

example
appuio-reporting-database: true
appuio-thanos: true

Injects a network policy into the target namespace given by the key, allowing communication to the namespace.

This is a workaround and the parameter will disappear once we’ve a more native way to manage network policies with Project Syn.

monitoring.enabled

type

boolean

default

true

The component creates Prometheus and Alertmanager objects if enabled.

monitoring.alerts

type

dictionary

example
APPUiOCloudReportingDidSomething:
  enabled: false
  rule:
    annotations:
      description: APPUiOCloudReporting did something.
      message: APPUiOCloudReporting did something.
      runbook: https://hub.syn.tools/appuio-cloud-reporting/runbooks/APPUiOCloudReportingDidSomething.html
    expr: |
      appuio_cloud_reporting_doing_something > 1
    for: 10m
    labels:
      severity: warning

Alerts monitoring the cloud reporting cron jobs.

tenantmapping

type

dictionary

Configuration for the tenant mapping job. The job is responsible for mapping the tenants source (organization) to the target in the ERP (billing entity).

tenantmapping.dry_run

type

boolean

default

true

Doesn’t commit the tenant mapping to the database if set to true.

tenantmapping.metrics_selector

type

boolean

default

namespace="appuio-control-api-production"

Further narrows down the metrics to be considered for the tenant mapping. Prometheus selector syntax (test="asd") is used.

Example

schedules:
  invoice: '0 12 1 * *'

database:
  host: reporting-database.appuio.cloud
  port: 5432
  name: reporting-database
  username: reporting-user
  password: ?{vaultkv:${cluster:tenant}/${cluster:name}/appuio-cloud-reporting/reporting-database-password}

erp_adapter:
  url: ?{vaultkv:${cluster:tenant}/${cluster:name}/appuio-cloud-reporting/erp-url}

prometheus:
  url: http://thanos-query.appuio-thanos.svc:9090