discount-bandit

by HelmForge

Helm chartv2.1.2App 4.0.5Apache-2.0Verified publisher

Discount Bandit price tracking for Kubernetes with MySQL, Gateway API, External Secrets, and SQLite dev mode

About this chart

Discount Bandit Helm Chart

Deploy Discount Bandit on Kubernetes using the cybrarist/discount-bandit container image.

Discount Bandit is a self-hosted price tracker for products across multiple stores. It provides a web UI, scheduled crawling, price history, currency conversion, multi-user management, and notifications through services such as Ntfy, Telegram, and Gotify.

Features

  • MySQL primary deployment path through the helmforge/mysql subchart
  • SQLite development mode for small single-replica installs
  • External MySQL/MariaDB support
  • Gateway API HTTPRoute and classic Kubernetes Ingress
  • Service dual-stack fields (ipFamilyPolicy, ipFamilies)
  • External Secrets Operator v1 integration for APP_KEY, exchange-rate key, and external database password
  • Optional NetworkPolicy for HTTP ingress, crawler egress, notification egress, DNS, and database egress
  • Optional persistent logs volume mounted at /logs
  • Optional PodDisruptionBudget
  • Kubernetes-safe Supervisor base config that removes the upstream unauthenticated Supervisor HTTP endpoint
  • Conservative runtime defaults with service account token automount disabled, RuntimeDefault seccomp, privilege escalation disabled, and explicit resources
  • Production example with MySQL, Gateway API, NetworkPolicy, and resources

Installation

helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install discount-bandit helmforge/discount-bandit -n discount-bandit --create-namespace

OCI registry:

helm install discount-bandit oci://ghcr.io/helmforgedev/helm/discount-bandit -n discount-bandit --create-namespace

Default values deploy Discount Bandit with the HelmForge MySQL subchart.

Ready-to-use examples are available in examples/production.yaml, examples/sqlite.yaml, examples/external-mysql.yaml, examples/external-secrets.yaml, and examples/gateway-api.yaml.

Access

kubectl port-forward -n discount-bandit svc/discount-bandit 8080:80

Open http://localhost:8080 and create the first admin account.

Application Listener

The FrankenPHP listener and Kubernetes Service port are independent:

PurposeProcess listenerService port
Discount Bandit HTTPcontainerPorts.http (default 80)service.port (default 80)

Changing containerPorts.http sets Laravel Octane's FrankenPHP --port option in the Supervisor configuration, updates the container port and NetworkPolicy, and keeps probes on the named http port. The Service targets that named port, so its public port can be changed separately. Custom listener ports require supervisor.configMap.enabled=true.

containerPorts:
  http: 18080
service:
  port: 18081

Production Example

discountBandit:
  appUrl: https://deals.example.com
  assetUrl: https://deals.example.com
  timezone: UTC
  themeColor: Stone

mysql:
  enabled: true
  standalone:
    persistence:
      enabled: true
      size: 20Gi

gatewayAPI:
  enabled: true
  parentRefs:
    - name: public-gateway
      namespace: gateway-system
  hostnames:
    - deals.example.com

networkPolicy:
  enabled: true
  egress:
    enabled: true
    allowDNS: true
    allowHTTPS: true
    allowSameNamespaceDatabase: true

serviceAccount:
  automountServiceAccountToken: false

resources:
  requests:
    cpu: 250m
    memory: 512Mi
  limits:
    cpu: 1000m
    memory: 1Gi

Database Modes

MySQL Subchart

MySQL is the primary default:

mysql:
  enabled: true
  auth:
    database: discount_bandit
    username: discount_bandit

The application reads the generated MySQL user password from the subchart Secret.

External MySQL

mysql:
  enabled: false

database:
  mode: external
  external:
    type: mysql
    host: mysql.example.com
    port: 3306
    name: discount_bandit
    username: discount_bandit
    existingSecret: discount-bandit-db
    existingSecretPasswordKey: database-password

SQLite Development Mode

mysql:
  enabled: false

database:
  mode: sqlite
  sqlite:
    enabled: true

persistence:
  database:
    enabled: true
    size: 5Gi

Keep replicaCount=1 with SQLite.

External Secrets

mysql:
  enabled: false

database:
  mode: external
  external:
    host: mysql.example.com
    name: discount_bandit
    username: discount_bandit

externalSecrets:
  enabled: true
  secretStoreRef:
    name: cluster-secrets
    kind: ClusterSecretStore
  app:
    enabled: true
    appKeyRemoteRef:
      key: discount-bandit/app
      property: app-key
    exchangeRateApiKeyRemoteRef:
      key: discount-bandit/app
      property: exchange-rate-api-key
  database:
    enabled: true
    passwordRemoteRef:
      key: discount-bandit/mysql
      property: password

The chart renders external-secrets.io/v1 resources.

Gateway API

gatewayAPI:
  enabled: true
  parentRefs:
    - name: public-gateway
      namespace: gateway-system
  hostnames:
    - deals.example.com

Use Gateway API when the cluster has a Gateway controller. Use ingress.enabled=true for classic Ingress controllers.

NetworkPolicy

Discount Bandit needs outbound network access for product crawling, exchange-rate API calls, and user-configured notification services. Start with networkPolicy.enabled=false, then enable egress rules once you understand the required destinations.

networkPolicy:
  enabled: true
  egress:
    enabled: true
    allowDNS: true
    allowHTTPS: true
    allowSameNamespaceDatabase: true

Key Values

KeyDefaultDescription
mysql.enabledtrueDeploy HelmForge MySQL as the primary database.
mysql.standalone.resources.requests.cpu250mDefault CPU request for the bundled MySQL pod.
mysql.standalone.resources.requests.memory512MiDefault memory request for the bundled MySQL pod.
mysql.standalone.resources.limits.cpu1000mDefault CPU limit for the bundled MySQL pod.
mysql.standalone.resources.limits.memory1GiDefault memory limit for the bundled MySQL pod.
database.modeautoDatabase mode: auto, mysql, external, or sqlite.
database.sqlite.enabledfalseEnables explicit SQLite development mode.
discountBandit.appUrl""Public application URL (APP_URL).
discountBandit.assetUrl""Public asset URL (ASSET_URL).
discountBandit.cron*/5 * * * *Product crawl schedule.
discountBandit.themeColorStoneUI theme color.
discountBandit.exchangeRateApiKey""ExchangeRate API key; prefer Secret/ExternalSecret.
containerPorts.http80FrankenPHP HTTP application listener.
service.port80Kubernetes Service port targeting the named HTTP listener.
service.ipFamilyPolicy""Optional dual-stack Service policy.
service.ipFamilies[]Optional Service IP families.
gatewayAPI.enabledfalseRender Gateway API HTTPRoute.
externalSecrets.enabledfalseEnable External Secrets Operator resources.
networkPolicy.enabledfalseRender NetworkPolicy.
serviceAccount.automountServiceAccountTokenfalseDisable Kubernetes API token mount by default.
resources.requests.cpu250mDefault CPU request for the Discount Bandit container.
resources.requests.memory512MiDefault memory request for the Discount Bandit container.
resources.limits.cpu1000mDefault CPU limit for the Discount Bandit container.
resources.limits.memory1GiDefault memory limit for the Discount Bandit container.
podSecurityContext.seccompProfile.typeRuntimeDefaultUse the Kubernetes RuntimeDefault seccomp profile.
securityContext.allowPrivilegeEscalationfalseDisable privilege escalation for the application container.
persistence.logs.enabledfalsePersist /logs instead of using emptyDir.
supervisor.configMap.enabledtrueReplace the upstream Supervisor base config with a Kubernetes-safe config.
pdb.enabledfalseRender PodDisruptionBudget.

Security Scan

Security Scan: discount-bandit

FrameworkScore
MITRE + NSA + SOC291.21%
MITRE100.00%
NSA87.50%
SOC292.00%

The remaining expected findings are tied to the upstream root runtime, writable application filesystem needs, and NetworkPolicy/firewall decisions that depend on crawler and notification destinations.

Operational Notes

  • The upstream container runs FrankenPHP, Laravel scheduler, queue worker, and Chromium-based crawlers under Supervisor.
  • Some stores require Chromium headless; review pod logs when validating product crawling.
  • The chart waits for MySQL before starting the application container in MySQL and external database modes.
  • By default the chart mounts a sanitized Supervisor base config without the upstream unauthenticated inet_http_server.
  • SQLite is suitable for development and small personal installs only.
  • Production deployments should use the MySQL subchart or external MySQL/MariaDB.
  • Enable NetworkPolicy carefully because product crawling and notifications need outbound internet access.
  • See the operations guide for runtime, database, crawler egress, routing, and validation guidance.

More Information

Deploy discount-bandit with OpenTenant

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