mirror of
https://github.com/outbackdingo/Biohazard.git
synced 2026-01-27 18:18:26 +00:00
fix(redbot): switch to PVC
This commit is contained in:
@@ -21,37 +21,26 @@ spec:
|
||||
replicas: 1
|
||||
pod:
|
||||
labels:
|
||||
db.home.arpa/pg: "pg-default"
|
||||
egress.home.arpa/discord: "allow"
|
||||
containers:
|
||||
main:
|
||||
image: &img
|
||||
repository: "jank.ing/jjgadgets/redbot"
|
||||
tag: "3.5.5@sha256:07da705d7113fe2c7e7f48aa5f2d5105fbf23c01b27b2808f457898c19636a00"
|
||||
args: [
|
||||
# args specific to my image
|
||||
"--init",
|
||||
# RedBot args
|
||||
"--mentionable"
|
||||
]
|
||||
env:
|
||||
TZ: "${CONFIG_TZ}"
|
||||
NAME: "JJGadgets"
|
||||
PREFIX: "yui."
|
||||
PREFIXES: "yui. y."
|
||||
TOKEN_FILE: &token "/secrets/token"
|
||||
OWNER_FILE: &owner "/secrets/owner"
|
||||
BASE_PATH: &path "/config"
|
||||
STORAGE_TYPE: "Postgres"
|
||||
PGHOST:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: &pgsec "pg-default-pguser-redbot"
|
||||
key: "pgbouncer-host"
|
||||
PGDATABASE:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: *pgsec
|
||||
key: "dbname"
|
||||
PGUSER:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: *pgsec
|
||||
key: "user"
|
||||
PGPASSFILE: &pgpass "/secrets/pgpass"
|
||||
STORAGE_TYPE: "JSON"
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -70,8 +59,7 @@ spec:
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
medium: Memory
|
||||
existingClaim: "redbot-data"
|
||||
globalMounts:
|
||||
- subPath: "config"
|
||||
path: *path
|
||||
@@ -98,17 +86,6 @@ spec:
|
||||
- subPath: "OWNER"
|
||||
path: *owner
|
||||
readOnly: true
|
||||
pg:
|
||||
enabled: true
|
||||
type: secret
|
||||
name: *pgsec
|
||||
defaultMode: 0400
|
||||
advancedMounts:
|
||||
main:
|
||||
main:
|
||||
- subPath: "password"
|
||||
path: *pgpass
|
||||
readOnly: true
|
||||
defaultPodOptions:
|
||||
automountServiceAccountToken: false
|
||||
enableServiceLinks: false
|
||||
|
||||
@@ -12,56 +12,32 @@ spec:
|
||||
path: ./kube/deploy/apps/redbot/app
|
||||
targetNamespace: "redbot"
|
||||
dependsOn:
|
||||
- name: redbot-db
|
||||
# - name: redbot-pvc
|
||||
# ---
|
||||
# apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
# kind: Kustomization
|
||||
# metadata:
|
||||
# name: redbot-pvc
|
||||
# namespace: flux-system
|
||||
# labels: &l
|
||||
# app.kubernetes.io/name: "redbot"
|
||||
# spec:
|
||||
# commonMetadata:
|
||||
# labels: *l
|
||||
# path: ./kube/deploy/core/storage/volsync/template
|
||||
# targetNamespace: "redbot"
|
||||
# dependsOn:
|
||||
# - name: 1-core-storage-volsync-app
|
||||
# - name: 1-core-storage-rook-ceph-cluster
|
||||
# postBuild:
|
||||
# substitute:
|
||||
# PVC: "redbot-data"
|
||||
# SIZE: "10Gi"
|
||||
# SC: &sc "file"
|
||||
# SNAP: *sc
|
||||
# RUID: !!str &uid |
|
||||
# ${APP_UID_REDBOT}
|
||||
# RGID: !!str |
|
||||
# ${APP_UID_REDBOT}
|
||||
# RFSG: !!str |
|
||||
# ${APP_UID_REDBOT}
|
||||
- name: redbot-pvc
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: redbot-db
|
||||
name: redbot-pvc
|
||||
namespace: flux-system
|
||||
labels: &l
|
||||
prune.flux.home.arpa/enabled: "true"
|
||||
db.home.arpa/pg: "pg-default"
|
||||
app.kubernetes.io/name: "redbot"
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels: *l
|
||||
path: ./kube/deploy/core/db/pg/clusters/template/pguser
|
||||
targetNamespace: "pg"
|
||||
path: ./kube/deploy/core/storage/volsync/template
|
||||
targetNamespace: "redbot"
|
||||
dependsOn:
|
||||
- name: 1-core-db-pg-clusters-default
|
||||
- name: 1-core-secrets-es-k8s
|
||||
- name: 1-core-storage-volsync-app
|
||||
- name: 1-core-storage-rook-ceph-cluster
|
||||
postBuild:
|
||||
substitute:
|
||||
PG_NAME: "default"
|
||||
PG_DB_USER: &app "redbot"
|
||||
PG_APP_NS: *app
|
||||
PVC: "redbot-data"
|
||||
SIZE: "20Gi"
|
||||
SC: &sc "file"
|
||||
SNAP: *sc
|
||||
RUID: !!str &uid |
|
||||
${APP_UID_REDBOT}
|
||||
RGID: !!str |
|
||||
${APP_UID_REDBOT}
|
||||
RFSG: !!str |
|
||||
${APP_UID_REDBOT}
|
||||
|
||||
Reference in New Issue
Block a user