install familydb
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tobias Brunner 2021-04-23 21:17:10 +02:00
parent 5f454ad48a
commit c4ca12b11a
5 changed files with 113 additions and 0 deletions

24
_apps/familydb.yaml Normal file
View File

@ -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 Normal file
View File

@ -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 Normal file
View File

@ -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 Normal file
View File

@ -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 Normal file
View File

@ -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