Skip to content

Commit

Permalink
fix : do not generate developer password, use "developer" as default …
Browse files Browse the repository at this point in the history
…value instead

By default developer password would be "developer" that could be
overridden with configuration option developer-password

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
  • Loading branch information
rohanKanojia committed Dec 13, 2024
1 parent e9a11fc commit 5d0cbd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/crc/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const (
BackgroundLauncherURL = "https://github.com/crc-org/win32-background-launcher/releases/download/v%s/win32-background-launcher.exe"
DefaultBundleURLBase = "https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/%s/%s/%s"
DefaultContext = "admin"
DefaultDeveloperPassword = "developer"
DaemonHTTPEndpoint = "http://unix/api"
DaemonVsockPort = 1024
DefaultPodmanNamedPipe = `\\.\pipe\crc-podman`
Expand Down
4 changes: 2 additions & 2 deletions pkg/crc/machine/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,8 @@ func createHost(machineConfig config.MachineConfig, preset crcPreset.Preset) err
if err := cluster.GenerateUserPassword(constants.GetKubeAdminPasswordPath(), "kubeadmin"); err != nil {
return errors.Wrap(err, "Error generating new kubeadmin password")
}
if err := cluster.GenerateUserPassword(constants.GetDeveloperPasswordPath(), "developer"); err != nil {
return errors.Wrap(err, "Error generating new developer password")
if err = os.WriteFile(constants.GetDeveloperPasswordPath(), []byte(constants.DefaultDeveloperPassword), 0600); err != nil {
return errors.Wrap(err, "Error writing developer password")
}
}
if err := api.SetExists(vm.Name); err != nil {
Expand Down

0 comments on commit 5d0cbd2

Please sign in to comment.