Skip to content

Commit

Permalink
Merge pull request #4056 from LiilyZhang/zhangl/cherry-pick-from-master
Browse files Browse the repository at this point in the history
Zhangl/cherry pick from master
  • Loading branch information
LiilyZhang committed May 7, 2024
2 parents 5b7547c + a35029d commit 0af3a37
Show file tree
Hide file tree
Showing 3 changed files with 29 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 @@ -21,6 +21,16 @@ spec:
openhorizon.org/component: agent
type: auto-upgrade-cronjob
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 @@ -18,6 +18,16 @@ spec:
app: agent
openhorizon.org/component: 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
9 changes: 9 additions & 0 deletions cli/node_management/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ func checkManifestFile(org, credToUse string, manifestData AgentUpgradeManifestD
}
mmsSoftwareFiles := getAgentFiles(org, credToUse, "agent_software_files", manSoftwareFilesVersion)
for _, manFile := range manSoftwareFiles {
if manFile == "*" {
continue
}
found := false
for _, mmsFile := range mmsSoftwareFiles {
if mmsFile.AgentFileName == manFile {
Expand Down Expand Up @@ -296,6 +299,9 @@ func checkManifestFile(org, credToUse string, manifestData AgentUpgradeManifestD
}
mmsCertFiles := getAgentFiles(org, credToUse, "agent_cert_files", manCertFilesVersion)
for _, manFile := range manCertFiles {
if manFile == "*" {
continue
}
found := false
for _, mmsFile := range mmsCertFiles {
if mmsFile.AgentFileName == manFile {
Expand Down Expand Up @@ -324,6 +330,9 @@ func checkManifestFile(org, credToUse string, manifestData AgentUpgradeManifestD
}
mmsConfigFiles := getAgentFiles(org, credToUse, "agent_config_files", manConfigFilesVersion)
for _, manFile := range manConfigFiles {
if manFile == "*" {
continue
}
found := false
for _, mmsFile := range mmsConfigFiles {
if mmsFile.AgentFileName == manFile {
Expand Down

0 comments on commit 0af3a37

Please sign in to comment.