Helm chartv0.11.13App 0.15.1Verified publisher

A Helm chart for Dega. A lightweight, scalable & high performant CMS written in Go. Developed for modern web features with all the best practices built-in.

About this chart

Dega Helm Chart

A Helm chart for Dega - A lightweight, scalable & high performant CMS written in Go. Developed for modern web features with all the best practices built-in.

Overview

Dega is a modern content management system that consists of multiple components:

  • API: Backend API service for content management
  • Server: Core server application
  • Studio: Frontend web interface for content creation and management

This Helm chart deploys all Dega components along with optional dependencies like Meilisearch for search functionality and Imgproxy for image processing.

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 dega factly/dega

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

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

Uninstallation

helm uninstall dega

Configuration

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

Global Parameters

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

API Component

ParameterDescriptionDefault
api.nameAPI component nameapi
api.image.repositoryAPI image repositoryfactly/dega-api
api.image.tagAPI image tag""
api.image.pullPolicyAPI image pull policyIfNotPresent
api.replicaCountNumber of API replicas1
api.autoscaling.enabledEnable horizontal pod autoscalerfalse
api.autoscaling.minReplicasMinimum number of replicas1
api.autoscaling.maxReplicasMaximum number of replicas5
api.envEnvironment variables for API[]
api.service.typeAPI service typeClusterIP
api.service.portAPI service port8000
api.ingress.enabledEnable ingress for APIfalse
api.ingress.hostsAPI ingress hosts["dega-api.factly.org"]
api.resourcesAPI resource requests/limits{}

Server Component

ParameterDescriptionDefault
server.nameServer component nameserver
server.image.repositoryServer image repositoryfactly/dega-server
server.image.tagServer image tag""
server.image.pullPolicyServer image pull policyIfNotPresent
server.replicaCountNumber of server replicas1
server.autoMigrateEnable automatic database migrationfalse
server.createSuperOrgCreate super organization on startupfalse
server.autoscaling.enabledEnable horizontal pod autoscalerfalse
server.envEnvironment variables for server[]
server.service.typeServer service typeClusterIP
server.service.portServer service port8000
server.ingress.enabledEnable ingress for serverfalse
server.resourcesServer resource requests/limits{}

Studio Component

ParameterDescriptionDefault
studio.nameStudio component namestudio
studio.image.repositoryStudio image repositoryfactly/dega-studio
studio.image.tagStudio image tag""
studio.image.pullPolicyStudio image pull policyIfNotPresent
studio.replicaCountNumber of studio replicas1
studio.autoscaling.enabledEnable horizontal pod autoscalerfalse
studio.service.typeStudio service typeClusterIP
studio.service.portStudio service port80
studio.ingress.enabledEnable ingress for studiofalse
studio.resourcesStudio resource requests/limits{}

Dependencies

ParameterDescriptionDefault
imgproxy.enabledEnable Imgproxy for image processingfalse
meilisearch.enabledEnable Meilisearch for search functionalityfalse
companion.enabledEnable Companion for file uploadsfalse

Environment Variables

API Environment Variables

Configure the API component using environment variables:

api:
  env:
    - name: DEGA_API_KAVACH_URL
      value: "http://kavach-server.dega.svc.cluster.local:8000"
    - name: DEGA_API_DATABASE_HOST
      value: "postgres-postgresql.dega.svc.cluster.local"
    - name: DEGA_API_DATABASE_NAME
      value: "dega"
    - name: DEGA_API_DATABASE_USER
      value: "postgres"
    - name: DEGA_API_DATABASE_PASSWORD
      valueFrom:
        secretKeyRef:
          name: dega-api
          key: database_password

Server Environment Variables

Configure the server component:

server:
  env:
    - name: DEGA_MODE
      value: "development"
    - name: DEGA_KAVACH_URL
      value: "http://kavach-server.dega.svc.cluster.local:8000"
    - name: DEGA_DATABASE_HOST
      value: "postgres-postgresql.dega.svc.cluster.local"
    - name: DEGA_DATABASE_NAME
      value: "dega"
    - name: DEGA_CREATE_SUPER_ORGANISATION
      value: "true"
    - name: DEGA_SUPER_ORGANISATION_TITLE
      value: "Super Organisation"

Ingress Configuration

Enable ingress for external access:

api:
  ingress:
    enabled: true
    annotations:
      kubernetes.io/ingress.class: nginx
      cert-manager.io/cluster-issuer: "letsencrypt-prod"
    hosts:
      - dega-api.example.com
    tls:
      - secretName: dega-api-tls
        hosts:
          - dega-api.example.com

server:
  ingress:
    enabled: true
    hosts:
      - dega-server.example.com
    tls:
      - secretName: dega-server-tls
        hosts:
          - dega-server.example.com

studio:
  ingress:
    enabled: true
    hosts:
      - dega.example.com
    tls:
      - secretName: dega-studio-tls
        hosts:
          - dega.example.com

Monitoring

Enable Prometheus monitoring:

api:
  metrics:
    enabled: true
    serviceMonitor:
      enabled: true
      selector:
        release: monitoring

server:
  metrics:
    enabled: true
    serviceMonitor:
      enabled: true
      selector:
        release: monitoring

Autoscaling

Enable horizontal pod autoscaling:

api:
  autoscaling:
    enabled: true
    minReplicas: 2
    maxReplicas: 10
    targetCPUUtilizationPercentage: 80

server:
  autoscaling:
    enabled: true
    minReplicas: 2
    maxReplicas: 10
    targetCPUUtilizationPercentage: 80

studio:
  autoscaling:
    enabled: true
    minReplicas: 2
    maxReplicas: 10
    targetCPUUtilizationPercentage: 80

Resource Management

Configure resource requests and limits:

api:
  resources:
    limits:
      cpu: 500m
      memory: 1Gi
    requests:
      cpu: 100m
      memory: 256Mi

server:
  resources:
    limits:
      cpu: 1
      memory: 2Gi
    requests:
      cpu: 200m
      memory: 512Mi

studio:
  resources:
    limits:
      cpu: 200m
      memory: 512Mi
    requests:
      cpu: 50m
      memory: 128Mi

Health Checks

The chart includes configurable readiness and liveness probes:

api:
  readinessProbe:
    initialDelaySeconds: 10
    timeoutSeconds: 5
    periodSeconds: 10
  livenessProbe:
    initialDelaySeconds: 50
    timeoutSeconds: 5
    periodSeconds: 10

Security

Configure security contexts and service accounts:

global:
  securityContext:
    runAsUser: 999
    runAsGroup: 999
    fsGroup: 999

api:
  serviceAccount:
    create: true
    annotations: {}
  securityContext:
    capabilities:
      drop:
      - ALL
    readOnlyRootFilesystem: true
    runAsNonRoot: true
    runAsUser: 1000

Troubleshooting

Common Issues

  1. Pod fails to start: Check resource limits and node capacity
  2. Database connection issues: Verify database credentials and connectivity
  3. Ingress not working: Ensure ingress controller is installed and configured

Debugging Commands

# Check pod status
kubectl get pods -l app.kubernetes.io/name=dega

# View pod logs
kubectl logs -l app.kubernetes.io/name=dega -c api
kubectl logs -l app.kubernetes.io/name=dega -c server
kubectl logs -l app.kubernetes.io/name=dega -c studio

# Describe pod for events
kubectl describe pod <pod-name>

# Check services
kubectl get svc -l app.kubernetes.io/name=dega

# Check ingress
kubectl get ingress -l app.kubernetes.io/name=dega

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test the changes
  5. Submit a pull request

License

This chart is licensed under the Apache License 2.0.

Maintainers

  • deshetti
  • shreeharsha-factly

Chart Information

  • Chart Version: 0.11.12
  • App Version: 0.15.1
  • Kubernetes Version: 1.19+
  • Helm Version: 3.2.0+

For more information about Dega, visit the official documentation.

Deploy dega with OpenTenant

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