Files
infra/apps/teable/deployment.yaml

133 lines
3.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: teable
namespace: teable
labels:
app.kubernetes.io/name: teable
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: teable
template:
metadata:
labels:
app.kubernetes.io/name: teable
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: location
operator: In
values:
- fsn
volumes:
- name: valkey-data
persistentVolumeClaim:
claimName: valkey-data-pvc
hostAliases:
- ip: "100.113.193.5"
hostnames:
- "mail.prettysunflower.moe"
initContainers:
- name: db-migrate
image: ghcr.io/teableio/teable:sha-257d098af67e9260b6abb09da0e08eafef34ae08
imagePullPolicy: Always
args:
- migrate-only
envFrom:
- configMapRef:
name: teable-config
- secretRef:
name: teable-secrets
resources:
requests:
cpu: 100m
memory: 102Mi
limits:
cpu: 1000m
memory: 1024Mi
securityContext:
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
containers:
- name: teable
image: ghcr.io/teableio/teable:sha-257d098af67e9260b6abb09da0e08eafef34ae08
imagePullPolicy: Always
args:
- skip-migrate
ports:
- containerPort: 3000
envFrom:
- configMapRef:
name: teable-config
- secretRef:
name: teable-secrets
resources:
requests:
cpu: 200m
memory: 400Mi
limits:
cpu: 2000m
memory: 4096Mi
startupProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 30
successThreshold: 1
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
readinessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
- image: valkey/valkey:alpine
name: valkey
envFrom:
- secretRef:
name: valkey-secrets
command: ["valkey-server"]
ports:
- containerPort: 6379
protocol: TCP
volumeMounts:
- name: valkey-data
mountPath: "/data"
securityContext:
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault