Skip to content

Commit

Permalink
Merge pull request k8stopologyawareschedwg#71 from k8stopologyawaresc…
Browse files Browse the repository at this point in the history
…hedwg/fix_cm

Mount configmap with the correct name
  • Loading branch information
ffromani authored Nov 30, 2021
2 parents 10523ae + 0d7f5e6 commit a27c296
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions pkg/manifests/rte/rte.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,12 @@ func (mf Manifests) Update(options UpdateOptions) Manifests {
ret.DaemonSet.Spec.Template.Spec.ServiceAccountName = mf.ServiceAccount.Name

rteConfigMapName := ""
if len(options.ConfigData) > 0 {
ret.ConfigMap = CreateConfigMap(ret.DaemonSet.Namespace, manifests.RTEConfigMapName, options.ConfigData)
}

if ret.ConfigMap != nil {
rteConfigMapName = manifests.RTEConfigMapName
rteConfigMapName = ret.ConfigMap.Name
}
manifests.UpdateResourceTopologyExporterDaemonSet(
ret.DaemonSet, rteConfigMapName, options.PullIfNotPresent, options.NodeSelector)
Expand All @@ -124,9 +128,6 @@ func (mf Manifests) Update(options UpdateOptions) Manifests {
manifests.UpdateSecurityContextConstraint(ret.SecurityContextConstraint, ret.ServiceAccount)
}

if len(options.ConfigData) > 0 {
ret.ConfigMap = CreateConfigMap(ret.DaemonSet.Namespace, ret.DaemonSet.Name, options.ConfigData)
}
return ret
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/manifests/updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

const (
metricsPort = 2112
rteConfigMountName = "rte-config"
rteConfigMountName = "rte-config-volume"
RTEConfigMapName = "rte-config"
)

Expand Down

0 comments on commit a27c296

Please sign in to comment.