2018-08-20 16:06:53 +00:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: editor-ingress
|
|
|
|
annotations:
|
2018-08-24 21:41:23 +00:00
|
|
|
kubernetes.io/ingress.global-static-ip-name: "web-editor-ip"
|
2018-08-20 16:06:53 +00:00
|
|
|
spec:
|
|
|
|
backend:
|
|
|
|
serviceName: web-editor-node
|
|
|
|
servicePort: 8000
|
|
|
|
---
|
2018-07-26 17:18:21 +00:00
|
|
|
apiVersion: v1
|
2018-08-09 17:58:48 +00:00
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: web-editor-node
|
|
|
|
labels:
|
|
|
|
app: web-editor
|
|
|
|
spec:
|
|
|
|
# if your cluster supports it, uncomment the following to automatically create
|
|
|
|
# an external load-balanced IP for the frontend service.
|
2018-08-20 16:06:53 +00:00
|
|
|
# type: LoadBalancer
|
|
|
|
type: NodePort
|
2018-08-09 17:58:48 +00:00
|
|
|
ports:
|
2018-08-20 16:06:53 +00:00
|
|
|
- port: 8000
|
2018-08-09 17:58:48 +00:00
|
|
|
targetPort: 8000
|
|
|
|
selector:
|
|
|
|
app: web-editor
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
2018-07-26 17:18:21 +00:00
|
|
|
kind: Deployment
|
2018-08-09 17:58:48 +00:00
|
|
|
metadata:
|
|
|
|
name: web-editor-node
|
2018-07-26 17:18:21 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: web-editor
|
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
2018-08-09 17:58:48 +00:00
|
|
|
labels:
|
|
|
|
app: web-editor
|
2018-07-26 17:18:21 +00:00
|
|
|
spec:
|
|
|
|
containers:
|
2018-08-09 17:58:48 +00:00
|
|
|
- name: web-editor-app
|
|
|
|
image: index.docker.io/catarak/p5.js-web-editor:latest
|
|
|
|
# temp, just to test kubernetes
|
|
|
|
# envFrom:
|
|
|
|
# - configMapRef:
|
|
|
|
# name: web-editor-env
|
|
|
|
envFrom:
|
|
|
|
- secretRef:
|
|
|
|
name: web-editor-credentials
|
|
|
|
imagePullPolicy: Always
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 100Mi
|
|
|
|
ports:
|
|
|
|
- containerPort: 8000
|
2018-08-21 21:39:34 +00:00
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /health
|
|
|
|
port: 8000
|
2018-08-28 18:47:05 +00:00
|
|
|
---
|
|
|
|
apiVersion: autoscaling/v1
|
|
|
|
kind: HorizontalPodAutoscaler
|
|
|
|
metadata:
|
|
|
|
annotations:
|
|
|
|
name: web-editor-node
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
maxReplicas: 6
|
2018-11-02 19:26:45 +00:00
|
|
|
minReplicas: 2
|
2018-08-28 18:47:05 +00:00
|
|
|
scaleTargetRef:
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
name: web-editor-node
|
|
|
|
targetCPUUtilizationPercentage: 80
|
2018-09-09 18:06:23 +00:00
|
|
|
# ---
|
|
|
|
# # cronjob for p5.js examples
|
|
|
|
# apiVersion: batch/v1beta1
|
|
|
|
# kind: CronJob
|
|
|
|
# metadata:
|
|
|
|
# name: fetch-examples-job
|
|
|
|
# spec:
|
|
|
|
# schedule: "0 0 * * 0"
|
|
|
|
# jobTemplate:
|
|
|
|
# spec:
|
|
|
|
# template:
|
|
|
|
# spec:
|
|
|
|
# containers:
|
|
|
|
# - name: fetch-examples
|
|
|
|
# image: index.docker.io/catarak/p5.js-web-editor:latest
|
|
|
|
# command: ["npm", "run", "fetch-examples:prod"]
|
|
|
|
# imagePullPolicy: Always
|
|
|
|
# envFrom:
|
|
|
|
# - secretRef:
|
|
|
|
# name: web-editor-credentials
|
|
|
|
# restartPolicy: Never
|
|
|
|
# ---
|
|
|
|
# # cronjob for generative gestaltung p5.js examples
|
|
|
|
# apiVersion: batch/v1beta1
|
|
|
|
# kind: CronJob
|
|
|
|
# metadata:
|
|
|
|
# name: fetch-examples-gg-job
|
|
|
|
# spec:
|
|
|
|
# schedule: "30 0 * * 0"
|
|
|
|
# jobTemplate:
|
|
|
|
# spec:
|
|
|
|
# template:
|
|
|
|
# spec:
|
|
|
|
# containers:
|
|
|
|
# - name: fetch-examples-gg
|
|
|
|
# image: index.docker.io/catarak/p5.js-web-editor:latest
|
|
|
|
# command: ["npm", "run", "fetch-examples-gg:prod"]
|
|
|
|
# imagePullPolicy: Always
|
|
|
|
# envFrom:
|
|
|
|
# - secretRef:
|
|
|
|
# name: web-editor-credentials
|
|
|
|
# restartPolicy: Never
|
2019-05-29 20:11:26 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Namespace
|
|
|
|
metadata:
|
|
|
|
name: staging
|
|
|
|
labels:
|
|
|
|
name: staging
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: web-editor-node
|
|
|
|
namespace: staging
|
|
|
|
labels:
|
|
|
|
app: web-editor
|
|
|
|
spec:
|
|
|
|
# if your cluster supports it, uncomment the following to automatically create
|
|
|
|
# an external load-balanced IP for the frontend service.
|
|
|
|
type: LoadBalancer
|
|
|
|
# type: NodePort
|
|
|
|
ports:
|
|
|
|
- port: 8001
|
|
|
|
targetPort: 8000
|
|
|
|
selector:
|
|
|
|
app: web-editor
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: web-editor-node
|
|
|
|
namespace: staging
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: web-editor
|
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: web-editor
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: web-editor-app
|
|
|
|
image: index.docker.io/catarak/p5.js-web-editor:latest
|
|
|
|
# temp, just to test kubernetes
|
|
|
|
# envFrom:
|
|
|
|
# - configMapRef:
|
|
|
|
# name: web-editor-env
|
|
|
|
envFrom:
|
|
|
|
- secretRef:
|
|
|
|
name: web-editor-credentials
|
|
|
|
imagePullPolicy: Always
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 100Mi
|
|
|
|
ports:
|
|
|
|
- containerPort: 8000
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /health
|
|
|
|
port: 8000
|