Skip to content

gateway-secret.example.yaml

Download gateway-secret.example.yaml as it is.

deploy/kubernetes/gateway-secret.example.yaml
# An example only, not in kustomization.yaml: applying it would overwrite
# the real Secrets with placeholders. Create them out of band instead
# (the Kubernetes guide, Run it: kubectl create secret; or Sealed Secrets, External
# Secrets...). Never commit real values. The keys below are the ones the
# manifests read.
apiVersion: v1
kind: Secret
metadata:
name: houradvantage-gateway
labels:
app.kubernetes.io/name: houradvantage
app.kubernetes.io/component: gateway
type: Opaque
stringData:
# The external (managed) Postgres. Every replica holds a pool of
# connections; see the Kubernetes guide for the max_connections arithmetic.
database-url: "postgres://houradvantage:[email protected]:5432/houradvantage?sslmode=require"
# Behind PgBouncer in transaction mode, database-url is PgBouncer's, and
# the database's own goes here (also add the key to the Deployment's
# secret items, and HOURADVANTAGE_DATABASE_SESSION_URL_FILE to its env):
# database-session-url: "postgres://houradvantage:[email protected]:5432/houradvantage?sslmode=require"
# The database's role must carry the TCP keepalives (tcp_keepalives_idle,
# _interval, _count and tcp_user_timeout) and no statement_timeout,
# lock_timeout or idle_in_transaction_session_timeout (Operations, Database
# role settings).
# The admin login, required because the admin API listens off loopback.
# The hash comes from `houradm hash-password`.
admin-username: "admin"
admin-password-hash: "CHANGE-ME"
# Seals the secrets kept in the database (broker passwords, webhook
# secrets, device keys); every replica shares it. Make it with
# `houradm gen-secret-key` and back it up: what it sealed cannot be read
# without it. To change it, put the new key here and the old one, one per
# line, as secret-keys-old (and HOURADVANTAGE_SECRET_KEYS_OLD_FILE in the
# Deployment, with the key added to the mounted items), and roll the pods.
# They keep sealing with the old key until every running pod has the new
# one, then seal everything again with it; after that the old key can go.
secret-key: "CHANGE-ME"
---
# The plain admin password, for the setup Job (hourctl) only: the
# gateway pods never see it.
apiVersion: v1
kind: Secret
metadata:
name: houradvantage-setup
labels:
app.kubernetes.io/name: houradvantage
app.kubernetes.io/component: setup
type: Opaque
stringData:
admin-password: "CHANGE-ME"