radar-jdbc-connector

by RADAR-Base

Helm chartv0.11.2App 10.8.2-radarApache-2.0Verified publisher

A Helm chart for RADAR-base JDBC Kafka connector. This is a fork of the Kafka JDBC connector which allows data from topics to be imported into JDBC databases (including TimescaleDB databases which is used in the dashboard pipeline).

About this chart

radar-jdbc-connector

A Helm chart for RADAR-base JDBC Kafka connector. This is a fork of the Kafka JDBC connector which allows data from topics to be imported into JDBC databases (including TimescaleDB databases which is used in the dashboard pipeline).

Homepage: https://radar-base.org

CloudNativePG TimescaleDB

This chart deploys the CloudNativePG TimescaleDB via the timescaledb chart. In turn, timescaledb uses the CloudNativePG operator chart to deploy the TimescaleDB database. Configuration to the timescaledb chart can be passed via the timescaledb: key in the values.yaml file.

Deployment of CloudNativePG TimescaleDB can be disabled by setting enabled: false in the timescaledb: key.

Maintainers

NameEmailUrl
Pauline Conde[email protected]https://www.kcl.ac.uk/people/pauline-conde
Pim van Nierop[email protected]https://www.thehyve.nl/experts/pim-van-nierop

Source Code

Prerequisites

  • Kubernetes 1.28+
  • Kubectl 1.28+
  • Helm 3.1.0+

Requirements

RepositoryNameVersion
file://../radar-cloudnative-timescaledbtimescaledb(radar-cloudnative-timescaledb)0.2.0
https://radar-base.github.io/radar-helm-chartscommon2.x.x

Values

KeyTypeDefaultDescription
replicaCountint1Number of radar-jdbc-connector replicas to deploy
image.registrystring"ghcr.io"Image registry
image.repositorystring"radar-base/radar-jdbc-connector/radar-jdbc-connector"Image repository
image.tagstringnilImage tag (immutable tags are recommended) Overrides the image tag whose default is the chart appVersion.
image.digeststring""Image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
image.pullPolicystring"IfNotPresent"Image pull policy
image.pullSecretslist[]Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. e.g: pullSecrets: - myRegistryKeySecretName
nameOverridestring""String to partially override radar-jdbc-connector.fullname template with a string (will prepend the release name)
fullnameOverridestring""String to fully override radar-jdbc-connector.fullname template with a string
podSecurityContextobject{}Configure radar-jdbc-connector pods' Security Context
securityContextobject{}Configure radar-jdbc-connector containers' Security Context
service.typestring"ClusterIP"Kubernetes Service type
service.portint8083radar-jdbc-connector port
resources.requestsobject{"cpu":"100m","memory":"1Gi"}CPU/Memory resource requests
nodeSelectorobject{}Node labels for pod assignment
tolerationslist[]Toleration labels for pod assignment
affinityobject{}Affinity labels for pod assignment
extraEnvVarslist[{"name":"CONNECT_SECURITY_PROTOCOL","value":"SASL_PLAINTEXT"},{"name":"CONNECT_SASL_MECHANISM","value":"SCRAM-SHA-512"},{"name":"CONNECT_CONSUMER_SECURITY_PROTOCOL","value":"SASL_PLAINTEXT"},{"name":"CONNECT_CONSUMER_SASL_MECHANISM","value":"SCRAM-SHA-512"}]Additional environment variables to pass to the connector. These can be used to pass supported kafka and connect specific configs
extraEnvVars[0]object{"name":"CONNECT_SECURITY_PROTOCOL","value":"SASL_PLAINTEXT"}Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL. Needed by kafka_init script.
extraEnvVars[1]object{"name":"CONNECT_SASL_MECHANISM","value":"SCRAM-SHA-512"}Mechanism used to authenticate with SASL. Valid values are: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512. Needed by kafka_init script.
extraEnvVars[2]object{"name":"CONNECT_CONSUMER_SECURITY_PROTOCOL","value":"SASL_PLAINTEXT"}Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL.
extraEnvVars[3]object{"name":"CONNECT_CONSUMER_SASL_MECHANISM","value":"SCRAM-SHA-512"}Mechanism used to authenticate with SASL. Valid values are: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512.
secret.jaasobject{"key":"sasl.jaas.config","name":"shared-service-user"}Secret name for the JAAS configuration
customLivenessProbeobject{}Custom livenessProbe that overrides the default one
livenessProbe.enabledbooltrueEnable livenessProbe
livenessProbe.initialDelaySecondsint5Initial delay seconds for livenessProbe
livenessProbe.periodSecondsint30Period seconds for livenessProbe
livenessProbe.timeoutSecondsint5Timeout seconds for livenessProbe
livenessProbe.successThresholdint1Success threshold for livenessProbe
livenessProbe.failureThresholdint3Failure threshold for livenessProbe
customReadinessProbeobject{}Custom readinessProbe that overrides the default one
readinessProbe.enabledbooltrueEnable readinessProbe
readinessProbe.initialDelaySecondsint5Initial delay seconds for readinessProbe
readinessProbe.periodSecondsint30Period seconds for readinessProbe
readinessProbe.timeoutSecondsint5Timeout seconds for readinessProbe
readinessProbe.successThresholdint1Success threshold for readinessProbe
readinessProbe.failureThresholdint3Failure threshold for readinessProbe
customStartupProbeobject{}Custom startupProbe that overrides the default one
startupProbe.enabledbooltrueEnable startupProbe
startupProbe.initialDelaySecondsint5Initial delay seconds for startupProbe
startupProbe.periodSecondsint10Period seconds for startupProbe
startupProbe.timeoutSecondsint10Timeout seconds for startupProbe
startupProbe.successThresholdint1Success threshold for startupProbe
startupProbe.failureThresholdint30Failure threshold for startupProbe
networkpolicyobjectcheck values.yamlNetwork policy defines who can access this application and who this applications has access to
kafkastring"SASL_PLAINTEXT://radar-kafka-kafka-bootstrap:9094"URI of Kafka brokers of the cluster
kafka_num_brokersstring"3"Number of Kafka brokers. This is used to validate the cluster availability at connector init.
schema_registrystring"http://radar-kafka-schema-registry:8081"URL of the Kafka schema registry
maxTasksint2Maximum number of worker threads inside a connector pod.
modestring"sink"Either source or sink
logLevel.rootstring"INFO"Default log level
logLevel.loggersobject{"org.reflections":"ERROR"}Per-logger log-level
heapOptsstring"-Xms1500m"Java heap options
source.namestring"radar-jdbc-source"Name of the connector Kafka producer group
source.schemastring"public"Database schema (if any)
source.tableWhiteliststring""Comma-separated list of tables to read
source.topicPrefixstring""Prefix to prepend to table names to generate the name of the Kafka topic to publish data to.
source.modestring"incrementing"How to detect new values in a table.
source.incrementingColumnNamestring""When using mode incrementing, which column to use as incrementing. If empty, autodetection will be used.
source.keyFieldstring""Field to use as key for the records. If empty, no key is used.
source.persistence.enabledbooltrueWhether to enable persistence for storing offsets
source.persistence.existingClaimstringnilExisting persistent volume claim to use
source.persistence.accessModestring"ReadWriteOnce"PVC access mode
source.persistence.sizestring"20Mi"PVC storage size request
sink.namestring"radar-jdbc-sink"Name of the connector Kafka consumer group
sink.autoCreatebooltruecreate table if it does not exist
sink.insertModestring"upsert"How to insert new values into the database
sink.transforms.enabledbooltrueWhether to merge the key fields into the inserted values.
sink.transforms.mergeKeyTypestring"org.radarbase.kafka.connect.transforms.MergeKey"Class to handle merging the key into the record
sink.transforms.timestampTypestring"org.radarbase.kafka.connect.transforms.TimestampConverter"Class to convert time-based fields into SQL timestamps
sink.transforms.timestampFieldslist["time","timeReceived","timeCompleted","timestamp"]Field names to consider for converting to timestamp
sink.primaryKeys.modestring"record_value"where to read the primary keys from when creating the table
sink.primaryKeys.fieldslist["time","userId","projectId"]fields to include as primary keys when creating the table
sink.topicsstring"android_phone_relative_location, android_phone_battery_level, connect_upload_altoida_summary, connect_fitbit_intraday_heart_rate, connect_fitbit_intraday_steps"Comma-separated list of topics the connector will read from and ingest into the database
sink.tableNameFormatstring"${topic}"How to format a table name based on the inserted topic
jdbc.urlstringnilHost of the TimescaleDB database
jdbc.urlSecretobject{"key":null,"name":null}Kubernetes secret name for the JDBC connection URL (disables the use of 'url' value)
jdbc.userstringnilTimescaleDB database username
jdbc.userSecretobject{"key":null,"name":null}Kubernetes secret name for the username (disables the use of 'user' value)
jdbc.passwordstringnilTimescaleDB database password (using a secret is recommended)
jdbc.passwordSecretobject{"key":null,"name":null}Kubernetes secret name for the password
jdbc.dialectstring"TimescaleDBDatabaseDialect"JDBC connect dialect that the database uses
timescaledb.enabledbooltrueUse the local cloudnativepg timescaledb cluster
timescaledb.clusterobjectcheck values.yamlCloudNativePG TimescaleDB configuration
timescaledb.cluster.postgresql.parameters.wal_keep_sizestring"1GB"Can be decreased to save disk space. 1GB default was chosen to prevent missing wal files during recovery.

Deploy radar-jdbc-connector with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has radar-jdbc-connector on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartradar-jdbc-connector is pinned at v0.11.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply