snipeit

by Syntax3rror404

Helm chartv2.2.1App 8.8.4Verified publisher

A Helm chart for providing snipe-it to kubernetes

About this chart

helm-charts/snipeit

Snipe-IT is open source software. Transparency, security and oversight is at the heart of everything we do. No vendor lock-in again, ever.

Introduction

This Helm chart deploys Snipe-IT on Kubernetes using the official Snipe-IT container image. It is secured by default with pod / security context.

Database Options

The chart supports two database configuration methods:

  1. MariaDB Operator (Recommended): Uses the mariadb-operator to manage MariaDB instances
  2. External Database: Connect to an existing database outside of this chart

Important: The MariaDB Operator must be pre-installed on your Kubernetes cluster if you choose option 1.

In short:

helm repo add mariadb-operator https://helm.mariadb.com/mariadb-operator
helm install mariadb-operator-crds mariadb-operator/mariadb-operator-crds
helm install mariadb-operator mariadb-operator/mariadb-operator

Key Features

  • Automatic Laravel APP_KEY generation and secure storage as Kubernetes secret
  • Supports both new MariaDB instances and existing MariaDB deployments managed by the operator
  • Persistent storage for application data, sessions, and backups
  • StatefulSet deployment for data consistency
  • Optional Ingress configuration
  • Health probes for high availability

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.0+
  • MariaDB Operator installed (if using mariadbOperator.enabled: true)
    • Installation guide: https://github.com/mariadb-operator/mariadb-operator

Installation

HTTPS

helm repo add syntax3rror404 https://syntax3rror404.github.io/helm-charts/charts
helm repo update
helm install snipeit syntax3rror404/snipeit -n snipeit --create-namespace -f myvalues.yaml

OCI

helm install snipeit oci://ghcr.io/syntax3rror404/helm-charts/snipeit --version <version> -n snipeit --create-namespace -f myvalues.yaml

Note: A simple install uses default values like example.com for URLs and default passwords. You must create your own values file for production use.

Upgrade

helm upgrade snipeit syntax3rror404/snipeit -n snipeit

Note: The APP_KEY secret is automatically preserved during upgrades and will not be overwritten.

Uninstall

# Remove the Helm release
helm uninstall snipeit -n snipeit

# Delete the namespace (optional - this will remove all resources including PVCs)
kubectl delete ns snipeit

Configuration

Core Configuration Values

ParameterDefaultDescription
snipeit.config.urlhttp://snipeit.example.comApplication URL for Snipe-IT
snipeit.config.timezoneEurope/BerlinApplication timezone
snipeit.config.localeenApplication locale
snipeit.config.envproductionApplication environment
snipeit.config.debugfalseEnable debug mode
snipeit.entrypointOverride.enabledtrueUses a custom entypoint which removes the chown commands to allow it to run rootless
snipeit.image.repositorydocker.io/snipe/snipe-itContainer image repository
snipeit.image.tagsee valuesContainer image tag
snipeit.persistence.size2GiPersistent volume size
snipeit.persistence.storageClasslonghornStorage class for PVC
replicaCount1Number of replicas

Service Account

ParameterDefaultDescription
serviceAccount.createfalseCreate a ServiceAccount for the Snipe-IT StatefulSet. The namespace's default account is never created by this chart.
serviceAccount.name""ServiceAccount to use. If empty, use the chart's full name when create is true, or the namespace's default account otherwise.
serviceAccount.annotations{}Annotations on the created ServiceAccount, such as the AWS IRSA role ARN.

Set serviceAccount.create: true to create a dedicated account. To use an existing account in the release namespace, set serviceAccount.name and leave serviceAccount.create disabled.

For AWS IAM Roles for Service Accounts (IRSA):

serviceAccount:
  create: true
  annotations:
    eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/snipeit

For an existing ServiceAccount, manage its annotations outside this chart.

Database Configuration - MariaDB Operator

ParameterDefaultDescription
mariadbOperator.enabledfalseEnable MariaDB Operator integration
mariadbOperator.databasesnipeitDatabase name to create
mariadbOperator.usernamesnipeitDatabase username to create
mariadbOperator.passwordsnipeitdbsecretDatabase password
mariadbOperator.storageClasslonghornStorage class for MariaDB
mariadbOperator.useExisting.enabledfalseUse existing MariaDB instance
mariadbOperator.useExisting.namespace-Namespace of existing MariaDB
mariadbOperator.useExisting.mariaDbRef-Name of existing MariaDB CR

Database Configuration - External Database

ParameterDefaultDescription
externalDB.enabledfalseUse external database
externalDB.username-Database username (supports valueFrom)
externalDB.password-Database password (supports valueFrom)
externalDB.database-Database name (supports valueFrom)
externalDB.host-Database host (supports valueFrom)

Ingress Configuration

ParameterDefaultDescription
ingress.enabledfalseEnable Ingress
ingress.className""Ingress class name (e.g., nginx)
ingress.annotations{}Ingress annotations
ingress.hostsSee values.yamlIngress hosts configuration
ingress.tls[]TLS configuration

Gateway API Configuration

ParameterDefaultDescription
httpRoute.enabledfalseEnable GW API httpRoute
httpRoute.annotations{}http Route annotations
httpRoute.hostnames{hostnames: [snipeit.example.com]}Hostname
httpRoute.parentRefsSee values.yamlhttproute parent ref
httpRoute.matchesSee values.yamlMatch configuration

Configuration Examples

Example 1: New MariaDB Instance with Ingress

# myvalues.yaml
mariadbOperator:
  enabled: true
  database: snipeit
  username: snipeit
  password: "changeMe123!"
  storageClass: longhorn

snipeit:
  config:
    url: https://snipeit.mycompany.com
    timezone: Europe/Berlin
    locale: de
  persistence:
    size: 20Gi
    storageClass: longhorn

ingress:
  enabled: true
  className: nginx
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
  hosts:
    - host: snipeit.mycompany.com
      paths:
        - path: /
          pathType: Prefix
  tls: 
    - secretName: snipeit-tls
      hosts:
        - snipeit.mycompany.com

Example 2: Using Existing MariaDB Instance

# myvalues.yaml
mariadbOperator:
  enabled: true
  database: snipeit
  username: snipeit
  password: "changeMe123!"
  useExisting:
    enabled: true
    namespace: database
    mariaDbRef: mariadb-shared

snipeit:
  config:
    url: https://assets.mycompany.com
  persistence:
    size: 10Gi
    storageClass: ceph-block

ingress:
  enabled: true
  className: nginx
  hosts:
    - host: assets.mycompany.com
      paths:
        - path: /
          pathType: Prefix

Example 3: External Database

# myvalues.yaml
externalDB:
  enabled: true
  username:
    value: snipeit_user
  password:
    valueFrom:
      secretKeyRef:
        name: db-credentials
        key: password
  database:
    value: snipeit_production
  host:
    value: mysql.database.svc.cluster.local

snipeit:
  config:
    url: https://snipeit.example.com
  persistence:
    size: 5Gi

Architecture

StatefulSet Deployment

The chart uses a StatefulSet to ensure:

  • Stable network identity
  • Persistent storage attached to each pod
  • Ordered deployment and scaling

Persistent Volumes

Three volume mounts are configured by default:

  • /var/lib/snipeit - Main application data
  • /var/www/html/storage/framework/sessions - PHP sessions
  • /var/www/html/storage/app/backups - Application backups

APP_KEY Management

The Laravel APP_KEY is automatically generated on first installation:

  1. A pre-upgrade Job generates a new key using php artisan key:generate
  2. The key is stored as a Kubernetes Secret
  3. Upgrades check for the existing secret and preserve it
  4. Manual intervention is required if you need to regenerate the key

Troubleshooting

Database Connection Issues

Check the database connectivity:

# Check pod logs
kubectl logs -n snipeit -l app.kubernetes.io/name=snipeit

# Verify MariaDB Operator resources
kubectl get mariadb,database,user,grant -n snipeit

APP_KEY Issues

If you need to regenerate the APP_KEY:

# Delete the existing secret
kubectl delete secret laravel-app-key -n snipeit

# Trigger a Helm upgrade to regenerate
helm upgrade snipeit syntax3rror404/snipeit -n snipeit

Persistent Volume Issues

Check PVC status:

kubectl get pvc -n snipeit
kubectl describe pvc <pvc-name> -n snipeit

Migration from Bitnami MariaDB

If you're migrating from the previous version using Bitnami MariaDB as a dependency:

  1. Backup your data before proceeding
  2. Export your existing database
  3. Install MariaDB Operator on your cluster
  4. Update your values file to use mariadbOperator.enabled: true
  5. Deploy the new chart version
  6. Import your database backup

Support and Contributing

  • Issues: https://github.com/Syntax3rror404/helm-charts/issues
  • Source Code: https://github.com/Syntax3rror404/helm-charts
  • Snipe-IT Project: https://github.com/snipe/snipe-it

Deploy snipeit with OpenTenant

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