topology Spread Constraints

 

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.deployment.name }}
annotations:
configmap.reloader.stakater.com/reload: {{ .Values.configMap.name }}
spec:
selector:
matchLabels:
app: cms
replicas: {{ .Values.replicaCount }}
template:
metadata:
name: cms
labels:
app: cms
annotations:
firth/job.0: "cms"
firth/port.0: "30080"
firth/path.0: "/actuator/prometheus"
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: cms
containers:
- name: cms
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: Always
readinessProbe:
httpGet:
path: /health/liveness
port: {{ .Values.targetPort }}
initialDelaySeconds: {{ .Values.initialDelaySeconds }}
periodSeconds: {{ .Values.periodSeconds }}
resources:
limits:
memory: {{ .Values.ram.limit }}
requests:
memory: {{ .Values.ram.request }}
ports:
- name: publisher
containerPort: {{ .Values.targetPort }}
protocol: TCP
env:
- name: PROFILE
valueFrom:
configMapKeyRef:
name: {{ .Values.configMap.name }}
key: profile

Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch