Helm chartv0.9.5App 0.22.3Verified publisher

A Helm chart for Kavach

About this chart

Kavach Helm Chart

A Helm chart for Kavach - A comprehensive identity and access management (IAM) platform that provides authentication, authorization, and user management services for modern applications.

Overview

Kavach is a complete IAM solution built with modern microservices architecture. It provides:

  • Authentication: User authentication with multiple providers and methods
  • Authorization: Fine-grained access control with role-based permissions
  • User Management: Complete user lifecycle management with organizations and spaces
  • Multi-tenancy: Support for multiple organizations and applications
  • API Gateway: Secure API access with authentication and authorization
  • File Management: Integrated file upload and processing capabilities
  • Scalability: Microservices architecture with horizontal scaling support

Architecture

Kavach consists of multiple components:

  • Server: Backend API service for authentication and user management
  • Web: Frontend web interface for user management and administration
  • PostgreSQL: Database for storing user data and configurations
  • Minio: Object storage for file management
  • Imgproxy: Image processing and optimization service
  • Kratos: Identity management service (Ory Kratos)
  • Oathkeeper: API gateway and proxy (Ory Oathkeeper)
  • Keto: Authorization service (Ory Keto)
  • Companion: File upload service for handling third-party integrations

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure (if persistence is enabled)

Installation

Add Helm Repository

helm repo add factly https://factly.github.io/helm-charts
helm repo update

Install Chart

# Install with default values
helm install kavach factly/kavach

# Install with custom values
helm install kavach factly/kavach -f values.yaml

# Install in specific namespace
helm install kavach factly/kavach --namespace kavach --create-namespace

Uninstallation

helm uninstall kavach

Configuration

The following table lists the configurable parameters and their default values.

Global Parameters

ParameterDescriptionDefault
nameOverrideString to partially override kavach.fullnamekavach
fullnameOverrideString to fully override kavach.fullnamekavach
namespaceOverrideOverride the deployment namespacedega
imagePullSecretsGlobal Docker registry secret names as an array[]
global.image.tagGlobal image tag override""
global.image.imagePullPolicyGlobal image pull policyIfNotPresent
global.securityContextGlobal security context{}

Server Component

ParameterDescriptionDefault
server.nameServer component nameserver
server.image.repositoryServer image repositoryfactly/kavach-server
server.image.tagServer image tag""
server.image.pullPolicyServer image pull policyIfNotPresent
server.replicaCountNumber of server replicas1
server.autoscaling.enabledEnable horizontal pod autoscaler for serverfalse
server.autoscaling.minReplicasMinimum number of server replicas1
server.autoscaling.maxReplicasMaximum number of server replicas5
server.autoscaling.targetCPUUtilizationPercentageTarget CPU utilization percentage80
server.autoscaling.targetMemoryUtilizationPercentageTarget memory utilization percentage80
server.autoMigrateEnable automatic database migrationfalse
server.createSuperOrgCreate super organization on startupfalse
server.envEnvironment variables for server[]
server.defaultApplicationsDefault applications configuration""

Server Environment Variables

Environment VariableDescriptionExample
KAVACH_IMAGEPROXY_URLImage proxy URL for image processing"https://images.factly.org"
KAVACH_MODEApplication mode"development" or "production"
KAVACH_KETO_URLKeto authorization service URL"http://keto.dega.svc.cluster.local:4466"
KAVACH_DATABASE_HOSTDatabase host"kavach-postgresql.dega.svc.cluster.local"
KAVACH_DATABASE_NAMEDatabase name"kavach"
KAVACH_DATABASE_PORTDatabase port"5432"
KAVACH_DATABASE_USERDatabase username"postgres"
KAVACH_DATABASE_PASSWORDDatabase passwordFrom secret
KAVACH_DATABASE_SSL_MODEDatabase SSL mode"disable"
KAVACH_SENDGRID_API_KEYSendGrid API key for emailFrom secret
KAVACH_DOMAIN_NAMEDomain name for the application"https://kavach.factly.org"

Server Service Parameters

ParameterDescriptionDefault
server.service.typeServer service typeClusterIP
server.service.portServer service port8000
server.service.portNameServer service port namehttp
server.service.annotationsServer service annotations{}
server.service.labelsServer service labels{}

Server ServiceAccount Parameters

ParameterDescriptionDefault
server.serviceAccount.createCreate service account for serverfalse
server.serviceAccount.annotationsServer service account annotations{}
server.serviceAccount.labelsServer service account labels{}
server.serviceAccount.nameServer service account name"kavach-server"

Server Monitoring Parameters

ParameterDescriptionDefault
server.metrics.enabledEnable metrics collection for serverfalse
server.metrics.service.typeMetrics service typeClusterIP
server.metrics.service.portMetrics service port8001
server.metrics.serviceMonitor.enabledEnable ServiceMonitor for Prometheusfalse
server.metrics.serviceMonitor.selectorServiceMonitor selector{release: monitoring}
server.metrics.serviceMonitor.intervalMetrics scrape interval30s

Web Component

ParameterDescriptionDefault
web.nameWeb component nameweb
web.image.repositoryWeb image repositoryfactly/kavach-web
web.image.tagWeb image tag""
web.image.pullPolicyWeb image pull policyIfNotPresent
web.replicaCountNumber of web replicas1
web.autoscaling.enabledEnable horizontal pod autoscaler for webfalse
web.autoscaling.minReplicasMinimum number of web replicas1
web.autoscaling.maxReplicasMaximum number of web replicas5
web.autoscaling.targetCPUUtilizationPercentageTarget CPU utilization percentage80
web.autoscaling.targetMemoryUtilizationPercentageTarget memory utilization percentage80
web.envEnvironment variables for web[]

Web Service Parameters

ParameterDescriptionDefault
web.service.typeWeb service typeNodePort
web.service.portWeb service port80
web.service.portNameWeb service port namehttp
web.service.annotationsWeb service annotations{}
web.service.labelsWeb service labels{}

Web ServiceAccount Parameters

ParameterDescriptionDefault
web.serviceAccount.createCreate service account for webfalse
web.serviceAccount.annotationsWeb service account annotations{}
web.serviceAccount.labelsWeb service account labels{}
web.serviceAccount.nameWeb service account name"kavach-web"

Health Check Parameters

ParameterDescriptionDefault
server.readinessProbe.initialDelaySecondsServer readiness probe initial delay10
server.readinessProbe.timeoutSecondsServer readiness probe timeout5
server.readinessProbe.successThresholdServer readiness probe success threshold1
server.readinessProbe.failureThresholdServer readiness probe failure threshold5
server.readinessProbe.periodSecondsServer readiness probe period10
server.livenessProbe.initialDelaySecondsServer liveness probe initial delay50
server.livenessProbe.timeoutSecondsServer liveness probe timeout5
server.livenessProbe.successThresholdServer liveness probe success threshold1
server.livenessProbe.failureThresholdServer liveness probe failure threshold5
server.livenessProbe.periodSecondsServer liveness probe period10
web.readinessProbe.*Web readiness probe parametersSame as server
web.livenessProbe.*Web liveness probe parametersSame as server

Resource Parameters

ParameterDescriptionDefault
server.resourcesServer CPU/Memory resource requests/limits{}
web.resourcesWeb CPU/Memory resource requests/limits{}
server.nodeSelectorServer node labels for pod assignment{}
server.tolerationsServer tolerations for pod assignment[]
server.affinityServer affinity settings for pod assignment{}
web.nodeSelectorWeb node labels for pod assignment{}
web.tolerationsWeb tolerations for pod assignment[]
web.affinityWeb affinity settings for pod assignment{}
server.podAnnotationsServer pod annotations{}
web.podAnnotationsWeb pod annotations{}
server.securityContextServer security context{}
web.securityContextWeb security context{}

Dependencies

PostgreSQL

ParameterDescriptionDefault
postgresql.enabledEnable PostgreSQL dependencyfalse
postgresql.image.registryPostgreSQL image registrydocker.io
postgresql.image.repositoryPostgreSQL image repositorybitnami/postgresql
postgresql.image.tagPostgreSQL image tag14.2.0-debian-10-r33
postgresql.auth.enablePostgresUserEnable postgres admin usertrue
postgresql.auth.postgresPasswordPostgreSQL postgres user password"postgres"
postgresql.auth.usernamePostgreSQL custom username""
postgresql.auth.passwordPostgreSQL custom user password""
postgresql.auth.databasePostgreSQL custom database""
postgresql.architecturePostgreSQL architecturestandalone
postgresql.primary.resources.requests.memoryPostgreSQL memory request256Mi
postgresql.primary.resources.requests.cpuPostgreSQL CPU request250m

Minio

ParameterDescriptionDefault
minio.enabledEnable Minio dependencyfalse
minio.modeMinio server modedistributed
minio.replicasNumber of Minio containers4
minio.zonesNumber of expanded Minio clusters1
minio.persistence.enabledEnable Minio persistencetrue
minio.auth.rootUserMinio root usernameadmin
minio.auth.rootPasswordMinio root passwordpassword

Imgproxy

ParameterDescriptionDefault
imgproxy.enabledEnable Imgproxy dependencyfalse

Kratos (Identity Management)

ParameterDescriptionDefault
kratos.enabledEnable Kratos dependencyfalse
kratos.kratos.automigration.enabledEnable Kratos auto-migrationtrue
kratos.kratos.config.dsnKratos database connection stringPostgreSQL connection

Oathkeeper (API Gateway)

ParameterDescriptionDefault
oathkeeper.enabledEnable Oathkeeper dependencyfalse
oathkeeper.oathkeeper.config.serve.proxy.portOathkeeper proxy port4455
oathkeeper.oathkeeper.config.serve.api.portOathkeeper API port4456

Keto (Authorization)

ParameterDescriptionDefault
keto.enabledEnable Keto dependencyfalse
keto.keto.automigration.enabledEnable Keto auto-migrationtrue
keto.keto.config.serve.read.portKeto read API port4466
keto.keto.config.serve.write.portKeto write API port4467
keto.keto.config.serve.metrics.portKeto metrics port4468
keto.keto.config.dsnKeto database connection stringPostgreSQL connection

Companion (File Upload)

ParameterDescriptionDefault
companion.enabledEnable Companion dependencyfalse

Examples

Basic Installation

# values.yaml
server:
  env:
    - name: KAVACH_MODE
      value: "production"
    - name: KAVACH_DATABASE_HOST
      value: "my-postgresql.default.svc.cluster.local"
    - name: KAVACH_DATABASE_PASSWORD
      valueFrom:
        secretKeyRef:
          name: kavach-secrets
          key: database_password

postgresql:
  enabled: true
  auth:
    postgresPassword: "secure-postgres-password"

Complete Installation with All Dependencies

# values.yaml
server:
  autoMigrate: true
  createSuperOrg: true
  env:
    - name: KAVACH_MODE
      value: "production"
    - name: KAVACH_IMAGEPROXY_URL
      value: "http://kavach-imgproxy:8080"
    - name: KAVACH_KETO_URL
      value: "http://kavach-keto:4466"
    - name: KAVACH_DATABASE_HOST
      value: "kavach-postgresql"
    - name: KAVACH_DATABASE_NAME
      value: "kavach"
    - name

Deploy kavach with OpenTenant

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