Browse Source

install familydb

pull/447/head
Tobias Brunner 3 weeks ago
parent
commit
c4ca12b11a
  1. 24
      _apps/familydb.yaml
  2. 35
      familydb/deployment.yaml
  3. 24
      familydb/ingress.yaml
  4. 15
      familydb/pvc.yaml
  5. 15
      familydb/service.yaml

24
_apps/familydb.yaml

@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: familydb
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: familydb
server: https://kubernetes.default.svc
project: apps
source:
path: familydb
repoURL: https://git.tbrnt.ch/tobru/gitops-tbrnt.git
targetRevision: HEAD
syncPolicy:
automated:
prune: true
---
apiVersion: v1
kind: Namespace
metadata:
name: familydb

35
familydb/deployment.yaml

@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: familydb
name: familydb
spec:
replicas: 1
selector:
matchLabels:
app: familydb
strategy: {}
template:
metadata:
labels:
app: familydb
spec:
containers:
- name: familydb
image: docker.io/tobru/familydb:latest
imagePullPolicy: IfNotPresent
env:
- name: DB_PATH
value: /opt/familydb/family.db
ports:
- containerPort: 8080
protocol: TCP
name: http
volumeMounts:
- name: data
mountPath: /opt/familydb
volumes:
- name: data
persistentVolumeClaim:
claimName: data

24
familydb/ingress.yaml

@ -0,0 +1,24 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: familydb
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
ingress.kubernetes.io/ssl-redirect: "true"
spec:
rules:
- host: db.tobru.ch
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: familydb
port:
number: 8080
tls:
- hosts:
- db.tobru.ch
secretName: db-tobru-ch

15
familydb/pvc.yaml

@ -0,0 +1,15 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data
labels:
app: familydb
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 10Gi
storageClassName: local-path

15
familydb/service.yaml

@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: familydb
name: familydb
spec:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: familydb
type: ClusterIP
Loading…
Cancel
Save