Skip to content

Commit

Permalink
Issue #4040 - Cluster agent pod and cronjob pod in same k8s node
Browse files Browse the repository at this point in the history
Signed-off-by: Le Zhang <[email protected]>
  • Loading branch information
LiilyZhang committed Jul 18, 2024
1 parent f2b21e9 commit bcf8860
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions agent-install/k8s/auto-upgrade-cronjob-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ spec:
backoffLimit: 0
template:
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: openhorizon.org/component
operator: In
values:
- agent
topologyKey: kubernetes.io/hostname
volumes:
- name: agent-pvc-storage
persistentVolumeClaim:
Expand Down
10 changes: 10 additions & 0 deletions agent-install/k8s/deployment-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ spec:
labels:
app: agent
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: openhorizon.org/component
operator: In
values:
- agent
topologyKey: kubernetes.io/hostname
serviceAccountName: agent-service-account
volumes:
- name: agent-etc-vol
Expand Down

0 comments on commit bcf8860

Please sign in to comment.