constants

package
v2.44.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultName     = "crc"
	DefaultDiskSize = 31

	DefaultPersistentVolumeSize = 15

	DefaultSSHUser = "core"
	DefaultSSHPort = 22

	CrcEnvPrefix = "CRC"

	ConfigFile                = "crc.json"
	LogFile                   = "crc.log"
	DaemonLogFile             = "crcd.log"
	CrcLandingPageURL         = "https://console.redhat.com/openshift/create/local" // #nosec G101
	DefaultAdminHelperURLBase = "https://github.com/crc-org/admin-helper/releases/download/v%s/%s"
	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"
	DaemonHTTPEndpoint        = "http://unix/api"
	DaemonVsockPort           = 1024
	DefaultPodmanNamedPipe    = `\\.\pipe\crc-podman`
	RootlessPodmanSocket      = "/run/user/1000/podman/podman.sock"
	RootfulPodmanSocket       = "/run/podman/podman.sock"

	VSockGateway = "192.168.127.1"
	VsockSSHPort = 2222
	LocalIP      = "127.0.0.1"

	OkdPullSecret = `{"auths":{"fake":{"auth": "Zm9vOmJhcgo="}}}` // #nosec G101

	RegistryURI         = "quay.io/crcont"
	ClusterDomain       = ".crc.testing"
	AppsDomain          = ".apps-crc.testing"
	MicroShiftAppDomain = ".apps.crc.testing"

	OpenShiftIngressHTTPPort  = 80
	OpenShiftIngressHTTPSPort = 443

	BackgroundLauncherExecutable = "crc-background-launcher.exe"
)
View Source
const (
	OcExecutableName           = "oc"
	PodmanRemoteExecutableName = "podman-remote"
	TapSocketPath              = ""
)
View Source
const (
	// This public key is owned by the CRC team (crc@crc.dev), and is used
	// to sign bundles uploaded to an image registry.
	// It can be fetched with: `gpg --recv-key DC7EAC400A1BFDFB`
	CrcOrgPublicKey = `` /* 684-byte string literal not displayed */

	RedHatReleaseKey = `` /* 1638-byte string literal not displayed */

)

Variables

View Source
var (
	CrcBaseDir         = filepath.Join(GetHomeDir(), ".crc")
	CrcBinDir          = filepath.Join(CrcBaseDir, "bin")
	CrcOcBinDir        = filepath.Join(CrcBinDir, "oc")
	CrcPodmanBinDir    = filepath.Join(CrcBinDir, "podman")
	CrcSymlinkPath     = filepath.Join(CrcBinDir, "crc")
	ConfigPath         = filepath.Join(CrcBaseDir, ConfigFile)
	LogFilePath        = filepath.Join(CrcBaseDir, LogFile)
	DaemonLogFilePath  = filepath.Join(CrcBaseDir, DaemonLogFile)
	MachineBaseDir     = CrcBaseDir
	MachineCacheDir    = filepath.Join(MachineBaseDir, "cache")
	MachineInstanceDir = filepath.Join(MachineBaseDir, "machines")
	DaemonSocketPath   = filepath.Join(CrcBaseDir, "crc.sock")
	KubeconfigFilePath = filepath.Join(MachineInstanceDir, DefaultName, "kubeconfig")
	PasswdFilePath     = filepath.Join(MachineInstanceDir, DefaultName, "passwd")
)
View Source
var DaemonHTTPSocketPath = filepath.Join(CrcBaseDir, "crc-http.sock")

Functions

func AdminHelperPath

func AdminHelperPath() string

func BundleForPreset

func BundleForPreset(preset crcpreset.Preset, version string) string

func EnsureBaseDirectoriesExist

func EnsureBaseDirectoriesExist() error

EnsureBaseDirectoriesExist creates ~/.crc, ~/.crc/bin and ~/.crc/cache directories if it is not present

func GetAdminHelperExecutableForOs

func GetAdminHelperExecutableForOs(os string) string

func GetAdminHelperURL

func GetAdminHelperURL() string

func GetAdminHelperURLForOs

func GetAdminHelperURLForOs(os string) string

func GetDefaultBundle

func GetDefaultBundle(preset crcpreset.Preset) string

func GetDefaultBundleDownloadURL

func GetDefaultBundleDownloadURL(preset crcpreset.Preset) string

func GetDefaultBundleImageRegistry

func GetDefaultBundleImageRegistry(preset crcpreset.Preset) string

func GetDefaultBundlePath

func GetDefaultBundlePath(preset crcpreset.Preset) string

func GetDefaultBundleSignedHashURL

func GetDefaultBundleSignedHashURL(preset crcpreset.Preset) string

func GetDefaultCPUs

func GetDefaultCPUs(preset crcpreset.Preset) uint

func GetDefaultMemory

func GetDefaultMemory(preset crcpreset.Preset) uint

func GetECDSAPrivateKeyPath added in v2.41.0

func GetECDSAPrivateKeyPath() string

For backward compatibility to v 2.40.0

func GetHomeDir

func GetHomeDir() string

GetHomeDir returns the home directory for the current user

func GetHostDockerSocketPath

func GetHostDockerSocketPath() string

func GetKubeAdminPasswordPath

func GetKubeAdminPasswordPath() string

func GetPrivateKeyPath

func GetPrivateKeyPath() string

func GetPublicKeyPath

func GetPublicKeyPath() string

func GetWin32BackgroundLauncherDownloadURL added in v2.31.0

func GetWin32BackgroundLauncherDownloadURL() string

func ResolveHelperPath

func ResolveHelperPath(executableName string) string

func Win32BackgroundLauncherPath added in v2.31.0

func Win32BackgroundLauncherPath() string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL