shynet/kubernetes/deployments.yml

87 lines
1.6 KiB
YAML
Raw Normal View History

2020-04-15 02:57:27 +08:00
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: "shynet-webserver"
namespace: "default"
labels:
app: "shynet-webserver"
spec:
replicas: 3
selector:
matchLabels:
app: "shynet-webserver"
template:
metadata:
labels:
app: "shynet-webserver"
spec:
containers:
2020-04-15 04:02:49 +08:00
- name: "covideo-webserver"
image: "milesmcc/shynet:latest"
command: ["./webserver.sh"]
imagePullPolicy: Always
envFrom:
- secretRef:
name: django-settings
2020-04-15 02:57:27 +08:00
---
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: "shynet-celeryworker"
namespace: "default"
labels:
2020-04-15 04:02:49 +08:00
app: "shynet-celeryworker"
2020-04-15 02:57:27 +08:00
spec:
replicas: 3
selector:
2020-04-15 04:02:49 +08:00
matchLabels:
app: "shynet-celeryworker"
2020-04-15 02:57:27 +08:00
template:
2020-04-15 04:02:49 +08:00
metadata:
labels:
app: "shynet-celeryworker"
spec:
containers:
2020-04-15 02:57:27 +08:00
- name: "covideo-celeryworker"
2020-04-15 04:02:49 +08:00
image: "milesmcc/shynet:latest"
2020-04-15 02:57:27 +08:00
command: ["./celeryworker.sh"]
imagePullPolicy: Always
envFrom:
2020-04-15 04:02:49 +08:00
- secretRef:
name: django-settings
2020-04-15 02:57:27 +08:00
---
apiVersion: v1
kind: Service
metadata:
name: redis
spec:
ports:
- port: 6379
name: redis
clusterIP: None
selector:
app: redis
---
apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
name: redis
spec:
selector:
matchLabels:
app: redis
serviceName: redis
replicas: 1
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:latest
imagePullPolicy: Always
ports:
- containerPort: 6379
name: redis