Add spoolman
This commit is contained in:
parent
c260b264b8
commit
841fa5e55a
5 changed files with 110 additions and 0 deletions
20
k8s/spoolman/database.yaml
Normal file
20
k8s/spoolman/database.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
apiVersion: "acid.zalan.do/v1"
|
||||
kind: postgresql
|
||||
metadata:
|
||||
name: spoolman-database
|
||||
spec:
|
||||
teamId: spoolman
|
||||
volume:
|
||||
size: 10Gi
|
||||
numberOfInstances: 2
|
||||
users:
|
||||
superuser:
|
||||
- superuser
|
||||
- createdb
|
||||
spoolman: []
|
||||
databases:
|
||||
spoolman: spoolman
|
||||
preparedDatabases:
|
||||
spoolman: {}
|
||||
postgresql:
|
||||
version: "16"
|
46
k8s/spoolman/deployment.yaml
Normal file
46
k8s/spoolman/deployment.yaml
Normal file
|
@ -0,0 +1,46 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spoolman
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: spoolman
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: spoolman
|
||||
spec:
|
||||
containers:
|
||||
- name: spoolman
|
||||
image: ghcr.io/donkie/spoolman
|
||||
resources:
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
cpu: "500m"
|
||||
env:
|
||||
- name: SPOOLMAN_PORT
|
||||
value: "8080"
|
||||
- name: SPOOLMAN_DB_TYPE
|
||||
value: postgres
|
||||
- name: SPOOLMAN_DB_HOST
|
||||
value: spoolman-database
|
||||
- name: SPOOLMAN_DB_PORT
|
||||
value: "5432"
|
||||
- name: SPOOLMAN_DB_NAME
|
||||
value: spoolman
|
||||
- name: SPOOLMAN_DB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: spoolman.spoolman-database.credentials.postgresql.acid.zalan.do
|
||||
key: username
|
||||
- name: SPOOLMAN_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: spoolman.spoolman-database.credentials.postgresql.acid.zalan.do
|
||||
key: password
|
||||
- name: SPOOLMAN_METRICS_ENABLED
|
||||
value: "TRUE"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
32
k8s/spoolman/ingress.yaml
Normal file
32
k8s/spoolman/ingress.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: spoolman
|
||||
spec:
|
||||
selector:
|
||||
app: spoolman
|
||||
ports:
|
||||
- port: 8080
|
||||
name: http
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: spoolman
|
||||
labels:
|
||||
name: spoolman
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.middlewares: kube-system-traefik-forward-auth@kubernetescrd
|
||||
spec:
|
||||
rules:
|
||||
- host: spoolman.k8s.home.finn.io
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: "/"
|
||||
backend:
|
||||
service:
|
||||
name: spoolman
|
||||
port:
|
||||
number: 8080
|
||||
|
8
k8s/spoolman/kustomization.yaml
Normal file
8
k8s/spoolman/kustomization.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: spoolman
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- database.yaml
|
||||
- deployment.yaml
|
||||
- ingress.yaml
|
4
k8s/spoolman/namespace.yaml
Normal file
4
k8s/spoolman/namespace.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: spoolman
|
Loading…
Reference in a new issue