Skip to content

Commit 5d0cbd2

Browse files
committed
fix : do not generate developer password, use "developer" as default value instead
By default developer password would be "developer" that could be overridden with configuration option developer-password Signed-off-by: Rohan Kumar <[email protected]>
1 parent e9a11fc commit 5d0cbd2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/crc/constants/constants.go

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const (
3030
BackgroundLauncherURL = "https://github.com/crc-org/win32-background-launcher/releases/download/v%s/win32-background-launcher.exe"
3131
DefaultBundleURLBase = "https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/%s/%s/%s"
3232
DefaultContext = "admin"
33+
DefaultDeveloperPassword = "developer"
3334
DaemonHTTPEndpoint = "http://unix/api"
3435
DaemonVsockPort = 1024
3536
DefaultPodmanNamedPipe = `\\.\pipe\crc-podman`

pkg/crc/machine/start.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,8 @@ func createHost(machineConfig config.MachineConfig, preset crcPreset.Preset) err
689689
if err := cluster.GenerateUserPassword(constants.GetKubeAdminPasswordPath(), "kubeadmin"); err != nil {
690690
return errors.Wrap(err, "Error generating new kubeadmin password")
691691
}
692-
if err := cluster.GenerateUserPassword(constants.GetDeveloperPasswordPath(), "developer"); err != nil {
693-
return errors.Wrap(err, "Error generating new developer password")
692+
if err = os.WriteFile(constants.GetDeveloperPasswordPath(), []byte(constants.DefaultDeveloperPassword), 0600); err != nil {
693+
return errors.Wrap(err, "Error writing developer password")
694694
}
695695
}
696696
if err := api.SetExists(vm.Name); err != nil {

0 commit comments

Comments
 (0)