Skip to content

TypeScript host service configuration

Configure the Typescript-host service through its Helm chart.

Application configuration

Everything in this section goes into the chart’s typescriptHostServiceConfig value, which becomes typescript-host-service’s configuration file. Override individual keys with the environment variable listed for it, supplied through the chart’s envVars or additionalSecrets.

ValueDescription
port
  • Port the Restate HTTP endpoint binds to, and the port advertised to Restate during registration.
  • Environment variable: RHIZE_TSHOST_PORT
  • Default: the chart’s service.port
  • Example: 9081
  • Type: integer
runtime.adminUrl
[Required]
  • Restate admin API typescript-host-service registers itself with at startup.
  • Environment variable: RHIZE_TSHOST_RUNTIME_SERVICE_URL
  • Default: http://runtime:9070
  • Example: http://restate:9070
  • Type: string
runtime.deploymentName
  • Hostname Restate is told to call back on, combined with port to form the registered URI. Derived from the pod hostname, so override it when the Kubernetes Service name differs from the Deployment name.
  • Environment variable: RHIZE_TSHOST_RUNTIME_DEPLOYMENT_NAME
  • Default: the Deployment name
  • Example: typescript-host-service
  • Type: string
jsonata.cacheEnabled
  • Caches compiled JSONata expressions. Turning the cache off recompiles every expression on every call.
  • Environment variable: RHIZE_TSHOST_JSONATA_CACHE_ENABLED
  • Default: true
  • Example: true
  • Type: boolean
jsonata.cacheItems
  • Maximum number of compiled expressions held in the cache.
  • Environment variable: RHIZE_TSHOST_JSONATA_CACHE_ITEMS
  • Default: 1000
  • Example: 1000
  • Type: integer
jsonata.cacheAge
  • Maximum age of a cache entry in milliseconds. The default is 24 hours.
  • Environment variable: RHIZE_TSHOST_JSONATA_CACHE_AGE
  • Default: 86400000
  • Example: 86400000
  • Type: integer
grpc.listener
  • Address and port the gRPC server binds to.
  • Environment variable: RHIZE_TSHOST_GRPC_LISTENER
  • Default: 0.0.0.0: followed by the chart’s gRPCService.port
  • Example: 0.0.0.0:9082
  • Type: string

Helm chart values

Values shared by every chart are documented in shared-helm-values.md. This chart exposes an HTTP port and a gRPC port on one Service, and has no serviceAccount or serviceMonitor values.

ValueDescription
typescriptHostServiceConfig
  • The application configuration, rendered into the typescript-host-service-config ConfigMap as config.yaml and mounted at /app/config.
  • Example: see the example block below
  • Type: object
envVars
  • Map of environment variable names to values passed to the container.
  • Example: see the example block below
  • Type: map
additionalSecrets
  • List of entries that each carry one value from a Kubernetes Secret into an environment variable: name is the variable the service reads, secretName is the Secret to take the value from, and secretKey is the name of the entry within that Secret.
  • Example: see the example block below
  • Type: list
service.port
  • HTTP port of the Service and the container.
  • Default: 9081
  • Example: 9081
  • Type: integer
service.targetPort
  • Name of the HTTP container port, which the Service sends HTTP traffic to.
  • Default: http
  • Example: http
  • Type: string
service.protocol
  • Protocol of the HTTP port.
  • Default: TCP
  • Example: TCP
  • Type: string
service.name
  • Name of the HTTP port on the Service.
  • Default: http
  • Example: http
  • Type: string
gRPCService.port
  • gRPC port of the Service and the container.
  • Default: 9082
  • Example: 9082
  • Type: integer
gRPCService.targetPort
  • Name of the gRPC container port, which the Service sends gRPC traffic to.
  • Default: grpc
  • Example: grpc
  • Type: string
gRPCService.protocol
  • Protocol of the gRPC port.
  • Default: TCP
  • Example: TCP
  • Type: string
gRPCService.name
  • Name of the gRPC port on the Service.
  • Default: grpc
  • Example: grpc
  • Type: string

The cache settings in the configuration file, the deployment name overridden by a variable, and the Restate URL taken from the restateAdminUrl entry of a Secret named libre-secrets:

typescriptHostServiceConfig:
  jsonata:
    cacheEnabled: true
    cacheItems: 1000
envVars:
  RHIZE_TSHOST_RUNTIME_DEPLOYMENT_NAME: "typescript-host-service"
additionalSecrets:
  - name: RHIZE_TSHOST_RUNTIME_SERVICE_URL
    secretName: libre-secrets
    secretKey: restateAdminUrl