- Include tolerations in load.yaml for scheduling - Allow pods to tolerate specific constraints and improve scheduling This change enables the containers to schedule on nodes with restricted taints, enhancing deployment strategies in constrained Kubernetes environments.
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: alist-sts
|
|
namespace: alist
|
|
labels:
|
|
app: alist
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: alist
|
|
template:
|
|
metadata:
|
|
annotations: {}
|
|
labels:
|
|
app: alist
|
|
spec:
|
|
nodeSelector:
|
|
# region: cn
|
|
kubernetes.io/hostname: claw-hk2
|
|
#affinity:
|
|
# nodeAffinity:
|
|
# requiredDuringSchedulingIgnoredDuringExecution:
|
|
# nodeSelectorTerms:
|
|
# - matchExpressions:
|
|
# - key: kubernetes.io/hostname
|
|
# operator: In
|
|
# values:
|
|
# - tencent-gz1
|
|
# - tencent-sh1
|
|
tolerations:
|
|
- key: "scheduling"
|
|
operator: "Equal"
|
|
value: "restricted"
|
|
effect: "NoSchedule"
|
|
containers:
|
|
- name: alist
|
|
image: xhofe/alist:v3.42.0
|
|
ports:
|
|
- containerPort: 5244
|
|
name: web
|
|
env:
|
|
- name: PUID
|
|
value: "0"
|
|
- name: GUID
|
|
value: "0"
|
|
- name: UMASK
|
|
value: "022"
|
|
volumeMounts:
|
|
- name: alist-data
|
|
mountPath: /opt/alist/data
|
|
volumes:
|
|
- name: alist-data
|
|
persistentVolumeClaim:
|
|
claimName: alist-clhk2-pvc
|
|
|