Skip to content

Commit

Permalink
Revert "Replace references to old topology labels with the new ones"
Browse files Browse the repository at this point in the history
  • Loading branch information
mborsz authored Nov 12, 2020
1 parent ded6897 commit 187b927
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clusterloader2/pkg/prometheus/experimental.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (pc *Controller) tryRetrievePrometheusDiskMetadata() (bool, error) {
}
klog.V(2).Infof("Found Prometheus' PV with name: %s", pv.Name)
pdName = pv.Spec.GCEPersistentDisk.PDName
zone = pv.ObjectMeta.Labels["topology.kubernetes.io/zone"]
zone = pv.ObjectMeta.Labels["failure-domain.beta.kubernetes.io/zone"]
klog.V(2).Infof("PD name=%s, zone=%s", pdName, zone)
}
if pdName == "" || zone == "" {
Expand Down
4 changes: 2 additions & 2 deletions clusterloader2/pkg/util/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ type GCloudSSHExecutor struct{}
// Exec executes command on a given node with stdin provided.
// If stdin is nil, the process reads from null device.
func (e *GCloudSSHExecutor) Exec(command string, node *v1.Node, stdin io.Reader) error {
zone, ok := node.Labels["topology.kubernetes.io/zone"]
zone, ok := node.Labels["failure-domain.beta.kubernetes.io/zone"]
if !ok {
return fmt.Errorf("unknown zone for %q node: no topology.kubernetes.io/zone label", node.Name)
return fmt.Errorf("unknown zone for %q node: no failure-domain.beta.kubernetes.io/zone label", node.Name)
}
cmd := exec.Command("gcloud", "compute", "ssh", "--zone", zone, "--command", command, node.Name)
cmd.Stdin = stdin
Expand Down

0 comments on commit 187b927

Please sign in to comment.