Documentation
¶
Index ¶
- Constants
- Variables
- func BuildEnv(in BuildInput) []string
- func BuildLabels(in BuildInput) map[string]string
- func IsControllerRole(labels map[string]string) bool
- func IsEdgeletRole(labels map[string]string) bool
- func IsLocalApplication(application string) bool
- func IsLocalScope(scope string) bool
- func IsManagedByIofog(labels map[string]string) bool
- func IsSystemWorkload(labels map[string]string) bool
- func MergeUserLabels(user map[string]string, canonical map[string]string) map[string]string
- func MicroserviceUIDFromLabels(labels map[string]string) string
- func ResolveScope(application string, hostNetwork bool) string
- func RoleFromLabels(labels map[string]string) string
- func RoleFromMicroservice(isRouter, isNats bool) string
- func ScopeFromMicroservice(application string, hostNetwork bool) string
- type BuildInput
Constants ¶
View Source
const ( RuntimeEngineDocker = "docker" RuntimeEnginePodman = "podman" RuntimeEngineEdgelet = "edgelet" )
View Source
const ( RoleWorkload = "workload" RoleRouter = "router" RoleNats = "nats" RoleController = "controller" RoleEdgelet = "edgelet" )
View Source
const ( ScopeManaged = "managed" ScopeLocal = "local" )
View Source
const ( LabelAppName = "app.kubernetes.io/name" LabelAppInstance = "app.kubernetes.io/instance" LabelAppPartOf = "app.kubernetes.io/part-of" LabelAppManagedBy = "app.kubernetes.io/managed-by" LabelMicroserviceUID = "edgelet.iofog.org/microservice-uid" LabelNodeUID = "edgelet.iofog.org/node-uid" LabelScope = "edgelet.iofog.org/scope" LabelRuntimeEngine = "edgelet.iofog.org/runtime-engine" LabelRole = "edgelet.iofog.org/role" LabelSystem = "edgelet.iofog.org/system" LabelHostNetwork = "edgelet.iofog.org/host-network" LabelSandboxID = "edgelet.iofog.org/sandbox-id" LabelHealthcheck = "edgelet.iofog.org/healthcheck" )
View Source
const ( EnvMicroserviceUID = "EDGELET_MICROSERVICE_UID" EnvMicroserviceName = "EDGELET_MICROSERVICE_NAME" EnvApplicationName = "EDGELET_APPLICATION_NAME" EnvNodeUID = "EDGELET_NODE_UID" EnvScope = "EDGELET_SCOPE" EnvRuntimeEngine = "EDGELET_RUNTIME_ENGINE" EnvRole = "EDGELET_ROLE" EnvTimeZone = "TZ" )
View Source
const (
LocalDeployApplicationName = "edgelet"
)
View Source
const (
ManagedByValue = "edgelet"
)
Variables ¶
View Source
var ProtectedLabelKeys = map[string]struct{}{ LabelAppName: {}, LabelAppInstance: {}, LabelAppPartOf: {}, LabelAppManagedBy: {}, LabelMicroserviceUID: {}, LabelNodeUID: {}, LabelScope: {}, LabelRuntimeEngine: {}, LabelRole: {}, LabelSystem: {}, LabelHostNetwork: {}, LabelSandboxID: {}, LabelHealthcheck: {}, }
ProtectedLabelKeys cannot be overridden by user-supplied labels.
View Source
var RemovedLegacyEnvVars = []string{
"SELFNAME",
}
RemovedLegacyEnvVars lists predefined env keys retired in favor of EnvSpec v1.
View Source
var RemovedLegacyLabelKeys = []string{
"iofog-ms",
"iofog-name",
"iofog-app",
"iofog-uuid",
"iofog.uuid",
"iofog-router",
"iofog-nats",
"iofog-system",
"iofog-hostnet",
"iofog-sandbox-id",
"iofog-healthcheck",
}
RemovedLegacyLabelKeys lists identity/metadata label keys retired in favor of LabelSpec v1. Retained for documentation, tests, and repository audits (not used at runtime).
View Source
var ReservedEnvKeys = map[string]struct{}{ EnvMicroserviceUID: {}, EnvMicroserviceName: {}, EnvApplicationName: {}, EnvNodeUID: {}, EnvScope: {}, EnvRuntimeEngine: {}, EnvRole: {}, }
ReservedEnvKeys are agent-controlled and cannot be overridden by user env.
Functions ¶
func BuildEnv ¶
func BuildEnv(in BuildInput) []string
func BuildLabels ¶
func BuildLabels(in BuildInput) map[string]string
func IsControllerRole ¶
func IsEdgeletRole ¶
func IsLocalApplication ¶
func IsLocalScope ¶
func IsManagedByIofog ¶
func IsSystemWorkload ¶
func MergeUserLabels ¶
func ResolveScope ¶
func RoleFromLabels ¶
func RoleFromMicroservice ¶
func ScopeFromMicroservice ¶
Types ¶
type BuildInput ¶
Click to show internal directories.
Click to hide internal directories.