72 lines
1.3 KiB
YAML
72 lines
1.3 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: ayaume
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: blog
|
|
namespace: ayaume
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: blog
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: blog
|
|
spec:
|
|
containers:
|
|
- name: blog
|
|
image: registry.ayau.me/blog:latest
|
|
ports:
|
|
- containerPort: 3000
|
|
env:
|
|
- name: AUTH_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: blog-secrets
|
|
key: webhook-secret
|
|
resources:
|
|
requests:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "256Mi"
|
|
cpu: "200m"
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: blog
|
|
namespace: ayaume
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
targetPort: 3000
|
|
selector:
|
|
app: blog
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: blog-ingress
|
|
namespace: ayaume
|
|
annotations:
|
|
spec.ingressClassName: traefik
|
|
spec:
|
|
rules:
|
|
- host: w.ayau.me
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: blog
|
|
port:
|
|
number: 80
|