Skip to content
Snippets Groups Projects
Commit d877745f authored by Martin Schmollinger's avatar Martin Schmollinger
Browse files

Added K8S resource yaml files for myaktion-go

parent 8651001b
Branches k8s
No related tags found
No related merge requests found
apiVersion: apps/v1
kind: Deployment
metadata:
name: mariadb
namespace: myaktion
spec:
selector:
matchLabels:
run: mariadb
replicas: 1
template:
metadata:
annotations:
linkerd.io/inject: enabled
labels:
run: mariadb
spec:
containers:
- name: mariadb
image: mariadb:10.5
imagePullPolicy: IfNotPresent
env:
- name: MYSQL_ROOT_PASSWORD
value: root
- name: MYSQL_DATABASE
value: myaktion
volumeMounts:
- mountPath: /var/lib/mysql
name: myaktion-pv
volumes:
- name: myaktion-pv
persistentVolumeClaim:
claimName: myaktion-pv-claim
apiVersion: apps/v1
kind: Deployment
metadata:
name: myaktion
namespace: myaktion
spec:
selector:
matchLabels:
run: myaktion
replicas: 1
template:
metadata:
annotations:
linkerd.io/inject: enabled
labels:
run: myaktion
spec:
containers:
- name: myaktion
image: schmolli/myaktion-go:1.0.1
imagePullPolicy: Always
env:
- name: DB_CONNECT
value: mariadb:3306
- name: LOG_LEVEL
value: info
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
annotations:
kubernetes.io/ingress.class: traefik
creationTimestamp: null
name: myaktion-ingressroute
namespace: myaktion
spec:
routes:
- kind: Rule
match: Path(`/health`) && Method(`GET`)
services:
- kind: Service
name: myaktion
namespace: myaktion
port: 8000
- kind: Rule
match: Path(`/campaigns`) && Method(`POST`)
middlewares:
- name: fw-auth-mw
namespace: default
services:
- kind: Service
name: myaktion
namespace: myaktion
port: 8000
- kind: Rule
match: Path(`/campaigns`) || Path(`/campaigns/{id:[0-9]+}`) && Method(`GET`)
middlewares:
- name: fw-auth-mw
namespace: default
services:
- kind: Service
name: myaktion
namespace: myaktion
port: 8000
- kind: Rule
match: Path(`/campaigns/{id:[0-9]+}/donation`) && Method(`POST`)
services:
- kind: Service
name: myaktion
namespace: myaktion
port: 8000
apiVersion: v1
kind: Namespace
metadata:
name: myaktion
kind: PersistentVolume
apiVersion: v1
metadata:
name: myaktion-pv
namespace: myaktion
labels:
type: local
spec:
storageClassName: standard
capacity:
storage: 100M
accessModes:
- ReadWriteOnce
hostPath:
path: "/User/schmolli/data/myaktion"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: myaktion
name: myaktion-pv-claim
namespace: myaktion
spec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100M
apiVersion: v1
kind: Service
metadata:
name: mariadb
namespace: myaktion
spec:
type: ClusterIP
ports:
- port: 3306
targetPort: 3306
selector:
run: mariadb
apiVersion: v1
kind: Service
metadata:
name: myaktion
namespace: myaktion
spec:
type: ClusterIP
ports:
- port: 8000
targetPort: 8000
name: "http"
selector:
run: myaktion
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment