antiaffinities and namespaces

This commit is contained in:
2021-10-16 18:23:19 +02:00
parent f006923f61
commit 688485987f
5 changed files with 45 additions and 50 deletions

View File

@@ -12,26 +12,24 @@ data:
enabled: true enabled: true
"RemovePodsViolatingInterPodAntiAffinity": "RemovePodsViolatingInterPodAntiAffinity":
enabled: true enabled: true
#"HighNodeUtilization": "RemovePodsViolatingInterPodAntiAffinity":
# enabled: true enabled: true
# params:
# nodeResourceUtilizationThresholds:
# thresholds:
# "cpu" : 20
# "memory": 20
# "pods": 8
"LowNodeUtilization": "LowNodeUtilization":
enabled: true enabled: true
params: params:
nodeResourceUtilizationThresholds: nodeResourceUtilizationThresholds:
thresholds: thresholds:
"cpu": 20 "cpu": 30
"memory": 20 "memory": 40
"pods": 10 "pods": 10
targetThresholds: targetThresholds:
"cpu": 50 "cpu": 50
"memory": 50 "memory": 60
"pods": 20 "pods": 20
nodeFit: true nodeFit: true
"RemovePodsViolatingTopologySpreadConstraint":
enabled: true
params:
includeSoftConstraints: false

View File

@@ -1,39 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nfs-client-provisioner
labels:
app: nfs-client-provisioner
# replace with namespace where provisioner is deployed
namespace: default
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: nfs-client-provisioner
template:
metadata:
labels:
app: nfs-client-provisioner
spec:
serviceAccountName: nfs-client-provisioner
containers:
- name: nfs-client-provisioner
image: quay.io/external_storage/nfs-client-provisioner-arm:latest
volumeMounts:
- name: nfs-client-root
mountPath: /persistentvolumes
env:
- name: PROVISIONER_NAME
value: nfs-ssd
- name: NFS_SERVER
value: ebin01
- name: NFS_PATH
value: /data/raid1-ssd/k8s-data
volumes:
- name: nfs-client-root
nfs:
server: ebin01
path: /data/raid1-ssd/k8s-data

View File

@@ -2,8 +2,10 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: nfs-hdd-ebin01 name: nfs-hdd-ebin01
namespace: live-infra
labels: labels:
app: nfs-hdd-ebin01 app: nfs-hdd-ebin01
service: nfs
spec: spec:
replicas: 1 replicas: 1
strategy: strategy:
@@ -30,6 +32,16 @@ spec:
value: ebin01 value: ebin01
- name: NFS_PATH - name: NFS_PATH
value: /data/raid1-hdd/k8s-data value: /data/raid1-hdd/k8s-data
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: service
operator: In
values:
- nfs
topologyKey: kubernetes.io/hostname
volumes: volumes:
- name: nfs-client-root - name: nfs-client-root
nfs: nfs:

View File

@@ -2,8 +2,10 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: nfs-ssd-ebin01 name: nfs-ssd-ebin01
namespace: live-infra
labels: labels:
app: nfs-ssd-ebin01 app: nfs-ssd-ebin01
service: nfs
spec: spec:
replicas: 1 replicas: 1
strategy: strategy:
@@ -30,6 +32,16 @@ spec:
value: ebin01 value: ebin01
- name: NFS_PATH - name: NFS_PATH
value: /data/raid1-ssd/k8s-data value: /data/raid1-ssd/k8s-data
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: service
operator: In
values:
- nfs
topologyKey: kubernetes.io/hostname
volumes: volumes:
- name: nfs-client-root - name: nfs-client-root
nfs: nfs:

View File

@@ -2,8 +2,10 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: nfs-ssd-ebin02 name: nfs-ssd-ebin02
namespace: live-infra
labels: labels:
app: nfs-ssd-ebin02 app: nfs-ssd-ebin02
service: nfs
spec: spec:
replicas: 1 replicas: 1
strategy: strategy:
@@ -30,6 +32,16 @@ spec:
value: ebin02 value: ebin02
- name: NFS_PATH - name: NFS_PATH
value: /data/raid1-ssd/k8s-data value: /data/raid1-ssd/k8s-data
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: service
operator: In
values:
- nfs
topologyKey: kubernetes.io/hostname
volumes: volumes:
- name: nfs-client-root - name: nfs-client-root
nfs: nfs: