Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup getDefaultMachineUser|Image #1611

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,3 +653,16 @@ func useUserConfigLocations() bool {
// GetRootlessUID == -1 on Windows, so exclude negative range
return unshare.GetRootlessUID() > 0
}

// getDefaultImage returns the default machine image stream
// On Windows this refers to the Fedora major release number
func getDefaultMachineImage() string {
return "testing"
}

// getDefaultMachineUser returns the user to use for rootless podman
// This is only for the apple, hyperv, and qemu implementations.
// WSL's user will be hardcoded in podman to "user"
func getDefaultMachineUser() string {
return "core"
}
11 changes: 0 additions & 11 deletions pkg/config/default_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ func getDefaultCgroupsMode() string {
return "enabled"
}

// getDefaultMachineImage returns the default machine image stream
// On Linux/Mac, this returns the FCOS stream
func getDefaultMachineImage() string {
return "testing"
}

// getDefaultMachineUser returns the user to use for rootless podman
func getDefaultMachineUser() string {
return "core"
}

// getDefaultProcessLimits returns the nproc for the current process in ulimits format
// Note that nfile sometimes cannot be set to unlimited, and the limit is hardcoded
// to (oldMaxSize) 1048576 (2^20), see: http://stackoverflow.com/a/1213069/1811501
Expand Down
11 changes: 0 additions & 11 deletions pkg/config/default_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@ package config

import "os"

// getDefaultMachineImage returns the default machine image stream
// On Linux/Mac, this returns the FCOS stream
func getDefaultMachineImage() string {
return "testing"
}

// getDefaultMachineUser returns the user to use for rootless podman
func getDefaultMachineUser() string {
return "core"
}

// isCgroup2UnifiedMode returns whether we are running in cgroup2 mode.
func isCgroup2UnifiedMode() (isUnified bool, isUnifiedErr error) {
return false, nil
Expand Down
13 changes: 0 additions & 13 deletions pkg/config/default_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@ package config

import "os"

// getDefaultImage returns the default machine image stream
// On Windows this refers to the Fedora major release number
func getDefaultMachineImage() string {
return "testing"
}

// getDefaultMachineUser returns the user to use for rootless podman
// This is only for the hyperv and qemu implementations. WSL's user
// will be hardcoded in podman to "user"
func getDefaultMachineUser() string {
return "core"
}

// isCgroup2UnifiedMode returns whether we are running in cgroup2 mode.
func isCgroup2UnifiedMode() (isUnified bool, isUnifiedErr error) {
return false, nil
Expand Down