radar-output

by RADAR-Base

Helm chartv1.2.10App 3.0.6Apache-2.0Verified publisher

A Helm chart for RADAR-base output restructure service. This application reads data from intermediate storage and restructure the data into project-> subject-id-> data topic -> data split per hour. This service offers few options to choose the source and target of the pipeline.

About this chart

radar-output

A Helm chart for RADAR-base output restructure service. This application reads data from intermediate storage and restructure the data into project-> subject-id-> data topic -> data split per hour. This service offers few options to choose the source and target of the pipeline.

Homepage: https://radar-base.org

Maintainers

NameEmailUrl
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+
  • metrics-server is required in the cluster when HPA is enabled (hpa.enabled=true)

Requirements

RepositoryNameVersion
https://radar-base.github.io/radar-helm-chartscommon2.x.x

Values

KeyTypeDefaultDescription
replicaCountint1Number of radar-output replicas to deploy
image.registrystring"ghcr.io"Image registry
image.repositorystring"radar-base/radar-output-restructure/radar-output-restructure"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-output.fullname template with a string (will prepend the release name)
fullnameOverridestring""String to fully override radar-output.fullname template with a string
podSecurityContextobject{}Configure radar-output pods' Security Context
securityContextobject{}Configure radar-output containers' Security Context
resources.limitsobject{"cpu":"1000m"}CPU/Memory resource limits
resources.requestsobject{"cpu":"100m","memory":"2Gi"}CPU/Memory resource requests
nodeSelectorobject{}Node labels for pod assignment
tolerationslist[]Toleration labels for pod assignment
affinityobject{}Affinity labels for pod assignment
extraEnvVarslist[]Extra environment variables
networkpolicyobjectcheck values.yamlNetwork policy defines who can access this application and who this applications has access to
javaOptsstring"-Xms400m -Xmx3g"
existingSecretstringnilExisting secret for storing S3 or Azure credentials.
source.typestring"s3"Type of the intermediate storage of the RADAR-base pipeline (e.g., s3 or azure)
source.s3.endpointstring"http://minio:9000"s3 endpoint of the intermediate storage
source.s3.accessTokenstring"access_key"s3 access-key of the intermediate storage
source.s3.secretKeystring"secret"s3 secret-key of the intermediate storage
source.s3.bucketstring"radar-intermediate-storage"s3 bucket name of the intermediate storage
source.s3.connectTimeoutstringnils3 HTTP connect timeout in seconds
source.s3.writeTimeoutstringnils3 HTTP write timeout in seconds
source.s3.readTimeoutstringnils3 HTTP read timeout in seconds
source.azure.endpointstring""Azure endpoint of the intermediate storage
source.azure.usernamestring""Azure username to access the s3 endpoint when using personal login
source.azure.passwordstring""Azure password when using personal login
source.azure.accountNamestring""Azure account name when using shared access tokens
source.azure.accountKeystring""Azure account key when using shared access tokens
source.azure.sasTokenstring""Azure SAS(shared access signature) token when using shared access tokens
source.azure.containerstring""Azure blob container name
source.azure.connectTimeoutstringnilAzure HTTP connect timeout in seconds
source.azure.responseTimeoutstringnilAzure HTTP response timeout in seconds
source.azure.writeTimeoutstringnilAzure HTTP write timeout in seconds
source.azure.readTimeoutstringnilAzure HTTP read timeout in seconds
source.index.fullSyncIntervalint3600Interval in seconds to synchronize the index with the storage (in seconds). This values should be only changed in specific scenarios (e.g. e2e testing).
source.index.emptyDirectorySyncIntervalint900Interval in seconds to also include empty directories during sync with the storage (in seconds). This values should be only changed in specific scenarios (e.g. e2e testing).
target.typestring"s3"Type of the output storage of the RADAR-base pipeline (e.g., s3 or azure)
target.s3.endpointstring"http://minio:9000"s3 endpoint of the output storage
target.s3.accessTokenstring"access_key"s3 access-key of the output storage
target.s3.secretKeystring"secret"s3 secret-key of the output storage
target.s3.bucketstring"radar-output-storage"s3 bucket name of the output storage
target.s3.connectTimeoutstringnils3 HTTP connect timeout in seconds
target.s3.writeTimeoutstringnils3 HTTP write timeout in seconds
target.s3.readTimeoutstringnils3 HTTP read timeout in seconds
target.azure.endpointstring""Azure endpoint of the output storage
target.azure.usernamestring""Azure username to access the s3 endpoint when using personal login
target.azure.passwordstring""Azure password when using personal login
target.azure.accountNamestring""Azure account name when using shared access tokens
target.azure.accountKeystring""Azure account key when using shared access tokens
target.azure.sasTokenstring""Azure SAS(shared access signature) token when using shared access tokens
target.azure.containerstring""Azure blob container name
target.azure.connectTimeoutstringnilAzure HTTP connect timeout in seconds
target.azure.responseTimeoutstringnilAzure HTTP response timeout in seconds
target.azure.writeTimeoutstringnilAzure HTTP write timeout in seconds
target.azure.readTimeoutstringnilAzure HTTP read timeout in seconds
redis.uristring"redis://radar-redis-replication-master:6379"URL of the redis database
worker.intervalint90Scanning interval (seconds)
worker.cacheSizeint300Maximum number of files and converters to keep open while processing
worker.cacheOffsetsSizeint500000Maximum number of offsets in cache.
worker.minimumFileAgeint900Minimum amount of time in seconds since a file was last modified for it to be considered for processing.
worker.maxFilesPerTopicint20Maximum number of files to process in a single poll operation. Reduce to get more parallel workloads, increase to avoid idling too much if the individual file sizes are very small.
worker.numThreadsint2Number of threads to do processing on
cleaner.ageint7Number of days after which a source file is considered old
cleaner.intervalint86400Interval in seconds between cleanups
paths.inputstring"topics"Relative path to intermediate storage root to browse for data
paths.outputstring"output"Relative path to output storage to write data
paths.factorystring"org.radarbase.output.path.FormattedPathFactory"Output path construction factory
paths.path.formatstring"${projectId}/${userId}/${topic}/${filename}"Output path format
paths.propertiesobject{}Additional properties. For details see https://github.com/RADAR-base/radar-output-restructure/blob/master/restructure.yml
topicsobject{"questionnaire_response":{"pathProperties":{"format":"${projectId}/${userId}/${topic}/${value:name}/${filename}","plugins":"fixed value"}}}Individual topic configuration
topics.questionnaire_response.pathProperties.formatstring"${projectId}/${userId}/${topic}/${value:name}/${filename}"Alternative path output of the questionnaire_response topic
topics.questionnaire_response.pathProperties.pluginsstring"fixed value"Alternative path plugins of the questionnaire_response topic
deduplication.enablebooltrueWhether to enable deduplication
compression.typestring"gzip"Compression type to use for output files. Can be one of: gzip, zip, none
podDisruptionBudget.enabledboolfalseEnable Pod Disruption Budget
podDisruptionBudget.minAvailableint1Minimum number of pods that must be available during disruptions
podDisruptionBudget.maxUnavailablestringnilMaximum number of pods that can be unavailable during disruptions
hpa.enabledboolfalseEnable HPA
hpa.maxReplicasint5Maximum number of replicas
hpa.targetCPUint80Target CPU utilization percentage
hpa.targetMemorystringnilTarget Memory utilization percentage

Cost Considerations

If you are using paid S3 services (like AWS S3), then you might want to update the following values to reduce the involved costs -

  1. worker.interval - Increase this value to reduce the number of times the worker runs. This will reduce the number of times the worker will check for new files in the S3 bucket. The default value is 90 seconds. You can increase this value to 900 seconds (15 minutes) or more depending on your use case. Make sure to increase the worker.maxFilesPerTopic value to match the number of files you expect to be processed in the given interval.
  2. worker.cacheSize - Increase this value to reduce S3 costs. This will increase local storage and memory requirements of radar-output.
  3. paths.properties.format- Change the output path format to ${project}/${user}/${topic}/${time:YYYYmmdd}${attempt}${extension} to only create one file per day.
  4. deduplication.enable - Set this to false. This will reduce the number of requests and memory used by the output converter, but it may increase the storage size and will require analysts to remove duplicates at a later time.

Deploy radar-output with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has radar-output 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-output is pinned at v1.2.10 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