config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEON_ROOT_VERBOSE = DefineKV("KUKEON_VERBOSE", "kukeon/verbose")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEON_ROOT_RUN_PATH = DefineKV("KUKEON_RUN_PATH", "kukeon/runPath")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEON_ROOT_LOG_LEVEL = DefineKV("KUKEON_LOG_LEVEL", "kukeon/logLevel", "info")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEON_ROOT_CONTAINERD_SOCKET = DefineKV("KUKEON_CONTAINERD_SOCKET", "kukeon/containerd.socket")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEON_ROOT_NAMESPACE_SUFFIX = DefineKV(
		"KUKEON_NAMESPACE_SUFFIX", "kukeon/namespaceSuffix", "kukeon.io",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEON_ROOT_CGROUP_ROOT = DefineKV("KUKEON_CGROUP_ROOT", "kukeon/cgroupRoot", "/kukeon")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEON_ROOT_HOST = DefineKV("KUKEON_HOST", "kukeon/host", "unix:///run/kukeon/kukeond.sock")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEON_ROOT_NO_DAEMON = DefineKV("KUKEON_NO_DAEMON", "kukeon/noDaemon", "false")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CONFIGURATION = DefineKV("KUKE_CONFIGURATION", "kuke/configuration")

	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEOND_SOCKET = DefineKV("KUKEOND_SOCKET", "kukeond/socket", "/run/kukeon/kukeond.sock")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEOND_SOCKET_GID = DefineKV("KUKEOND_SOCKET_GID", "kukeond/socketGID", "0")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEOND_CONFIGURATION = DefineKV(
		"KUKEOND_CONFIGURATION", "kukeond/configuration", "/etc/kukeon/kukeond.yaml",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKEOND_RECONCILE_INTERVAL = DefineKV(
		"KUKEOND_RECONCILE_INTERVAL", "kukeond/reconcileInterval", "30s",
	)

	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_INIT_REALM = DefineKV("KUKE_INIT_REALM", "kuke/init/realm")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_INIT_SPACE = DefineKV("KUKE_INIT_SPACE", "kuke/init/space")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_INIT_KUKEOND_IMAGE = DefineKV("KUKE_INIT_KUKEOND_IMAGE", "kuke/init/kukeondImage")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_INIT_SERVER_CONFIGURATION = DefineKV(
		"KUKE_INIT_SERVER_CONFIGURATION", "kuke/init/serverConfiguration", "/etc/kukeon/kukeond.yaml",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_INIT_NO_WAIT = DefineKV("KUKE_INIT_NO_WAIT", "kuke/init/noWait", "false")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_INIT_FORCE_REGENERATE_CNI = DefineKV(
		"KUKE_INIT_FORCE_REGENERATE_CNI", "kuke/init/forceRegenerateCNI", "false",
	)

	// Create command variables
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_REALM_NAME = DefineKV("KUKE_CREATE_REALM_NAME", "kuke/create/realm/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_SPACE_NAME = DefineKV("KUKE_CREATE_SPACE_NAME", "kuke/create/space/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_SPACE_REALM = DefineKV("KUKE_CREATE_SPACE_REALM", "kuke/create/space/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_STACK_NAME = DefineKV("KUKE_CREATE_STACK_NAME", "kuke/create/stack/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_STACK_REALM = DefineKV("KUKE_CREATE_STACK_REALM", "kuke/create/stack/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_STACK_SPACE = DefineKV("KUKE_CREATE_STACK_SPACE", "kuke/create/stack/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CELL_NAME = DefineKV("KUKE_CREATE_CELL_NAME", "kuke/create/cell/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CELL_REALM = DefineKV("KUKE_CREATE_CELL_REALM", "kuke/create/cell/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CELL_SPACE = DefineKV("KUKE_CREATE_CELL_SPACE", "kuke/create/cell/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CELL_STACK = DefineKV("KUKE_CREATE_CELL_STACK", "kuke/create/cell/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_NAME = DefineKV("KUKE_CREATE_CONTAINER_NAME", "kuke/create/container/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_REALM = DefineKV("KUKE_CREATE_CONTAINER_REALM", "kuke/create/container/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_SPACE = DefineKV("KUKE_CREATE_CONTAINER_SPACE", "kuke/create/container/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_STACK = DefineKV("KUKE_CREATE_CONTAINER_STACK", "kuke/create/container/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_CELL = DefineKV("KUKE_CREATE_CONTAINER_CELL", "kuke/create/container/cell")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_IMAGE = DefineKV(
		"KUKE_CREATE_CONTAINER_IMAGE",
		"kuke/create/container/image",
		"docker.io/library/debian:latest",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_ENV = DefineKV("KUKE_CREATE_CONTAINER_ENV", "kuke/create/container/env")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_PORTS = DefineKV("KUKE_CREATE_CONTAINER_PORTS", "kuke/create/container/ports")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_VOLUMES = DefineKV("KUKE_CREATE_CONTAINER_VOLUMES", "kuke/create/container/volumes")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_NETWORKS = DefineKV("KUKE_CREATE_CONTAINER_NETWORKS", "kuke/create/container/networks")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_NETWORK_ALIASES = DefineKV(
		"KUKE_CREATE_CONTAINER_NETWORK_ALIASES",
		"kuke/create/container/networkAliases",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_PRIVILEGED = DefineKV(
		"KUKE_CREATE_CONTAINER_PRIVILEGED",
		"kuke/create/container/privileged",
		"false",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_ROOT = DefineKV("KUKE_CREATE_CONTAINER_ROOT", "kuke/create/container/root", "false")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_CNI_CONFIG_PATH = DefineKV(
		"KUKE_CREATE_CONTAINER_CNI_CONFIG_PATH",
		"kuke/create/container/cniConfigPath",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_RESTART_POLICY = DefineKV(
		"KUKE_CREATE_CONTAINER_RESTART_POLICY",
		"kuke/create/container/restartPolicy",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_LABELS = DefineKV("KUKE_CREATE_CONTAINER_LABELS", "kuke/create/container/labels")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_USER = DefineKV("KUKE_CREATE_CONTAINER_USER", "kuke/create/container/user")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_READ_ONLY = DefineKV(
		"KUKE_CREATE_CONTAINER_READ_ONLY",
		"kuke/create/container/readOnlyRootFilesystem",
		"false",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_CAP_DROP = DefineKV("KUKE_CREATE_CONTAINER_CAP_DROP", "kuke/create/container/capabilities/drop")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_CAP_ADD = DefineKV("KUKE_CREATE_CONTAINER_CAP_ADD", "kuke/create/container/capabilities/add")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_SECURITY_OPTS = DefineKV(
		"KUKE_CREATE_CONTAINER_SECURITY_OPTS",
		"kuke/create/container/securityOpts",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_TMPFS = DefineKV("KUKE_CREATE_CONTAINER_TMPFS", "kuke/create/container/tmpfs")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_MEMORY = DefineKV(
		"KUKE_CREATE_CONTAINER_MEMORY",
		"kuke/create/container/resources/memoryLimitBytes",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_CPU_SHARES = DefineKV(
		"KUKE_CREATE_CONTAINER_CPU_SHARES",
		"kuke/create/container/resources/cpuShares",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_CREATE_CONTAINER_PIDS_LIMIT = DefineKV(
		"KUKE_CREATE_CONTAINER_PIDS_LIMIT",
		"kuke/create/container/resources/pidsLimit",
	)

	// Get command variables
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_REALM_NAME = DefineKV("KUKE_GET_REALM_NAME", "kuke/get/realm/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_SPACE_NAME = DefineKV("KUKE_GET_SPACE_NAME", "kuke/get/space/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_SPACE_REALM = DefineKV("KUKE_GET_SPACE_REALM", "kuke/get/space/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_STACK_NAME = DefineKV("KUKE_GET_STACK_NAME", "kuke/get/stack/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_STACK_REALM = DefineKV("KUKE_GET_STACK_REALM", "kuke/get/stack/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_STACK_SPACE = DefineKV("KUKE_GET_STACK_SPACE", "kuke/get/stack/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_CELL_NAME = DefineKV("KUKE_GET_CELL_NAME", "kuke/get/cell/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_CELL_REALM = DefineKV("KUKE_GET_CELL_REALM", "kuke/get/cell/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_CELL_SPACE = DefineKV("KUKE_GET_CELL_SPACE", "kuke/get/cell/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_CELL_STACK = DefineKV("KUKE_GET_CELL_STACK", "kuke/get/cell/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_CONTAINER_NAME = DefineKV("KUKE_GET_CONTAINER_NAME", "kuke/get/container/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_CONTAINER_REALM = DefineKV("KUKE_GET_CONTAINER_REALM", "kuke/get/container/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_CONTAINER_SPACE = DefineKV("KUKE_GET_CONTAINER_SPACE", "kuke/get/container/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_CONTAINER_STACK = DefineKV("KUKE_GET_CONTAINER_STACK", "kuke/get/container/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_CONTAINER_CELL = DefineKV("KUKE_GET_CONTAINER_CELL", "kuke/get/container/cell")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_GET_OUTPUT = DefineKV("KUKE_GET_OUTPUT", "kuke/get/output")

	// Delete command variables
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_REALM_NAME = DefineKV("KUKE_DELETE_REALM_NAME", "kuke/delete/realm/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_SPACE_NAME = DefineKV("KUKE_DELETE_SPACE_NAME", "kuke/delete/space/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_SPACE_REALM = DefineKV("KUKE_DELETE_SPACE_REALM", "kuke/delete/space/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_STACK_NAME = DefineKV("KUKE_DELETE_STACK_NAME", "kuke/delete/stack/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_STACK_REALM = DefineKV("KUKE_DELETE_STACK_REALM", "kuke/delete/stack/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_STACK_SPACE = DefineKV("KUKE_DELETE_STACK_SPACE", "kuke/delete/stack/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_CELL_NAME = DefineKV("KUKE_DELETE_CELL_NAME", "kuke/delete/cell/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_CELL_REALM = DefineKV("KUKE_DELETE_CELL_REALM", "kuke/delete/cell/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_CELL_SPACE = DefineKV("KUKE_DELETE_CELL_SPACE", "kuke/delete/cell/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_CELL_STACK = DefineKV("KUKE_DELETE_CELL_STACK", "kuke/delete/cell/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_CONTAINER_NAME = DefineKV("KUKE_DELETE_CONTAINER_NAME", "kuke/delete/container/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_CONTAINER_REALM = DefineKV("KUKE_DELETE_CONTAINER_REALM", "kuke/delete/container/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_CONTAINER_SPACE = DefineKV("KUKE_DELETE_CONTAINER_SPACE", "kuke/delete/container/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_CONTAINER_STACK = DefineKV("KUKE_DELETE_CONTAINER_STACK", "kuke/delete/container/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_CONTAINER_CELL = DefineKV("KUKE_DELETE_CONTAINER_CELL", "kuke/delete/container/cell")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_FORCE = DefineKV("KUKE_DELETE_FORCE", "kuke/delete/force")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DELETE_CASCADE = DefineKV("KUKE_DELETE_CASCADE", "kuke/delete/cascade")

	// Purge command variables
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_SPACE_REALM = DefineKV("KUKE_PURGE_SPACE_REALM", "kuke/purge/space/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_STACK_REALM = DefineKV("KUKE_PURGE_STACK_REALM", "kuke/purge/stack/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_STACK_SPACE = DefineKV("KUKE_PURGE_STACK_SPACE", "kuke/purge/stack/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_CELL_REALM = DefineKV("KUKE_PURGE_CELL_REALM", "kuke/purge/cell/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_CELL_SPACE = DefineKV("KUKE_PURGE_CELL_SPACE", "kuke/purge/cell/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_CELL_STACK = DefineKV("KUKE_PURGE_CELL_STACK", "kuke/purge/cell/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_CONTAINER_REALM = DefineKV("KUKE_PURGE_CONTAINER_REALM", "kuke/purge/container/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_CONTAINER_SPACE = DefineKV("KUKE_PURGE_CONTAINER_SPACE", "kuke/purge/container/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_CONTAINER_STACK = DefineKV("KUKE_PURGE_CONTAINER_STACK", "kuke/purge/container/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_CONTAINER_CELL = DefineKV("KUKE_PURGE_CONTAINER_CELL", "kuke/purge/container/cell")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_FORCE = DefineKV("KUKE_PURGE_FORCE", "kuke/purge/force")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_PURGE_CASCADE = DefineKV("KUKE_PURGE_CASCADE", "kuke/purge/cascade")

	// Start command variables
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_START_CELL_REALM = DefineKV("KUKE_START_CELL_REALM", "kuke/start/cell/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_START_CELL_SPACE = DefineKV("KUKE_START_CELL_SPACE", "kuke/start/cell/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_START_CELL_STACK = DefineKV("KUKE_START_CELL_STACK", "kuke/start/cell/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_START_CONTAINER_REALM = DefineKV("KUKE_START_CONTAINER_REALM", "kuke/start/container/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_START_CONTAINER_SPACE = DefineKV("KUKE_START_CONTAINER_SPACE", "kuke/start/container/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_START_CONTAINER_STACK = DefineKV("KUKE_START_CONTAINER_STACK", "kuke/start/container/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_START_CONTAINER_CELL = DefineKV("KUKE_START_CONTAINER_CELL", "kuke/start/container/cell")

	// Run command variables.
	//nolint:revive,gochecknoglobals,staticcheck,godoclint // ignore linter warning about this variable
	KUKE_RUN_FILE = DefineKV("KUKE_RUN_FILE", "kuke/run/file")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_RUN_OUTPUT = DefineKV("KUKE_RUN_OUTPUT", "kuke/run/output")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_RUN_REALM = DefineKV("KUKE_RUN_REALM", "kuke/run/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_RUN_SPACE = DefineKV("KUKE_RUN_SPACE", "kuke/run/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_RUN_STACK = DefineKV("KUKE_RUN_STACK", "kuke/run/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_RUN_DETACH = DefineKV("KUKE_RUN_DETACH", "kuke/run/detach")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_RUN_CONTAINER = DefineKV("KUKE_RUN_CONTAINER", "kuke/run/container")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_RUN_PROFILE = DefineKV("KUKE_RUN_PROFILE", "kuke/run/profile")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_RUN_RM = DefineKV("KUKE_RUN_RM", "kuke/run/rm")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_RUN_NAME = DefineKV("KUKE_RUN_NAME", "kuke/run/name")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_RUN_PARAM_FILE = DefineKV("KUKE_RUN_PARAM_FILE", "kuke/run/param-file")

	// Attach command variables
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_ATTACH_REALM = DefineKV("KUKE_ATTACH_REALM", "kuke/attach/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_ATTACH_SPACE = DefineKV("KUKE_ATTACH_SPACE", "kuke/attach/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_ATTACH_STACK = DefineKV("KUKE_ATTACH_STACK", "kuke/attach/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_ATTACH_CONTAINER = DefineKV("KUKE_ATTACH_CONTAINER", "kuke/attach/container")

	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_LOG_REALM = DefineKV("KUKE_LOG_REALM", "kuke/log/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_LOG_SPACE = DefineKV("KUKE_LOG_SPACE", "kuke/log/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_LOG_STACK = DefineKV("KUKE_LOG_STACK", "kuke/log/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_LOG_CONTAINER = DefineKV("KUKE_LOG_CONTAINER", "kuke/log/container")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_LOG_FOLLOW = DefineKV("KUKE_LOG_FOLLOW", "kuke/log/follow", "false")

	// Stop command variables
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_STOP_CELL_REALM = DefineKV("KUKE_STOP_CELL_REALM", "kuke/stop/cell/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_STOP_CELL_SPACE = DefineKV("KUKE_STOP_CELL_SPACE", "kuke/stop/cell/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_STOP_CELL_STACK = DefineKV("KUKE_STOP_CELL_STACK", "kuke/stop/cell/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_STOP_CONTAINER_REALM = DefineKV("KUKE_STOP_CONTAINER_REALM", "kuke/stop/container/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_STOP_CONTAINER_SPACE = DefineKV("KUKE_STOP_CONTAINER_SPACE", "kuke/stop/container/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_STOP_CONTAINER_STACK = DefineKV("KUKE_STOP_CONTAINER_STACK", "kuke/stop/container/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_STOP_CONTAINER_CELL = DefineKV("KUKE_STOP_CONTAINER_CELL", "kuke/stop/container/cell")

	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_UNINSTALL_YES = DefineKV("KUKE_UNINSTALL_YES", "kuke/uninstall/yes", "false")

	// Kill command variables
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_KILL_CELL_REALM = DefineKV("KUKE_KILL_CELL_REALM", "kuke/kill/cell/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_KILL_CELL_SPACE = DefineKV("KUKE_KILL_CELL_SPACE", "kuke/kill/cell/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_KILL_CELL_STACK = DefineKV("KUKE_KILL_CELL_STACK", "kuke/kill/cell/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_KILL_CONTAINER_REALM = DefineKV("KUKE_KILL_CONTAINER_REALM", "kuke/kill/container/realm", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_KILL_CONTAINER_SPACE = DefineKV("KUKE_KILL_CONTAINER_SPACE", "kuke/kill/container/space", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_KILL_CONTAINER_STACK = DefineKV("KUKE_KILL_CONTAINER_STACK", "kuke/kill/container/stack", "default")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_KILL_CONTAINER_CELL = DefineKV("KUKE_KILL_CONTAINER_CELL", "kuke/kill/container/cell")

	//nolint:revive,gochecknoglobals,staticcheck // daemon command variables
	KUKE_DAEMON_STOP_TIMEOUT = DefineKV("KUKE_DAEMON_STOP_TIMEOUT", "kuke/daemon/stop/timeout", "10s")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DAEMON_RESTART_TIMEOUT = DefineKV("KUKE_DAEMON_RESTART_TIMEOUT", "kuke/daemon/restart/timeout", "10s")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DAEMON_RESET_TIMEOUT = DefineKV("KUKE_DAEMON_RESET_TIMEOUT", "kuke/daemon/reset/timeout", "10s")
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DAEMON_RESET_PURGE_SYSTEM = DefineKV(
		"KUKE_DAEMON_RESET_PURGE_SYSTEM", "kuke/daemon/reset/purgeSystem", "false",
	)
	//nolint:revive,gochecknoglobals,staticcheck // ignore linter warning about this variable
	KUKE_DAEMON_LOGS_FOLLOW = DefineKV("KUKE_DAEMON_LOGS_FOLLOW", "kuke/daemon/logs/follow", "false")
)

---- Declare statically (Viper key optional per var) ----.

View Source
var KukeondImageRepo = "ghcr.io/eminwux/kukeon"

KukeondImageRepo is the OCI image reference (without tag) that `kuke init` will provision for the kukeond system cell when the user does not pass --kukeond-image. The release pipeline injects the ghcr.io path that the matching kukeond image is published to.

View Source
var Version = "0.1.0"

Version is the kuke/kukeond build version.

Functions

func CompleteCellNames

func CompleteCellNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteCellNames provides shell completion for cell names by listing existing cells. This function can be used as a ValidArgsFunction or for flag completion in commands that accept cell names. It optionally filters by realm, space, and stack if --realm, --space, and --stack flags are set. When used as ValidArgsFunction, it requires --realm, --space, and --stack flags to be set before completing positional arguments.

func CompleteContainerNames

func CompleteContainerNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteContainerNames provides shell completion for container names by listing existing containers. This function can be used as a ValidArgsFunction or for flag completion in commands that accept container names. It requires --realm, --space, --stack, and --cell flags to be set to filter containers. When used as ValidArgsFunction, it requires --realm, --space, --stack, and --cell flags to be set before completing positional arguments.

func CompleteOutputFormat

func CompleteOutputFormat(_ *cobra.Command, _ []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteOutputFormat provides shell completion for output format values (yaml, json, table). This function can be used for flag completion in commands that accept output format flags.

func CompleteProfileNames added in v0.3.0

func CompleteProfileNames(_ *cobra.Command, _ []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteProfileNames provides shell completion for `-p/--profile` by listing every CellProfile under the active profiles directory ($KUKE_PROFILES_DIR or $HOME/.kuke/profiles.d). Errors swallow to an empty list — a fresh shell with no profiles directory should not surface a noisy completion error.

func CompleteRealmNames

func CompleteRealmNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteRealmNames provides shell completion for realm names by listing existing realms. This function can be used as a ValidArgsFunction or for flag completion in commands that accept realm names.

func CompleteSpaceNames

func CompleteSpaceNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteSpaceNames provides shell completion for space names by listing existing spaces. This function can be used as a ValidArgsFunction or for flag completion in commands that accept space names. It optionally filters by realm if --realm flag is set. When used as ValidArgsFunction, it requires --realm flag to be set before completing positional arguments.

func CompleteStackNames

func CompleteStackNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteStackNames provides shell completion for stack names by listing existing stacks. This function can be used as a ValidArgsFunction or for flag completion in commands that accept stack names. It optionally filters by realm and space if --realm and --space flags are set. When used as ValidArgsFunction, it requires --realm and --space flags to be set before completing positional arguments.

func DefaultClientConfigurationFile added in v0.3.0

func DefaultClientConfigurationFile() string

DefaultClientConfigurationFile is the on-disk path the `kuke` client reads when the user does not pass `--configuration`. An absent file is not an error — the client falls back to its hardcoded defaults.

func DefaultProfilesFile

func DefaultProfilesFile() string

func DefaultRunPath

func DefaultRunPath() string

func DefaultServerConfigurationFile added in v0.3.0

func DefaultServerConfigurationFile() string

DefaultServerConfigurationFile is the on-disk path the kukeond daemon and `kuke init` read when the user does not pass `--configuration` or `--server-configuration`. An absent file is not an error — the daemon falls back to its hardcoded defaults.

func GetProfilesFileFromEnvAndFlags

func GetProfilesFileFromEnvAndFlags(cmd *cobra.Command, viperKey string) (string, error)

func GetRunPathFromEnvAndFlags

func GetRunPathFromEnvAndFlags(cmd *cobra.Command, viperKey string) (string, error)

func KV

func KV(v Var, value string) string

Types

type MockControllerKey

type MockControllerKey struct{}

MockControllerKey is used to inject mock controllers in tests via context.

type Var

type Var struct {
	Key        string // e.g. "KUKEON_RUN_PATH"
	ViperKey   string // optional, e.g. "global.runPath"
	CobraKey   string // optional, e.g. "run-path"
	Default    string // optional
	HasDefault bool
}

func Define

func Define(envName string, defaultVal ...string) Var

func DefineKV

func DefineKV(envName, viperKey string, defaultVal ...string) Var

func (*Var) BindEnv

func (v *Var) BindEnv() error

BindEnv is safe if ViperKey is empty: does nothing.

func (*Var) DefaultValue

func (v *Var) DefaultValue() (string, bool)

func (*Var) EnvKey

func (v *Var) EnvKey() string

func (*Var) EnvVar

func (v *Var) EnvVar() string

func (*Var) Set

func (v *Var) Set(value string) error

func (*Var) SetDefault

func (v *Var) SetDefault(val string)

func (*Var) ValueOrDefault

func (v *Var) ValueOrDefault() string

ValueOrDefault defines precedence: viper (if ViperKey set and value present) → OS env → default → "".

Jump to

Keyboard shortcuts

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