119 lines
2.3 KiB
YAML
119 lines
2.3 KiB
YAML
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:
|
|
- name: "shynet-webserver"
|
|
image: "milesmcc/shynet:latest"
|
|
imagePullPolicy: Always
|
|
envFrom:
|
|
- secretRef:
|
|
name: shynet-settings
|
|
---
|
|
apiVersion: "apps/v1"
|
|
kind: "Deployment"
|
|
metadata:
|
|
name: "shynet-celeryworker"
|
|
namespace: "default"
|
|
labels:
|
|
app: "shynet-celeryworker"
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: "shynet-celeryworker"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: "shynet-celeryworker"
|
|
spec:
|
|
containers:
|
|
- name: "shynet-celeryworker"
|
|
image: "milesmcc/shynet:latest"
|
|
command: ["./celeryworker.sh"]
|
|
imagePullPolicy: Always
|
|
envFrom:
|
|
- secretRef:
|
|
name: shynet-settings
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: shynet-redis
|
|
spec:
|
|
ports:
|
|
- port: 6379
|
|
name: redis
|
|
clusterIP: None
|
|
selector:
|
|
app: shynet-redis
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: shynet-redis
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: shynet-redis
|
|
serviceName: shynet-redis
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: shynet-redis
|
|
spec:
|
|
containers:
|
|
- name: shynet-redis
|
|
image: redis:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 6379
|
|
name: redis
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: shynet-webserver-service
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 8080
|
|
selector:
|
|
app: shynet-webserver
|
|
---
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
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: / |