spoolman
by tina.junold
Spoolman is a self-hosted web service designed to help you efficiently manage your 3D printer filament spools and monitor their usage.
About this chart
spoolman
Spoolman is a self-hosted web service designed to help you efficiently manage your 3D printer filament spools and monitor their usage.
Homepage: https://gitlab.com/ideaplexus/charts
Maintainers
| Name | Url | |
|---|---|---|
| Tina Junold | [email protected] | https://ideaplexus.com |
Source Code
Requirements
| Repository | Name | Version |
|---|---|---|
| https://charts.ideaplexus.com | common | 1.1.0 |
Database
Spoolman supports SQLite, PostgreSQL, MySQL/MariaDB and CockroachDB. This chart
deploys no database of its own: with the default database.type: sqlite it
stores everything in a file under the data directory, and for anything else you
point it at a database you run yourself.
Note that MariaDB uses type: mysql -- that is the value Spoolman expects.
SQLite, the default
Nothing to configure. Enable persistence so the file survives a restart:
persistence:
enabled: true
size: 1Gi
An existing database, password managed by the chart
The password goes into a secret the chart creates. It is mounted read-only and
reaches the container as SPOOLMAN_DB_PASSWORD_FILE, so it never appears in the
process environment.
persistence:
enabled: false
database:
type: postgres
host: postgres.databases.svc.cluster.local
port: 5432
name: spoolman
username: spoolman
password: change-me
An existing database, credentials from your own secret
Preferred when the password is managed elsewhere, for example by an operator, External Secrets or SOPS. The chart then creates no secret of its own.
database:
type: mysql
host: mariadb.databases.svc.cluster.local
port: 3306
name: spoolman
username: spoolman
existingSecret: spoolman-db-credentials
existingSecretPasswordKey: db-password
kubectl create secret generic spoolman-db-credentials \
--from-literal=db-password='change-me'
A database deployed alongside the release
database.host is evaluated as a template, so it can reference the release it
is installed with. With CloudNativePG, whose
cluster secret already carries a password key:
database:
type: postgres
host: "{{ .Release.Name }}-pg-rw"
port: 5432
name: spoolman
username: spoolman
existingSecret: "{{ .Release.Name }}-pg-app"
existingSecretPasswordKey: password
Connecting over a socket
database.query is appended to the connection URL:
database:
type: mysql
host: localhost
name: spoolman
username: spoolman
query: "unix_socket=/var/run/mysqld/mysqld.sock"
What is checked
Rendering fails with a named error rather than producing a connection Spoolman
cannot use, when database.type is not sqlite and
database.hostis empty,database.nameis empty, or- both
database.passwordanddatabase.existingSecretare set.
Probes
All three probes are configurable, and a startupProbe is enabled by default.
While it runs, the liveness and readiness probes are not evaluated, so a slow
first start -- Spoolman runs its database migration there -- cannot be
interrupted. Its defaults allow roughly five minutes.
startupProbe:
enabled: true
periodSeconds: 10
failureThreshold: 30 # 30 * 10s before the container is restarted
To replace a probe wholesale, for a different endpoint or an exec check, disable
the built-in one and set its custom counterpart:
livenessProbe:
enabled: false
customLivenessProbe:
httpGet:
path: /api/v1/health
port: http
periodSeconds: 30
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | Affinity for pod assignment |
| args | list | [] | Override default container args (useful when using custom images) |
| clusterDomain | string | "cluster.local" | Default Kubernetes cluster domain |
| command | list | [] | Override default container command (useful when using custom images) |
| commonAnnotations | object | {} | Annotations to add to all deployed resources |
| commonLabels | object | {} | Labels to add to all deployed resources |
| containerPorts.http | string | "8000" | HTTP port |
| containerSecurityContext.allowPrivilegeEscalation | bool | false | Set Spoolman container's Security Context allowPrivilegeEscalation |
| containerSecurityContext.capabilities.drop | list | ["ALL"] | List of capabilities to be dropped |
| containerSecurityContext.enabled | bool | false | Enable or disable Spoolman containers' Security Context |
| containerSecurityContext.privileged | bool | false | Set Spoolman container's Security Context privileged |
| containerSecurityContext.readOnlyRootFilesystem | bool | true | Set Spoolman container's Security Context readOnlyRootFilesystem |
| containerSecurityContext.runAsGroup | int | 1000 | Set Spoolman containers' Security Context runAsGroup |
| containerSecurityContext.runAsNonRoot | bool | true | Set Controller container's Security Context runAsNonRoot |
| containerSecurityContext.runAsUser | int | 1000 | Set Spoolman containers' Security Context runAsUser |
| containerSecurityContext.seLinuxOptions | object | {} | Set SELinux options in container |
| containerSecurityContext.seccompProfile.type | string | "RuntimeDefault" | |
| customLivenessProbe | object | {} | A complete probe replacing the built-in livenessProbe. Only used when livenessProbe.enabled is false. |
| customReadinessProbe | object | {} | A complete probe replacing the built-in readinessProbe. Only used when readinessProbe.enabled is false. |
| customStartupProbe | object | {} | A complete probe replacing the built-in startupProbe. Only used when startupProbe.enabled is false. |
| database.existingSecret | string | "" | Name of an existing secret holding the password, instead of letting the chart create one. Evaluated as a template. |
| database.existingSecretPasswordKey | string | "password" | Key inside the secret that holds the password |
| database.host | string | "" | Database host. Evaluated as a template, so {{ .Release.Name }}-postgresql works. Required unless type is sqlite. |
| database.name | string | "spoolman" | Database name. Required unless type is sqlite. |
| database.password | string | "" | Database password. Stored in a generated secret and mounted as a file, never passed through the environment. Mutually exclusive with existingSecret. |
| database.port | string | "" | Database port. Left out when empty, so the driver's default applies. |
| database.query | string | "" | Extra connection parameters, for example unix_socket=/var/run/mysqld/mysqld.sock |
| database.type | string | "sqlite" | Database backend. Use mysql for MariaDB. With sqlite no other field applies. |
| database.username | string | "spoolman" | Database user |
| extraDeploy | list | [] | Array of extra objects to deploy with the release |
| extraEnvVars | list | [] | Extra environment variables |
| extraEnvVarsCM | list | [] | ConfigMaps containing extra env vars |
| extraEnvVarsSecret | list | [] | Secret containing extra env vars (in case of sensitive data) |
| fullnameOverride | string | "" | String to fully override common.names.fullname template |
| global.defaultStorageClass | string | "" | Global default StorageClass for Persistent Volume(s) |
| global.imagePullSecrets | list | [] | Global Docker registry secret names |
| global.imageRegistry | string | "" | Global Docker image registry |
| image.digest | string | "" | Spoolman image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag |
| image.pullPolicy | string | "IfNotPresent" | Spoolman image pull policy |
| image.pullSecrets | list | [] | Spoolman image pull secrets |
| image.registry | string | "ghcr.io" | Spoolman image registry |
| image.repository | string | "donkie/spoolman" | Spoolman image repository |
| image.tag | string | "" | Spoolman image tag |
| ingress.annotations | object | {} | Additional annotations for the Ingress resource. |
| ingress.apiVersion | string | "" | Override API Version (automatically detected if not set) |
| ingress.enabled | bool | false | Set to true to enable ingress record generation |
| ingress.extraHosts | list | [] | ingress.extraHosts The list of additional hostnames to be covered with this ingress record. |
| ingress.extraPaths | list | [] | Any additional arbitrary paths that may need to be added to the ingress under the main host. |
| ingress.extraRules | list | [] | Additional rules to be covered with this ingress record |
| ingress.extraTls | list | [] | The tls configuration for additional hostnames to be covered with this ingress record. |
| ingress.hostname | string | "spoolman.local" | When the ingress is enabled, a host pointing to this will be created |
| ingress.ingressClassName | string | "" | IngressClass that will be used to implement the Ingress (Kubernetes 1.18+) |
| ingress.path | string | "/" | Default path for the ingress resource |
| ingress.pathType | string | "ImplementationSpecific" | Ingress Path type |
| ingress.secrets | list | [] | Extra secrets |
| ingress.selfSigned | bool | false | Create a TLS secret for this ingress record using self-signed certificates generated by Helm |
| ingress.tls | bool | false | Enable TLS configuration for the hostname |
| kubeVersion | string | "" | Force target Kubernetes version (using Helm capabilities if not set) |
| livenessProbe.enabled | bool | true | Enable the built-in livenessProbe. initialDelaySeconds can stay at 0 while the startup probe is enabled; without it, raise this to cover the first start. |
| livenessProbe.failureThreshold | int | 6 | Consecutive failures tolerated before the check counts as failed |
| livenessProbe.initialDelaySeconds | int | 0 | Seconds to wait before the first check |
| livenessProbe.periodSeconds | int | 10 | Seconds between checks |
| livenessProbe.successThreshold | int | 1 | Consecutive successes needed after a failure |
| livenessProbe.timeoutSeconds | int | 5 | Seconds after which a check times out |
| nameOverride | string | "" | String to partially override common.names.fullname template (will maintain the release name) |
| namespaceOverride | string | "" | String to override the common.names.namespace template |
| nodeAffinityPreset | object | {"key":"","type":"","values":[]} | Node affinity preset |
| nodeAffinityPreset.key | string | "" | Node label key to match Ignored if affinity is set. |
| nodeAffinityPreset.type | string | "" | Node affinity preset type. Ignored if affinity is set. Allowed values: soft or hard |
| nodeAffinityPreset.values | list | [] | Node label values to match. Ignored if affinity is set. |
| nodeSelector | object | {} | Node labels for pod assignment. Evaluated as a template |
| persistence.accessMode | string | "ReadWriteOnce" | Persistent Volume Access Mode |
| persistence.accessModes | list | [] | Persistent Volume Access Modes |
| persistence.annotations | object | {} | Persistent Volume Claim annotations |
| persistence.dataSource | object | {} | Custom PVC data source |
| persistence.enabled | bool | false | Enable persistence |
| persistence.existingClaim | string | "" | A manually managed Persistent Volume Claim |
| persistence.finalizers | list | ["kubernetes.io/pvc-protection"] | PVC finalizers |
| persistence.hostPath | string | "" | If defined, the spoolman-data volume will mount to the specified hostPath. |
| persistence.lookupVolumeName | bool | true | If 'lookupVolumeName' is set to true, Helm will attempt to retrieve the current value of 'spec.volumeName' and incorporate it into the template. |
| persistence.selector | object | {} | Selector to match an existing Persistent Volume for Spoolman data PVC |
| persistence.size | string | "1Gi" | PVC Storage Request Size for Spoolman volume |
| persistence.storageClass | string | "" | Storage class to use with the PVC |
| persistence.type | string | "pvc" | Persistence type |
| podAffinityPreset | string | "" | Pod affinity preset. Ignored if affinity is set. Allowed values: soft or hard |
| podAnnotations | object | {} | Pod annotations |
| podAntiAffinityPreset | string | "soft" | Pod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hard |
| podLabels | object | {} | Pod labels |
| podManagementPolicy | string | "" | podManagementPolicy to manage scaling operation of Spoolman pods |
| podSecurityContext.enabled | bool | true | Enable or disable Spoolman pods' Security Context |
| podSecurityContext.fsGroup | int | 1000 | Spoolman pods' group ID |
| podSecurityContext.fsGroupChangePolicy | string | "Always" | Set filesystem group change policy |
| podSecurityContext.supplementalGroups | list | [] | Set filesystem extra groups |
| podSecurityContext.sysctls | list | [] | Set kernel settings using the sysctl interface |
| priorityClassName | string | "" | Spoolman pods' priorityClassName |
| readinessProbe.enabled | bool | true | Enable the built-in readinessProbe. |
| readinessProbe.failureThreshold | int | 6 | Consecutive failures tolerated before the check counts as failed |
| readinessProbe.initialDelaySeconds | int | 0 | Seconds to wait before the first check |
| readinessProbe.periodSeconds | int | 10 | Seconds between checks |
| readinessProbe.successThreshold |
Deploy spoolman with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has spoolman 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 chartspoolman is pinned at v2.11.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