shynet/kubernetes/deployments.yml

119 lines
2.4 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"
image: "milesmcc/shynet:edge" # Change to the version appropriate for you (e.g., :latest)
2020-04-15 04:02:49 +08:00
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"
image: "milesmcc/shynet:edge" # Change to the version appropriate for you (e.g., :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
---
2021-01-26 02:39:53 +08:00
apiVersion: apps/v1
2020-04-15 02:57:27 +08:00
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
2021-01-26 02:39:53 +08:00
---
apiVersion: v1
kind: Service
metadata:
name: shynet-webserver-service
spec:
type: ClusterIP
ports:
- port: 8080
selector:
app: shynet-webserver
---
apiVersion: networking.k8s.io/v1
2021-01-26 02:39:53 +08:00
kind: Ingress
metadata:
name: shynet-webserver-ingress
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
spec:
rules:
- host: shynet.rmrm.io
http:
paths:
- backend:
serviceName: shynet-webserver-service
servicePort: 8080
path: /
- host: shynet-beta.rmrm.io
http:
paths:
- backend:
serviceName: shynet-webserver-service
servicePort: 8080
path: /