diff options
| author | 2024-05-15 22:34:41 +0200 | |
|---|---|---|
| committer | 2024-05-15 20:34:41 +0000 | |
| commit | 220e367c013efd5e4b43e96cd84d29bd3cb3ef19 (patch) | |
| tree | 819260971eb5ad98ccf85c0d2e29104bb3e4e0c9 /kubernetes/namespaces/web/pinnwand-lovelace/deployment.yaml | |
| parent | Pleasure the style dictator (#291) (diff) | |
Deploy a pinnwand instance that used lovelace's pg database (#293)
* add a deployment config for pinnwand on lovelace
* add a dns entry for the new pastebin
* Add database URI for pinnwand to connect to psql on lovelace
---------
Co-authored-by: Chris Lovering <[email protected]>
Diffstat (limited to 'kubernetes/namespaces/web/pinnwand-lovelace/deployment.yaml')
| -rw-r--r-- | kubernetes/namespaces/web/pinnwand-lovelace/deployment.yaml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/kubernetes/namespaces/web/pinnwand-lovelace/deployment.yaml b/kubernetes/namespaces/web/pinnwand-lovelace/deployment.yaml new file mode 100644 index 0000000..23bb420 --- /dev/null +++ b/kubernetes/namespaces/web/pinnwand-lovelace/deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: pinnwand-lovelace + namespace: web +spec: + replicas: 1 + selector: + matchLabels: + app: pinnwand-lovelace + template: + metadata: + labels: + app: pinnwand-lovelace + spec: + initContainers: + - name: init-service + image: busybox:latest + command: ["wget", "https://raw.githubusercontent.com/python-discord/branding/main/logos/badge/badge_512x172.png", "-O", "/tmp/logo.png"] + volumeMounts: + - name: pinnwand-lovelace-logo + mountPath: /tmp/ + containers: + - name: pinnwand-lovelace + image: ghcr.io/python-discord/pinnwand:latest-psql + command: ["venv/bin/python3", "-m", "pinnwand", "-vvvvvvvv", "--configuration-path", "/config/config.toml", "http"] + imagePullPolicy: Always + resources: + requests: + cpu: 5m + memory: 100Mi + limits: + cpu: 100m + memory: 200Mi + ports: + - containerPort: 8000 + envFrom: + - secretRef: + name: pinnwand-lovelace-postgres-connection + securityContext: + readOnlyRootFilesystem: true + volumeMounts: + - name: pinnwand-lovelace-config + mountPath: /config/ + - name: pinnwand-lovelace-logo + mountPath: /usr/app/pinnwand/static/logo.png + subPath: logo.png + volumes: + - name: pinnwand-lovelace-logo + emptyDir: {} + - name: pinnwand-lovelace-config + configMap: + name: pinnwand-lovelace-config + securityContext: + fsGroup: 2000 + runAsUser: 1000 + runAsNonRoot: true |