78 lines
1.4 KiB
Text
78 lines
1.4 KiB
Text
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: mariadb-configmap
|
|
data:
|
|
database_url: mariadb-service
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: phpmyadmin-deployment
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: pma
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: pma
|
|
spec:
|
|
containers:
|
|
- name: phpmyadmin
|
|
image: bitnami/phpmyadmin:latest
|
|
ports:
|
|
- containerPort: 8080
|
|
env:
|
|
- name: DATABASE_HOST
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: mariadb-configmap
|
|
key: database_url
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: pma
|
|
spec:
|
|
selector:
|
|
app: pma
|
|
ports:
|
|
- port: 8080
|
|
targetPort: 8080
|
|
|
|
---
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: pma
|
|
spec:
|
|
entryPoints: # We listen to requests coming from ports 80 and 443
|
|
- web
|
|
- websecure
|
|
routes:
|
|
- match: Host(`pma.k8s.s-web.fr`)
|
|
kind: Rule
|
|
services:
|
|
- name: pma # Requests will be forwarded to this service
|
|
port: 8080
|
|
middlewares:
|
|
- name: admin-ldc-whitelist
|
|
tls:
|
|
secretName: pma.k8s.s-web.fr
|
|
|
|
---
|
|
apiVersion: cert-manager.io/v1
|
|
kind: Certificate
|
|
metadata:
|
|
name: pma.k8s.s-web.fr
|
|
spec:
|
|
dnsNames:
|
|
- pma.k8s.s-web.fr
|
|
secretName: pma.k8s.s-web.fr
|
|
issuerRef:
|
|
name: letsencrypt-production-dns01
|
|
kind: ClusterIssuer
|