84 lines
No EOL
1.6 KiB
YAML
84 lines
No EOL
1.6 KiB
YAML
# ==========================================
|
|
# JS PAINT (STATIC DEPLOYMENT)
|
|
# ==========================================
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: jspaint
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: jspaint
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: jspaint
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: mist
|
|
|
|
volumes:
|
|
- name: web-content
|
|
emptyDir: {}
|
|
|
|
initContainers:
|
|
- name: fetch-jspaint
|
|
image: alpine/git
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
git clone --depth=1 https://github.com/1j01/jspaint.git /tmp/jspaint && \
|
|
cp -r /tmp/jspaint/* /web
|
|
volumeMounts:
|
|
- name: web-content
|
|
mountPath: /web
|
|
|
|
containers:
|
|
- name: nginx
|
|
image: nginx:alpine
|
|
ports:
|
|
- containerPort: 80
|
|
volumeMounts:
|
|
- name: web-content
|
|
mountPath: /usr/share/nginx/html
|
|
resources:
|
|
requests:
|
|
cpu: "50m"
|
|
memory: "64Mi"
|
|
limits:
|
|
cpu: "200m"
|
|
memory: "128Mi"
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: jspaint
|
|
spec:
|
|
selector:
|
|
app: jspaint
|
|
ports:
|
|
- port: 80
|
|
targetPort: 80
|
|
|
|
---
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: jspaint-ingress
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
routes:
|
|
- match: Host(`jspaint.juntekim.com`)
|
|
kind: Rule
|
|
services:
|
|
- name: jspaint
|
|
port: 80
|
|
passHostHeader: true
|
|
tls:
|
|
certResolver: myresolver |