All templates

Grafana

Dashboards over Prometheus, Postgres, Loki and everything else. Config in Postgres so the pod is disposable.

Added by LeafdTK, 28 Sept 2026 v1.0.0 AGPL-3.0-only monitoring #dashboards#metrics#observability

Resources

Grafana

LeafdTK1 deployment1 database1 domainv1.0.0

3
  • db

    postgres

    Ready

  • app

    grafana/grafana-oss:latest

    Running

  • ingress

    grafana.example.com

    Live

Parameters

YAML

grafana.yaml v1.0.0
apiVersion: leaf/v1
kind: Template
metadata:
  name: grafana
  displayName: 'Grafana'
  description: 'Dashboards over Prometheus, Postgres, Loki and everything else. Config in Postgres so the pod is disposable.'
  icon: https://github.com/grafana.png?size=256
  version: '1.0.0'
  category: monitoring
  tags: ['dashboards', 'metrics', 'observability']
  keywords: ['prometheus', 'loki', 'charts', 'monitoring dashboards']
  homepage: https://grafana.com
  license: AGPL-3.0-only

parameters:
  - name: appName
    displayName: 'App Name'
    type: string
    default: 'grafana'
    required: true
    validation:
      pattern: '^[a-z][a-z0-9-]{1,58}[a-z0-9]$'
      message: 'Must be lowercase alphanumeric with hyphens, 3-60 chars'
  - name: domain
    displayName: 'Domain'
    type: string
    required: true
    placeholder: 'grafana.example.com'
  - name: adminUser
    displayName: 'Admin Username'
    type: string
    default: 'admin'
    required: true
  - name: adminPassword
    displayName: 'Admin Password'
    description: 'Generated if left empty'
    type: secret
    validation:
      min: 16
  - name: allowSignup
    displayName: 'Allow sign-up'
    type: boolean
    default: false
  - name: anonymous
    displayName: 'Anonymous viewing'
    type: boolean
    default: false
  - name: plugins
    displayName: 'Install plugins'
    type: string
    default: ''
    placeholder: 'grafana-clock-panel,grafana-piechart-panel'
  - name: smtpHost
    displayName: 'SMTP host'
    description: 'Outgoing mail for alerts. Optional.'
    type: string
    default: ''
    placeholder: 'smtp.example.com'
  - name: smtpPort
    displayName: 'SMTP port'
    type: number
    default: 587
  - name: smtpUser
    displayName: 'SMTP username'
    type: string
    default: ''
    placeholder: '[email protected]'
  - name: smtpPassword
    displayName: 'SMTP password'
    type: string
    default: ''
    placeholder: 'app password'
  - name: mailFrom
    displayName: 'From address'
    type: string
    default: ''
    placeholder: '[email protected]'
  - name: enableTls
    displayName: 'Enable HTTPS'
    type: boolean
    default: true

resources:
  - name: db
    type: database
    config:
      name: '{{ params.appName }}-db'

  - name: app
    type: deployment
    config:
      name: '{{ params.appName }}'
      image: grafana/grafana-oss:latest
      replicas: 1
      ports:
        - name: http
          containerPort: 3000
          servicePort: 3000
          protocol: TCP
      volumes:
        - name: data
          type: pvc
          mountPath: /var/lib/grafana
          storageSize: '2Gi'
      env:
        - key: GF_SERVER_ROOT_URL
          value: 'https://{{ params.domain }}'
        - key: GF_SECURITY_ADMIN_USER
          value: '{{ params.adminUser }}'
        - key: GF_SECURITY_ADMIN_PASSWORD
          value: '{{ params.adminPassword }}'
          secret: true
        - key: GF_USERS_ALLOW_SIGN_UP
          value: '{{ params.allowSignup }}'
        - key: GF_AUTH_ANONYMOUS_ENABLED
          value: '{{ params.anonymous }}'
        - key: GF_INSTALL_PLUGINS
          value: '{{ params.plugins }}'
        - key: GF_DATABASE_TYPE
          value: postgres
        - key: GF_DATABASE_HOST
          value: '{{ resources.db.host }}:{{ resources.db.port }}'
        - key: GF_DATABASE_NAME
          value: '{{ resources.db.dbName }}'
        - key: GF_DATABASE_USER
          value: '{{ resources.db.dbUser }}'
        - key: GF_DATABASE_PASSWORD
          value: '{{ resources.db.dbPassword }}'
          secret: true
        - key: GF_DATABASE_SSL_MODE
          value: disable
        - key: GF_SMTP_ENABLED
          value: 'true'
        - key: GF_SMTP_HOST
          value: '{{ params.smtpHost }}'
        - key: GF_SMTP_PORT
          value: '{{ params.smtpPort }}'
        - key: GF_SMTP_USER
          value: '{{ params.smtpUser }}'
        - key: GF_SMTP_PASSWORD
          value: '{{ params.smtpPassword }}'
          secret: true
        - key: GF_SMTP_FROM_ADDRESS
          value: '{{ params.mailFrom }}'

  - name: ingress
    type: ingress
    config:
      host: '{{ params.domain }}'
      tlsEnabled: '{{ params.enableTls }}'
      routes:
        - path: /
          serviceName: '{{ resources.app.serviceName }}'
          servicePort: 3000

your own cloud, in one click.

Free and open source. Runs on any Linux box.

Install Orchard