radar-rest-sources-backend

by RADAR-Base

Helm chartv1.6.0App 4.5.0Apache-2.0Verified publisher

A Helm chart for the backend application of RADAR-base Rest Sources Authorizer

About this chart

radar-rest-sources-backend

A Helm chart for the backend application of RADAR-base Rest Sources Authorizer

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+
  • When gatewayAPI.enabled=true: the Gateway API CRDs and a Gateway Controller (e.g. NGINX Gateway Fabric) must already be installed in the cluster, and the shared parent Gateway radar-base-k8s-gateway must exist — it can be created via the gateway-api chart

Requirements

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

Values

KeyTypeDefaultDescription
replicaCountint2Number of radar-rest-sources-backend replicas to deploy
image.registrystring"ghcr.io"Image registry
image.repositorystring"radar-base/radar-rest-source-auth/radar-rest-source-auth-backend"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
imagePullSecretslist[]Docker registry secret names as an array
nameOverridestring""String to partially override radar-rest-sources-backend.fullname template with a string (will prepend the release name)
fullnameOverridestring""String to fully override radar-rest-sources-backend.fullname template with a string
podSecurityContextobject{}Configure radar-rest-sources-backend pods' Security Context
securityContextobject{}Configure radar-rest-sources-backend containers' Security Context
service.typestring"ClusterIP"Kubernetes Service type
service.portint8080radar-rest-sources-backend port
disable_tlsboolfalseDisable TLS (reconfigures Ingress)
advertised_protocolstring"https"The protocol in advertised URIs (https, http)
ingress.enabledbooltrueEnable ingress controller resource
ingress.annotationsobjectcheck values.yamlAnnotations that define default ingress class, certificate issuer and session configuration
ingress.pathstring"/rest-sources/backend"Path within the url structure
ingress.pathTypestring"ImplementationSpecific"Ingress Path type
ingress.ingressClassNamestring"nginx"IngressClass that will be used to implement the Ingress (Kubernetes 1.18+)
ingress.hostslist["localhost"]Hosts to accept requests from
ingress.tls.secretNamestring"radar-base-tls"TLS Secret Name
gatewayAPI.enabledboolfalseEnable Gateway API HTTPRoute resource (alternative to ingress). Opt-in: requires the Gateway API CRDs and a Gateway controller to be installed. NOTE: the ingress's cookie-based session affinity (nginx.ingress.kubernetes.io/affinity and related session-cookie-* annotations) has no HTTPRoute-annotation equivalent and is NOT replicated here; Gateway API session persistence is a separate, still-experimental field.
gatewayAPI.annotationsobject{}Annotations to add to the HTTPRoute
gatewayAPI.parentRefobject{"name":"radar-base-k8s-gateway","namespace":""}Parent Gateway that the HTTPRoute attaches to. The Gateway itself is a shared resource and must be created separately (not by this chart).
gatewayAPI.parentRef.namestring"radar-base-k8s-gateway"Name of the Gateway
gatewayAPI.parentRef.namespacestring""Namespace of the Gateway (defaults to the release namespace when empty)
gatewayAPI.hostnameslist["{{ .Values.serverName }}"]Hostnames the HTTPRoutes accept requests for (must intersect the Gateway listener hostnames). String values support Helm templating (tpl); defaults to serverName so deployments override it the same way as ingress.hosts.
gatewayAPI.httpsobject{"port":443,"sectionName":""}HTTPS listener on the Gateway that the main route attaches to
gatewayAPI.https.portint443Listener port (empty attaches to all matching listeners)
gatewayAPI.https.sectionNamestring""Listener sectionName on the Gateway (optional)
gatewayAPI.pathTypestring"PathPrefix"Path match type (PathPrefix, Exact or RegularExpression)
gatewayAPI.pathstring"/rest-sources/backend"Path to match within the URL structure
gatewayAPI.filterslist[]Additional HTTPRoute filters (e.g. URLRewrite, RequestHeaderModifier)
gatewayAPI.httpsRedirectobject{"enabled":true,"port":80,"sectionName":"","statusCode":301}HTTP->HTTPS redirect route (equivalent to nginx force-TLS behaviour)
gatewayAPI.httpsRedirect.enabledbooltrueEnable a second HTTPRoute that 301-redirects HTTP traffic to HTTPS
gatewayAPI.httpsRedirect.portint80HTTP listener port on the Gateway to attach the redirect to
gatewayAPI.httpsRedirect.sectionNamestring""Listener sectionName on the Gateway (optional)
gatewayAPI.httpsRedirect.statusCodeint301Redirect HTTP status code
resources.requestsobject{"cpu":"100m","memory":"400Mi"}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
customLivenessProbeobject{}Custom livenessProbe that overrides the default one
livenessProbe.enabledbooltrueEnable livenessProbe
livenessProbe.initialDelaySecondsint5Initial delay seconds for livenessProbe
livenessProbe.periodSecondsint30Period seconds for livenessProbe
livenessProbe.timeoutSecondsint30Timeout 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.timeoutSecondsint30Timeout 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.timeoutSecondsint30Timeout 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
authorizer.tokenExpiryTimeInMinutesint15Within how many minutes an online authorization attempt should be finalized. Steps: logging in to Fitbit, returning to the authorizer.
authorizer.persistentTokenExpiryInMinint7200Within how many minutes an authorization attempt by a participant should be finalized. Steps: passing token to participant, them logging in to Fitbit, and returning to the authorizer.
postgres.hoststringnilhost name of the postgres db
postgres.portstringnilport of the postgres db
postgres.databasestringnildatabase name
postgres.urlSecretobject{"key":"jdbc-uri","name":"radar-cloudnative-postgresql-restsourceauthorizer"}Kubernetes secret containing the database JDBC Connection url (disables use of 'host', 'port' and 'database' values).
postgres.userstringnilpostgres user
postgres.userSecretobject{"key":"username","name":"radar-cloudnative-postgresql-restsourceauthorizer"}Kubernetes secret containing the database user (disables use of 'user' value).
postgres.passwordstringnilpassword of the postgres user
postgres.passwordSecretobject{"key":"password","name":"radar-cloudnative-postgresql-restsourceauthorizer"}Kubernetes secret containing the database password (disables use of 'password' value).
postgres.connection_parametersstring""Additional JDBC connection parameters e.g. sslmode=verify-full. Ignored when using 'urlSecret'.
postgres.ssl.enabledboolfalseset to true of the connecting to postgres using SSL
postgres.ssl.keystorepasswordstring"keystorepassword"
restSourceClientSubscriptions.googlehealth.enabledbooltrueMaster switch for per-user subscription management, without having to unset the service account
restSourceClientSubscriptions.googlehealth.apiBaseUrlstring"https://health.googleapis.com/v4"Base URL of the Google Health API
restSourceClientSubscriptions.googlehealth.googleCloudProjectIdstring""Google Cloud project that owns the Health API subscriber. Required when restSourceClientSubscriptions.googlehealth.enabled is true.
restSourceClientSubscriptions.googlehealth.subscriberIdstring""Subscriber id the per-user subscriptions hang off. MUST match googlehealth.subscriberId in the radar-push-endpoint chart, which registers that subscriber.
restSourceClientSubscriptions.googlehealth.reconcileIntervalMinutesint5How often, in minutes, the background reconcile compares local state against Google's subscriptions
restSourceClientSubscriptions.googlehealth.reconcileMaxDeletesPerPassint20If a single reconcile pass would delete more orphaned subscriptions than this, it skips deletion and warns instead. Zero or less disables the cap.
restSourceClientSubscriptions.googlehealth.serviceAccountKeystring""Google service-account JSON used to manage the subscriptions. Without it, subscription management stays inactive. The chart mounts it at a fixed path, so only the key itself is configurable.
restSourceClientSubscriptions.googlehealth.dataTypeslist["steps","heart-rate","heart-rate-variability","daily-resting-heart-rate","respiratory-rate-sleep-summary","daily-sleep-temperature-derivations","sleep","exercise","floors","sedentary-period","activity-level"]Data types each per-user subscription subscribes to. MUST stay identical to googlehealth.triggerDataTypes in the radar-push-endpoint chart, which configures the shared subscriber these subscriptions hang off — a type present here but not there never yields a webhook trigger. Only valid trigger types may be listed; anything else makes Google reject the create outright.
redis.uristring"redis://radar-redis-replication-master:6379"URI of the redis database
serverNamestring"localhost"Resolvable server name, needed to find the advertised URL and callback URL
managementportal_urlstring"http://management-portal:8080/managementportal"URL of the Management Portal
client_secretstring"secret"OAuth2 client secret of the radar-rest-sources-backend client from Management Portal
public_key_endpointslist["http://radar-hydra-public:4444/.well-known/jwks.json"]List of public key endpoints for token verification
auth_urlstring"http://radar-hydra-public:4444/oauth2/token"Auth url for MP client
restSourceClients.fitbit.enableboolfalseset to true, if Fitbit client should be used
restSourceClients.fitbit.sourceTypestring"FitBit"Type of the data sources
restSourceClients.fitbit.authorizationEndpointstring"https://www.fitbit.com/oauth2/authorize"Authorization endpoint for Fitbit authentication and authorization
restSourceClients.fitbit.tokenEndpointstring"https://api.fitbit.com/oauth2/token"Token endpoint to request access-token from FitBit
restSourceClients.fitbit.clientIdstringnilFitBit client id
restSourceClients.fitbit.clientSecretstringnilFitBit client secret
restSourceClients.fitbit.scopestring"activity heartrate sleep profile"List of scopes of the data that should be collected from

Deploy radar-rest-sources-backend with OpenTenant

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