devstar-devcontainer-operator/internal/controller/templates/stateful_set.yaml
2024-09-11 04:10:47 +00:00

47 lines
1.1 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{.ObjectMeta.Name}}
namespace: {{.ObjectMeta.Namespace}}
labels:
app: {{.ObjectMeta.Name}}
spec:
podManagementPolicy: OrderedReady
replicas: 1
selector:
matchLabels:
app: {{.ObjectMeta.Name}}
template:
metadata:
labels:
app: {{.ObjectMeta.Name}}
spec:
containers:
- name: {{.ObjectMeta.Name}}
image: {{.Spec.Image}}
imagePullPolicy: IfNotPresent
ports:
- name: tcp-ssh
protocol: tcp
containerPort: 22
livenessProbe:
exec:
command:
- /bin/sh
- -c
- exec ping localhost
failureThreshold: 6
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources:
limits:
cpu: 150m
ephemeral-storage: 2Gi
memory: 192Mi
requests:
cpu: 100m
ephemeral-storage: 50Mi
memory: 128Mi