snipeit
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:
- MariaDB Operator (Recommended): Uses the mariadb-operator to manage MariaDB instances
- 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
| Parameter | Default | Description |
|---|---|---|
snipeit.config.url | http://snipeit.example.com | Application URL for Snipe-IT |
snipeit.config.timezone | Europe/Berlin | Application timezone |
snipeit.config.locale | en | Application locale |
snipeit.config.env | production | Application environment |
snipeit.config.debug | false | Enable debug mode |
snipeit.entrypointOverride.enabled | true | Uses a custom entypoint which removes the chown commands to allow it to run rootless |
snipeit.image.repository | docker.io/snipe/snipe-it | Container image repository |
snipeit.image.tag | see values | Container image tag |
snipeit.persistence.size | 2Gi | Persistent volume size |
snipeit.persistence.storageClass | longhorn | Storage class for PVC |
replicaCount | 1 | Number of replicas |
Service Account
| Parameter | Default | Description |
|---|---|---|
serviceAccount.create | false | Create 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
| Parameter | Default | Description |
|---|---|---|
mariadbOperator.enabled | false | Enable MariaDB Operator integration |
mariadbOperator.database | snipeit | Database name to create |
mariadbOperator.username | snipeit | Database username to create |
mariadbOperator.password | snipeitdbsecret | Database password |
mariadbOperator.storageClass | longhorn | Storage class for MariaDB |
mariadbOperator.useExisting.enabled | false | Use existing MariaDB instance |
mariadbOperator.useExisting.namespace | - | Namespace of existing MariaDB |
mariadbOperator.useExisting.mariaDbRef | - | Name of existing MariaDB CR |
Database Configuration - External Database
| Parameter | Default | Description |
|---|---|---|
externalDB.enabled | false | Use 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
| Parameter | Default | Description |
|---|---|---|
ingress.enabled | false | Enable Ingress |
ingress.className | "" | Ingress class name (e.g., nginx) |
ingress.annotations | {} | Ingress annotations |
ingress.hosts | See values.yaml | Ingress hosts configuration |
ingress.tls | [] | TLS configuration |
Gateway API Configuration
| Parameter | Default | Description |
|---|---|---|
httpRoute.enabled | false | Enable GW API httpRoute |
httpRoute.annotations | {} | http Route annotations |
httpRoute.hostnames | {hostnames: [snipeit.example.com]} | Hostname |
httpRoute.parentRefs | See values.yaml | httproute parent ref |
httpRoute.matches | See values.yaml | Match 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:
- A pre-upgrade Job generates a new key using
php artisan key:generate - The key is stored as a Kubernetes Secret
- Upgrades check for the existing secret and preserve it
- 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:
- Backup your data before proceeding
- Export your existing database
- Install MariaDB Operator on your cluster
- Update your values file to use
mariadbOperator.enabled: true - Deploy the new chart version
- 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartsnipeit is pinned at v2.2.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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