feat: Add RomM
This commit is contained in:
parent
50a206c943
commit
6a9c153f5c
9 changed files with 285 additions and 0 deletions
|
|
@ -216,3 +216,22 @@ spec:
|
|||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: romm
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://code.peterg.nl/wheatley/kubernetes.git
|
||||
path: k8s-wheatley/romm
|
||||
targetRevision: HEAD
|
||||
destination:
|
||||
server: https://10.13.37.10:6443
|
||||
namespace: romm
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
|
|
|
|||
21
k8s-wheatley/romm/configmap.yaml
Normal file
21
k8s-wheatley/romm/configmap.yaml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: romm-db-envs
|
||||
data:
|
||||
MARIADB_DATABASE: romm
|
||||
MARIADB_USER: romm
|
||||
TZ: Europe/Amsterdam
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: romm-envs
|
||||
data:
|
||||
DB_HOST: 127.0.0.1
|
||||
DB_NAME: romm
|
||||
DB_USER: romm
|
||||
ROMM_PORT: "8080"
|
||||
HASHEOUS_API_ENABLED: "true"
|
||||
TZ: Europe/Amsterdam
|
||||
83
k8s-wheatley/romm/deployments.yaml
Normal file
83
k8s-wheatley/romm/deployments.yaml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: romm
|
||||
labels:
|
||||
app: romm
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: romm
|
||||
selector:
|
||||
matchLabels:
|
||||
app: romm
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: romm
|
||||
spec:
|
||||
initContainers:
|
||||
- name: romm-db
|
||||
image: mariadb
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: romm-db-envs
|
||||
- secretRef:
|
||||
name: romm-db-env-secrets
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: romm-db-data
|
||||
restartPolicy: Always
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- "healthcheck.sh --connect --innodb_initialized"
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 3
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- "healthcheck.sh --connect --innodb_initialized"
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
containers:
|
||||
- name: romm
|
||||
image: rommapp/romm
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: romm-envs
|
||||
- secretRef:
|
||||
name: romm-env-secrets
|
||||
volumeMounts:
|
||||
- mountPath: /romm
|
||||
name: romm-data
|
||||
- mountPath: /romm/library
|
||||
name: nfs-media-roms
|
||||
readOnly: true
|
||||
- mountPath: /romm/downloads
|
||||
name: nfs-media-downloads
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: romm-db-data
|
||||
persistentVolumeClaim:
|
||||
claimName: romm-db-storage
|
||||
- name: romm-data
|
||||
persistentVolumeClaim:
|
||||
claimName: romm-storage
|
||||
- name: nfs-media-roms
|
||||
persistentVolumeClaim:
|
||||
claimName: nfs-media-roms
|
||||
- name: nfs-media-downloads
|
||||
persistentVolumeClaim:
|
||||
claimName: nfs-media-downloads
|
||||
16
k8s-wheatley/romm/ingress.yaml
Normal file
16
k8s-wheatley/romm/ingress.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: romm-route
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: internal
|
||||
namespace: kube-system
|
||||
sectionName: https
|
||||
hostnames:
|
||||
- "roms.wheatley.in"
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: romm
|
||||
port: 80
|
||||
53
k8s-wheatley/romm/kustomization.yaml
Normal file
53
k8s-wheatley/romm/kustomization.yaml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: romm
|
||||
|
||||
resources:
|
||||
- configmap.yaml
|
||||
- deployments.yaml
|
||||
- ingress.yaml
|
||||
- pvc.yaml
|
||||
- secrets.yaml
|
||||
- services.yaml
|
||||
- namespace.yaml
|
||||
|
||||
components:
|
||||
- ../../kustomize-bases/nfs-media/components/roms
|
||||
- ../../kustomize-bases/nfs-media/components/downloads
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: PersistentVolume
|
||||
name: nfs-media-roms
|
||||
patch: |
|
||||
- op: replace
|
||||
path: /metadata/name
|
||||
value: nfs-media-romm-roms
|
||||
- target:
|
||||
kind: PersistentVolume
|
||||
name: nfs-media-downloads
|
||||
patch: |
|
||||
- op: replace
|
||||
path: /metadata/name
|
||||
value: nfs-media-romm-downloads
|
||||
- target:
|
||||
kind: PersistentVolumeClaim
|
||||
name: nfs-media-roms
|
||||
patch: |
|
||||
- op: replace
|
||||
path: /spec/volumeName
|
||||
value: nfs-media-romm-roms
|
||||
- target:
|
||||
kind: PersistentVolumeClaim
|
||||
name: nfs-media-downloads
|
||||
patch: |
|
||||
- op: replace
|
||||
path: /spec/volumeName
|
||||
value: nfs-media-romm-downloads
|
||||
|
||||
images:
|
||||
- name: mariadb
|
||||
newTag: lts
|
||||
- name: rommapp/romm
|
||||
newTag: 4.8.1
|
||||
5
k8s-wheatley/romm/namespace.yaml
Normal file
5
k8s-wheatley/romm/namespace.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: romm
|
||||
24
k8s-wheatley/romm/pvc.yaml
Normal file
24
k8s-wheatley/romm/pvc.yaml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: romm-db-storage
|
||||
spec:
|
||||
storageClassName: piraeus-lvmthin
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: romm-storage
|
||||
spec:
|
||||
storageClassName: piraeus-lvmthin
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
52
k8s-wheatley/romm/secrets.yaml
Normal file
52
k8s-wheatley/romm/secrets.yaml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: romm-db-env-secrets
|
||||
spec:
|
||||
secretStoreRef:
|
||||
name: vault-wheatley
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: romm-db-env-secrets
|
||||
data:
|
||||
- secretKey: MARIADB_ROOT_PASSWORD
|
||||
remoteRef:
|
||||
key: secrets/managed/romm/romm-db
|
||||
property: ROOT_PASSWORD
|
||||
- secretKey: MARIADB_PASSWORD
|
||||
remoteRef:
|
||||
key: secrets/managed/romm/romm-db
|
||||
property: PASSWORD
|
||||
---
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: romm-env-secrets
|
||||
spec:
|
||||
secretStoreRef:
|
||||
name: vault-wheatley
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: romm-env-secrets
|
||||
data:
|
||||
- secretKey: DB_PASSWD
|
||||
remoteRef:
|
||||
key: secrets/managed/romm/romm-db
|
||||
property: PASSWORD
|
||||
- secretKey: ROMM_AUTH_SECRET_KEY
|
||||
remoteRef:
|
||||
key: secrets/managed/romm/romm
|
||||
property: SECRET_KEY
|
||||
- secretKey: IGDB_CLIENT_ID
|
||||
remoteRef:
|
||||
key: secrets/managed/romm/romm
|
||||
property: IGDB_CLIENT_ID
|
||||
- secretKey: IGDB_CLIENT_SECRET
|
||||
remoteRef:
|
||||
key: secrets/managed/romm/romm
|
||||
property: IGDB_CLIENT_SECRET
|
||||
- secretKey: STEAMGRIDDB_API_KEY
|
||||
remoteRef:
|
||||
key: secrets/managed/romm/romm
|
||||
property: STEAMGRIDDB_API_KEY
|
||||
12
k8s-wheatley/romm/services.yaml
Normal file
12
k8s-wheatley/romm/services.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: romm
|
||||
spec:
|
||||
selector:
|
||||
app: romm
|
||||
ports:
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
Loading…
Add table
Add a link
Reference in a new issue