Skip to content

Commit

Permalink
Issue #873 Remove the debug info from pullsecret functions
Browse files Browse the repository at this point in the history
Since we don't mask the pull secrets as part of debug output, it is
better to remove it. Be it a base64 or plain string.

Fixes #873
  • Loading branch information
praveenkumar committed Dec 10, 2019
1 parent 4f24a0a commit 4133d7d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/crc/pullsecret/pullsecret.go
Expand Up @@ -70,20 +70,18 @@ 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.RunPrivate(fmt.Sprintf("cat <<EOF | tee /tmp/pull-secret.yaml\n%s\nEOF", fmt.Sprintf(pullSecret, base64OfPullSec)))
_, err := sshRunner.RunPrivate(fmt.Sprintf("cat <<EOF | tee /tmp/pull-secret.yaml\n%s\nEOF", fmt.Sprintf(pullSecret, base64OfPullSec)))
if err != nil {
return err
}
logging.Debugf("Output is : %s", output)
return nil
}

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

Expand Down

0 comments on commit 4133d7d

Please sign in to comment.