Skip to content

Commit

Permalink
CASMTRIAGE-7401 - fix job pod anti-affinity.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlaine-hpe committed Oct 18, 2024
1 parent 76ef9fa commit c5ec094
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 24 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- CASMTRIAGE-7401 - anti-affinity in the job pods.

## [3.19.0] - 2024-10-03

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,26 @@ data:
namespace: $namespace
spec:
backoffLimit: 0
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- cray-ims
namespaces:
- $namespace
template:
metadata:
labels:
app: ims-$id-create
app.kubernetes.io/name: ims-job
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- ims-job
namespaces:
- $namespace
runtimeClassName: $runtime_class
serviceAccountName: $service_account
restartPolicy: Never # Don't ever restart this job
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,28 @@ data:
namespace: $namespace
spec:
backoffLimit: 0
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- cray-ims
namespaces:
- $namespace
template:
metadata:
annotations:
io.katacontainers.config.hypervisor.virtio_fs_extra_args: '["-o", "xattr"]'
labels:
app: ims-$id-customize
app.kubernetes.io/name: ims-job
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- ims-job
namespaces:
- $namespace
runtimeClassName: $runtime_class
serviceAccountName: $service_account
restartPolicy: Never # Don't ever restart this job
Expand Down

0 comments on commit c5ec094

Please sign in to comment.