routehub-server

by Routehub

Helm chartv1.0.1App 0.0.1

A Helm chart for RouteHub Server deployment

About this chart

RouteHub Server Helm Chart

This Helm chart deploys the RouteHub Server application on a Kubernetes cluster.

Components

The RouteHub Server application consists of the following components:

  • GraphQL API Server
  • Redis
  • PostgreSQL for Data & Policy storage

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.0+

Installing the Chart

To install the chart with the release name my-release:

Create a namespace

kubectl create namespace routehub-server

Local chart Deployment

# Local chart
helm install my-release ./charts/routehub-server
  --namespace routehub-server \
  --set global.customRegistry=your.registry/ \
  --set global.imagePullSecrets[0].name=your-secret-name

Remote chart Deployment

helm repo add routehub-helm https://routehub-link.github.io/RouteHub.HELM/

# Remote chart
helm install my-release routehub-helm/routehub-server \
  --namespace routehub-server \
  --set global.customRegistry=your.registry/ \
  --set global.imagePullSecrets[0].name=your-secret-name

Configuration

The following table lists the configurable parameters of the RouteHub Server chart and their default values. Please refer to the values.yaml file for more information.

SectionKeyDefault ValueDescription
globalcustomRegistry""Custom registry for images
global.imagePullSecretsname""Name of the image pull secret
global.redisHOST"{{ .Release.Name }}-redis"Redis host
global.redisPORT6379Redis port
global.redisPASSWORD""Redis password
global.redisDB0Redis database number
redisimage.repositoryeqalpha/keydbRedis image repository
redisimage.taglatestRedis image tag
redisreplicaCount1Number of Redis replicas
redisservice.typeClusterIPRedis service type
redisservice.port6379Redis service port
postgresimage.repositorypostgresPostgreSQL image repository
postgresimage.taglatestPostgreSQL image tag
postgresdatabaseRouteHubPostgreSQL database name
postgresusernamepostgresPostgreSQL username
postgrespasswordpostgresPostgreSQL password
postgresreplicaCount1Number of PostgreSQL replicas
postgresservice.typeClusterIPPostgreSQL service type
postgresservice.port5432PostgreSQL service port
routehubServerimage.repositoryroutehub-serverRouteHub server image repository
routehubServerimage.taglatestRouteHub server image tag
routehubServerreplicaCount1Number of RouteHub server replicas
routehubServerservice.typeLoadBalancerRouteHub server service type
routehubServerservice.port8080RouteHub server service port
routehubServerlivenessProbe.path/healthzPath for liveness probe
routehubServerlivenessProbe.port8080Port for liveness probe
routehubServerlivenessProbe.failureThreshold3Failure threshold for liveness probe
routehubServerlivenessProbe.periodSeconds120Period seconds for liveness probe
routehubServerlivenessProbe.initialDelaySeconds30Initial delay seconds for liveness probe
routehubServer.environmentHOSTING_MODERESTHosting mode for the server
routehubServer.environmentSERVICES_DOMAIN_UTILS_HOST"http://localhost:9001"Domain utils service host
routehubServer.environmentDATABASE_TYPE_MIGRATE"true"Enable database migration
routehubServer.environmentDATABASE_TYPE_SEED"true"Enable database seeding
routehubServer.environmentDATABASE_TYPE_PROVIDER"postgres"Database provider type
routehubServer.environmentDATABASE_SEED_ADMINS_0_SUBJECT"278978826325721091"Subject ID for first admin seed
routehubServer.environmentDATABASE_SEED_ADMINS_1_SUBJECT"278979034530971651"Subject ID for second admin seed
routehubServer.environmentDATABASE_SEED_ORGANIZATION_NAME"RouteHub"Name of the seeded organization
routehubServer.environmentDATABASE_SEED_ORGANIZATION_DESCRIPTION"RouteHub is a GraphQL API for managing routes"Description of the seeded organization
routehubServer.environmentDATABASE_SEED_DOMAIN_NAME"RouteHub Public Shortener"Name of the seeded domain
routehubServer.environmentDATABASE_SEED_DOMAIN_URL"https://s.r4l.cc"URL of the seeded domain
routehubServer.environmentGRAPHQL_PLAYGROUND"true"Enable GraphQL playground
routehubServer.environmentGRAPHQL_DATALOADER_WAIT"1ms"GraphQL dataloader wait time
routehubServer.environmentGRAPHQL_DATALOADER_CACHE"true"Enable GraphQL dataloader cache
routehubServer.environmentGRAPHQL_DATALOADER_LRUE_SIZE"1000"GraphQL dataloader LRU cache size
routehubServer.environmentGRAPHQL_DATALOADER_LRUE_EXPIRE"10m"GraphQL dataloader LRU cache expiration time
routehubServer.environmentCASBIN_MODEL"./config/authorization/rbac.model.conf"Path to Casbin RBAC model configuration
routehubServer.environmentCASBIN_LOG_LEVEL"DEBUG"Casbin log level
routehubServer.environmentZITADEL_CLIENT_ID"278962924343590915"Zitadel client ID
routehubServer.environmentZITADEL_CALLBACK"/oauth2/callback"Zitadel OAuth2 callback path
routehubServer.environmentZITADEL_SCOPE"openid,profile,email"Zitadel OAuth2 scopes
routehubServer.environmentZITADEL_AUTHORIZE_URL"http://server.proxy.internal:7077/oauth/v2/authorize"Zitadel authorization URL
routehubServer.environmentZITADEL_TOKEN_URL"http://server.proxy.internal:7077/oauth/v2/token"Zitadel token URL
routehubServer.environmentZITADEL_ISSUER"http://server.proxy.internal:7077"Zitadel issuer URL
routehubServer.environmentZITADEL_DOMAIN"server.proxy.internal"Zitadel domain
routehubServer.environmentZITADEL_PORT"7077"Zitadel port
routehubServer.environmentZITADEL_INSECURE"true"Allow insecure connections to Zitadel

About the private registry

Create a secret for the registry

kubectl create secret docker-registry your-secret-name \
  --namespace routehub-server \
  --docker-server=your.registry \
  --docker-username=your-username \
  --docker-password=your-password

Use the secret in the Helm chart

helm install my-release routehub-helm/routehub-server \
  --namespace routehub-server \
  --create-namespace \
  --set global.customRegistry=your.registry/ \
  --set global.imagePullSecrets[0].name=your-secret-name

For Debug you could add the following flags

--dry-run --debug

Deploy routehub-server with OpenTenant

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