Skip to content

Commit

Permalink
Issue #873 Use RunPrivate for pullsecret commands
Browse files Browse the repository at this point in the history
Since now we have `RunPrivate` method for sshRunner, it should be
used for pull secrets commands.
  • Loading branch information
praveenkumar committed Dec 10, 2019
1 parent dab3a46 commit 4f24a0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/crc/pullsecret/pullsecret.go
Expand Up @@ -70,7 +70,7 @@ func AddPullSecretAndClusterID(sshRunner *ssh.SSHRunner, pullSec string, kubecon

func addpullSecretSpecToInstance(sshRunner *ssh.SSHRunner, pullSec string) error {
base64OfPullSec := base64.StdEncoding.EncodeToString([]byte(pullSec))
output, err := sshRunner.Run(fmt.Sprintf("cat <<EOF | tee /tmp/pull-secret.yaml\n%s\nEOF", fmt.Sprintf(pullSecret, base64OfPullSec)))
output, err := sshRunner.RunPrivate(fmt.Sprintf("cat <<EOF | tee /tmp/pull-secret.yaml\n%s\nEOF", fmt.Sprintf(pullSecret, base64OfPullSec)))
if err != nil {
return err
}
Expand All @@ -79,7 +79,7 @@ func addpullSecretSpecToInstance(sshRunner *ssh.SSHRunner, pullSec string) error
}

func addPullSecretToInstanceDisk(sshRunner *ssh.SSHRunner, pullSec string) error {
output, err := sshRunner.Run(fmt.Sprintf("cat <<EOF | sudo tee /var/lib/kubelet/config.json\n%s\nEOF", pullSec))
output, err := sshRunner.RunPrivate(fmt.Sprintf("cat <<EOF | sudo tee /var/lib/kubelet/config.json\n%s\nEOF", pullSec))
if err != nil {
return err
}
Expand Down

0 comments on commit 4f24a0a

Please sign in to comment.