Skip to content

Commit

Permalink
Merge pull request #4114 from LiilyZhang/zhangl/fixPodAffinity
Browse files Browse the repository at this point in the history
Issue #4040 (part2) - Cluster agent pod and cronjob pod i…
  • Loading branch information
LiilyZhang committed Jul 24, 2024
2 parents da44fb4 + b1d84fa commit 00d2385
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions agent-install/k8s/auto-upgrade-cronjob-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: __KubernetesApi__
kind: CronJob
metadata:
name: auto-upgrade-cronjob
labels:
app: agent
openhorizon.org/component: agent
type: auto-upgrade-cronjob
spec:
schedule: '*/1 * * * *'
concurrencyPolicy: Forbid
Expand All @@ -11,6 +15,11 @@ spec:
spec:
backoffLimit: 0
template:
metadata:
labels:
app: agent
openhorizon.org/component: agent
type: auto-upgrade-cronjob
spec:
affinity:
podAffinity:
Expand Down
5 changes: 5 additions & 0 deletions agent-install/k8s/deployment-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@ kind: Deployment
metadata:
name: agent
namespace: __AgentNameSpace__
labels:
app: agent
openhorizon.org/component: agent
spec:
replicas: 1
selector:
matchLabels:
app: agent
openhorizon.org/component: agent
template:
metadata:
labels:
app: agent
openhorizon.org/component: agent
spec:
affinity:
podAffinity:
Expand Down

0 comments on commit 00d2385

Please sign in to comment.