295 lines
7.6 KiB
YAML
295 lines
7.6 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: mastodon
|
|
namespace: mastodon
|
|
labels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: mastodon-streaming
|
|
namespace: mastodon
|
|
labels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: streaming
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 4000
|
|
targetPort: streaming
|
|
protocol: TCP
|
|
name: streaming
|
|
selector:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: streaming
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: mastodon-web
|
|
namespace: mastodon
|
|
labels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: web
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 3000
|
|
targetPort: http
|
|
protocol: TCP
|
|
name: http
|
|
selector:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: web
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mastodon-sidekiq
|
|
namespace: mastodon
|
|
labels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: sidekiq
|
|
annotations:
|
|
configmap.reloader.stakater.com/reload: "mastodon-env"
|
|
secret.reloader.stakater.com/reload: "mastodon"
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: sidekiq
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: sidekiq
|
|
spec:
|
|
serviceAccountName: mastodon
|
|
securityContext:
|
|
fsGroup: 991
|
|
runAsGroup: 991
|
|
runAsUser: 991
|
|
containers:
|
|
- name: mastodon
|
|
image: "tootsuite/mastodon:v3.5.3"
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- bundle
|
|
- exec
|
|
- sidekiq
|
|
- -c
|
|
- "25"
|
|
envFrom:
|
|
- configMapRef:
|
|
name: mastodon-env
|
|
- secretRef:
|
|
name: mastodon
|
|
resources:
|
|
requests:
|
|
memory: 400Mi
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: "app.kubernetes.io/name"
|
|
operator: In
|
|
values:
|
|
- mastodon
|
|
- key: "app.kubernetes.io/instance"
|
|
operator: In
|
|
values:
|
|
- "k8s.social"
|
|
- key: "app.kubernetes.io/component"
|
|
operator: In
|
|
values:
|
|
- sidekiq
|
|
topologyKey: kubernetes.io/hostname
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mastodon-streaming
|
|
namespace: mastodon
|
|
labels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: streaming
|
|
annotations:
|
|
configmap.reloader.stakater.com/reload: "mastodon-env"
|
|
secret.reloader.stakater.com/reload: "mastodon"
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: streaming
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: streaming
|
|
spec:
|
|
serviceAccountName: mastodon
|
|
securityContext:
|
|
fsGroup: 991
|
|
runAsGroup: 991
|
|
runAsUser: 991
|
|
containers:
|
|
- name: mastodon
|
|
image: "tootsuite/mastodon:v3.5.3"
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- node
|
|
- ./streaming
|
|
envFrom:
|
|
- configMapRef:
|
|
name: mastodon-env
|
|
- secretRef:
|
|
name: mastodon
|
|
env:
|
|
- name: "PORT"
|
|
value: "4000"
|
|
ports:
|
|
- name: streaming
|
|
containerPort: 4000
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/v1/streaming/health
|
|
port: streaming
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/v1/streaming/health
|
|
port: streaming
|
|
resources:
|
|
requests:
|
|
memory: 200Mi
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: "app.kubernetes.io/name"
|
|
operator: In
|
|
values:
|
|
- mastodon
|
|
- key: "app.kubernetes.io/instance"
|
|
operator: In
|
|
values:
|
|
- "k8s.social"
|
|
- key: "app.kubernetes.io/component"
|
|
operator: In
|
|
values:
|
|
- streaming
|
|
topologyKey: kubernetes.io/hostname
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mastodon-web
|
|
namespace: mastodon
|
|
labels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: web
|
|
annotations:
|
|
configmap.reloader.stakater.com/reload: "mastodon-env"
|
|
secret.reloader.stakater.com/reload: "mastodon"
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: web
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: mastodon
|
|
app.kubernetes.io/instance: "k8s.social"
|
|
app.kubernetes.io/component: web
|
|
spec:
|
|
serviceAccountName: mastodon
|
|
securityContext:
|
|
fsGroup: 991
|
|
runAsGroup: 991
|
|
runAsUser: 991
|
|
containers:
|
|
- name: mastodon
|
|
image: "tootsuite/mastodon:v3.5.3"
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- bundle
|
|
- exec
|
|
- puma
|
|
- -C
|
|
- config/puma.rb
|
|
envFrom:
|
|
- configMapRef:
|
|
name: mastodon-env
|
|
- secretRef:
|
|
name: mastodon
|
|
env:
|
|
- name: "PORT"
|
|
value: "3000"
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
resources:
|
|
requests:
|
|
memory: 700Mi
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: "app.kubernetes.io/name"
|
|
operator: In
|
|
values:
|
|
- mastodon
|
|
- key: "app.kubernetes.io/instance"
|
|
operator: In
|
|
values:
|
|
- "k8s.social"
|
|
- key: "app.kubernetes.io/component"
|
|
operator: In
|
|
values:
|
|
- web
|
|
topologyKey: kubernetes.io/hostname
|
|
---
|