Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add podAntiAffinity for desktop and some providers. #4617

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions controllers/account/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,18 @@ spec:
runAsNonRoot: true
serviceAccountName: account-controller-manager
terminationGracePeriodSeconds: 10
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "control-plane"
operator: In
values:
- controller-manager
topologyKey: "kubernetes.io/hostname"
volumes:
- name: cert
secret:
Expand Down
12 changes: 12 additions & 0 deletions controllers/admission/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,18 @@ spec:
runAsNonRoot: true
serviceAccountName: admission-controller-manager
terminationGracePeriodSeconds: 10
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "control-plane"
operator: In
values:
- controller-manager
topologyKey: "kubernetes.io/hostname"
volumes:
- name: cert
secret:
Expand Down
12 changes: 12 additions & 0 deletions controllers/app/deploy/manifests/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -642,3 +642,15 @@ spec:
runAsNonRoot: true
serviceAccountName: app-controller-manager
terminationGracePeriodSeconds: 10
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "control-plane"
operator: In
values:
- controller-manager
topologyKey: "kubernetes.io/hostname"
12 changes: 12 additions & 0 deletions controllers/db/adminer/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -428,3 +428,15 @@ spec:
runAsNonRoot: true
serviceAccountName: adminer-controller-manager
terminationGracePeriodSeconds: 10
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "control-plane"
operator: In
values:
- controller-manager
topologyKey: "kubernetes.io/hostname"
14 changes: 13 additions & 1 deletion controllers/objectstorage/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -517,4 +517,16 @@ spec:
securityContext:
runAsNonRoot: true
serviceAccountName: objectstorage-controller-manager
terminationGracePeriodSeconds: 10
terminationGracePeriodSeconds: 10
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "control-plane"
operator: In
values:
- controller-manager
topologyKey: "kubernetes.io/hostname"
12 changes: 12 additions & 0 deletions controllers/terminal/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -459,3 +459,15 @@ spec:
runAsNonRoot: true
serviceAccountName: terminal-controller-manager
terminationGracePeriodSeconds: 10
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "control-plane"
operator: In
values:
- controller-manager
topologyKey: "kubernetes.io/hostname"
12 changes: 12 additions & 0 deletions controllers/user/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,18 @@ spec:
runAsNonRoot: true
serviceAccountName: user-controller-manager
terminationGracePeriodSeconds: 10
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "control-plane"
operator: In
values:
- controller-manager
topologyKey: "kubernetes.io/hostname"
volumes:
- name: cert
secret:
Expand Down
12 changes: 12 additions & 0 deletions frontend/desktop/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,18 @@ spec:
requests:
cpu: 100m
memory: 128Mi
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- desktop-frontend
topologyKey: "kubernetes.io/hostname"
volumes:
- name: desktop-frontend-volume
configMap:
Expand Down
12 changes: 12 additions & 0 deletions frontend/providers/adminer/deploy/manifests/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ spec:
- name: adminer-frontend-volume
mountPath: /config.yaml
subPath: config.yaml
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- adminer-frontend
topologyKey: "kubernetes.io/hostname"
volumes:
- name: adminer-frontend-volume
configMap:
Expand Down
12 changes: 12 additions & 0 deletions frontend/providers/applaunchpad/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ spec:
- mountPath: /app/data/form_slider_config.json
name: applaunchpad-frontend-volume
subPath: form_slider_config.json
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- applaunchpad-frontend
topologyKey: "kubernetes.io/hostname"
volumes:
- name: applaunchpad-frontend-volume
configMap:
Expand Down
12 changes: 12 additions & 0 deletions frontend/providers/costcenter/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ spec:
- name: costcenter-frontend-volume
mountPath: /config.yaml
subPath: config.yaml
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- costcenter-frontend
topologyKey: "kubernetes.io/hostname"
volumes:
- name: costcenter-frontend-volume
configMap:
Expand Down
12 changes: 12 additions & 0 deletions frontend/providers/cronjob/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ spec:
- name: cronjob-frontend-volume
mountPath: /config.yaml
subPath: config.yaml
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- cronjob-frontend
topologyKey: "kubernetes.io/hostname"
volumes:
- name: cronjob-frontend-volume
configMap:
Expand Down
12 changes: 12 additions & 0 deletions frontend/providers/dbprovider/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ spec:
- name: dbprovider-frontend-volume
mountPath: /config.yaml
subPath: config.yaml
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- dbprovider-frontend
topologyKey: "kubernetes.io/hostname"
volumes:
- name: dbprovider-frontend-volume
configMap:
Expand Down
12 changes: 12 additions & 0 deletions frontend/providers/kubepanel/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ spec:
- name: kubepanel-frontend-volume
mountPath: /config.yaml
subPath: config.yaml
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- kubepanel-frontend
topologyKey: "kubernetes.io/hostname"
volumes:
- name: kubepanel-frontend-volume
configMap:
Expand Down
12 changes: 12 additions & 0 deletions frontend/providers/license/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ spec:
- name: license-frontend-volume
mountPath: /config.yaml
subPath: config.yaml
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- license-frontend
topologyKey: "kubernetes.io/hostname"
volumes:
- name: license-frontend-volume
configMap:
Expand Down
12 changes: 12 additions & 0 deletions frontend/providers/objectstorage/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ spec:
memory: 128Mi
imagePullPolicy: Always
volumeMounts: []
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- object-storage-frontend
topologyKey: "kubernetes.io/hostname"
volumes: []
---
apiVersion: v1
Expand Down
12 changes: 12 additions & 0 deletions frontend/providers/template/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ spec:
subPath: config.json
- name: template-data
mountPath: /app/providers/template/templates
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- template-frontend
topologyKey: "kubernetes.io/hostname"
volumes:
- name: template-frontend-volume
configMap:
Expand Down
12 changes: 12 additions & 0 deletions frontend/providers/terminal/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ spec:
- name: terminal-frontend-volume
mountPath: /config.yaml
subPath: config.yaml
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- terminal-frontend
topologyKey: "kubernetes.io/hostname"
volumes:
- name: terminal-frontend-volume
configMap:
Expand Down
Loading