constant

package
v0.0.0-...-735b8cc Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNameServer1   = "1.1.1.1"
	DefaultNameServer2   = "8.8.8.8"
	DefaultSearchDomain1 = "cluster.local"
	DefaultDNSOption1    = "ndots:5"
)

default dns config

View Source
const (
	// aranya defaults
	DefaultAranyaConfigFile  = "/etc/aranya/config.yaml"
	DefaultKubeletRegDir     = "/var/lib/kubelet/plugins_registry"
	DefaultKubeletPluginsDir = "/var/lib/kubelet/plugins"
	DefaultAranyaStorageDir  = "/var/lib/aranya"
	DefaultAranyaPodLogDir   = "/var/log/pods"
	DefaultSFTPHostKeyFile   = "/etc/ssh/ssh_host_ed25519_key"
)

Default file and dirs

View Source
const (
	DefaultNodeLeaseDuration       = 40 * time.Second
	DefaultNodeLeaseUpdateInterval = 10 * time.Second
	DefaultMirrorNodeSyncInterval  = 10 * time.Second
)

Defaults intervals

View Source
const (
	DefaultUnarySessionTimeout   = 10 * time.Minute
	DefaultStreamIdleTimeout     = 4 * time.Hour
	DefaultStreamCreationTimeout = 30 * time.Second
)

Default timeouts

View Source
const (
	DefaultBackoffInitialDelay = 5 * time.Second
	DefaultBackoffMaxDelay     = 30 * time.Second
	DefaultBackoffFactor       = float64(1.2)
)
View Source
const (
	EnvKeySysNamespace    = "SYS_NAMESPACE"
	EnvKeyTenantNamespace = "TENANT_NAMESPACE"
)
View Source
const (
	Finalizer_ClusterNetwork        = "aranya.arhat.dev/cluster-network"
	Finalizer_ClusterNetworkManager = "aranya.arhat.dev/cluster-network-manager"
)

nolint:revive

View Source
const (
	IdentifierLogDir  = "[dir]"
	IdentifierLogFile = "[file]"
)
View Source
const (
	LabelKey_Role = "arhat.dev/role"

	LabelRoleValue_Connectivity    = "Connectivity"
	LabelRoleValue_Certificate     = "NodeCertificate"
	LabelRoleValue_Node            = "Node"
	LabelRoleValue_Abbot           = "Abbot"
	LabelRoleValue_NodeClusterRole = "NodeClusterRole"
	LabelRoleValue_PodRole         = "PodRole"
	LabelRoleValue_NodeLease       = "NodeLease"
)

Label role values identifies resource object's functionality in `aranya` nolint:revive

View Source
const (
	LabelKey_Namespace = "arhat.dev/namespace"
	LabelKey_Name      = "arhat.dev/name"
	LabelKey_Arch      = "arhat.dev/arch"
)

nolint:revive

View Source
const (
	LabelKey_AranyaLeadership = "aranya.arhat.dev/leadership"

	LabelAranyaLeadershipValue_Leader = "leader"
)

nolint:revive

View Source
const (
	// VirtualImageName_Host is a special image name respected by aranya
	VirtualImageName_Host = "virtualimage.arhat.dev/host"

	// VirtualImageName_Peripheral is a special image name respected by aranya.
	//
	// aranya treats exec commands to the container with this image name
	// as device operation, if command is valid, will send operate command to
	// arhat, then arhat will perform the requested device operation
	VirtualImageName_Peripheral = "virtualimage.arhat.dev/peripheral"

	// VirtualImageName_HostExec is a special image name respected by aranya.
	//
	// aranya treats exec commands to this container with this image name
	// as host exec, and will send pod exec command to arhat, then arhat will
	// execute the commands specified
	//
	// specify the script interpreter in `command` and commands to execute in
	// args, if no `command` is specified, will default to `sh`
	// (usually /bin/sh in your host)
	VirtualImageName_HostExec = "virtualimage.arhat.dev/hostexec"
)

virtual image names nolint:revive

View Source
const (
	VirtualImageID_Host       = "virtualimage://host"
	VirtualImageID_Peripheral = "virtualimage://peripheral"
	VirtualImageID_HostExec   = "virtualimage://hostexec"
)

virtual image ids (for corresponding image names) nolint:revive

View Source
const (
	VirtualContainerID_Host       = "virtualcontainer://host"
	VirtualContainerID_Peripheral = "virtualcontainer://peripheral"
)

virtual container ids (for corresponding images) nolint:revive

View Source
const (
	ContainerNameAbbot = "abbot"
)
View Source
const (
	ContextKeyConfig = ContextKey("config")
)
View Source
const (
	DefaultExitCodeOnError = 128
)
View Source
const (
	// additional 20ms is not sensible in most case but would be helpful
	// to reduce protocol overhead
	InteractiveStreamReadTimeout = 20 * time.Millisecond
)
View Source
const (
	LabelKey_KubernetesRole = "kubernetes.io/role"
)

Well-known kubernetes role label for node objects nolint:revive

View Source
const (
	// max 1MB buf size for data streaming
	MaxBufSize = 1 * 1024 * 1024
)
View Source
const (
	MeshConfigKey_WireguardPrivateKey = "wireguard.private-key"
)

mesh config keys nolint:revive

View Source
const (
	NetworkMeshDriverName_Wireguard = "wireguard"
)

Network mesh driver names nolint:revive

View Source
const (
	PrefixMeshInterfaceProviderAranya = "aranya:mesh:"
)
View Source
const (
	TLSCaCertKey = "ca.crt"
)
View Source
const (
	TaintKey_Namespace = LabelKey_Namespace
)

nolint:revive

View Source
const (
	TimeLayout = time.RFC3339Nano
)

date formats

View Source
const (
	VirtualContainerName_Host = "host"
)

virtual container names nolint:revive

View Source
const (
	WireguardKeyLength = 32
)

Variables

This section is empty.

Functions

func SysNS

func SysNS() string

SysNS returns the value of environment variable SYS_NAMESPACE

func TenantNS

func TenantNS() string

TenantNS returns the value of environment variable TENANT_NAMESPACE

Types

type ContextKey

type ContextKey string

Jump to

Keyboard shortcuts

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