shynet/kubernetes/deployments.yml

86 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-05-06 02:42:26 +08:00
- name: "shynet-webserver"
2020-04-15 04:02:49 +08:00
image: "milesmcc/shynet:latest"
imagePullPolicy: Always
envFrom:
- secretRef:
2020-05-08 05:06:04 +08:00
name: shynet-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-05-06 02:42:26 +08:00
- name: "shynet-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:
2020-05-08 05:06:04 +08:00
name: shynet-settings
2020-04-15 02:57:27 +08:00
---
apiVersion: v1
kind: Service
metadata:
2020-05-06 02:42:26 +08:00
name: shynet-redis
2020-04-15 02:57:27 +08:00
spec:
ports:
- port: 6379
name: redis
clusterIP: None
selector:
2020-05-06 02:42:26 +08:00
app: shynet-redis
2020-04-15 02:57:27 +08:00
---
apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
2020-05-06 02:42:26 +08:00
name: shynet-redis
2020-04-15 02:57:27 +08:00
spec:
selector:
matchLabels:
2020-05-06 02:42:26 +08:00
app: shynet-redis
serviceName: shynet-redis
2020-04-15 02:57:27 +08:00
replicas: 1
template:
metadata:
labels:
2020-05-06 02:42:26 +08:00
app: shynet-redis
2020-04-15 02:57:27 +08:00
spec:
containers:
2020-05-06 02:42:26 +08:00
- name: shynet-redis
2020-04-15 02:57:27 +08:00
image: redis:latest
imagePullPolicy: Always
ports:
- containerPort: 6379
name: redis