Documentation
¶
Index ¶
Constants ¶
const ( // MaxLabelsPerNode is the absolute maximum of labels that can be attached to a // node. MaxLabelsPerNode = 128 )
Variables ¶
var ( // ErrLabelEmpty is returned by ValidateLabel if the label key/value is not at // least one character long. ErrLabelEmpty = fmt.Errorf("empty") // ErrLabelTooLong is returned by ValidateLabel if the label key/value is more // than 63 characters long. ErrLabelTooLong = fmt.Errorf("too long") // ErrLabelInvalidFirstCharacter is returned by ValidateLabel if the label // key/value contains an invalid character on the first position. ErrLabelInvalidFirstCharacter = fmt.Errorf("first character not a letter or number") // ErrLabelInvalidLastCharacter is returned by ValidateLabel if the label // key/value contains an invalid character on the last position. ErrLabelInvalidLastCharacter = fmt.Errorf("last character not a letter or number") // ErrLabelInvalidCharacter is returned by ValidateLabel if the label key/value // contains an invalid character. ErrLabelInvalidCharacter = fmt.Errorf("invalid character") ErrLabelEmptyPrefix = fmt.Errorf("empty prefix") ErrLabelInvalidPrefix = fmt.Errorf("invalid prefix") )
Functions ¶
func GetNodeLabel ¶
func GetNodeLabel(labels *cpb.NodeLabels, key string) string
GetNodeLabel retrieves a node label by key, returning its value or an empty string if no labels with this key is set on the node.
func ValidateClusterDomain ¶
ValidateClusterDomain returns an error if the passed string is not a valid cluster domain.
func ValidateLabelKey ¶
ValidateLabelKey ensures that a given node label key is valid:
- 1 to 63 characters long (inclusive);
- Characters are all ASCII a-z A-Z 0-9 '_', '-' or '.';
- The first character is ASCII a-z A-Z or 0-9.
- The last character is ASCII a-z A-Z or 0-9.
- Optional slash-delimited prefix which contains a valid 'DNS subdomain'.
If it's valid, nil is returned. Otherwise, one of ErrLabelEmpty, ErrLabelTooLong, ErrLabelInvalidFirstCharacter or ErrLabelInvalidCharacter is returned.
func ValidateLabelValue ¶
ValidateLabelValue ensures that a given node label value is valid:
- 0 to 63 characters long (inclusive);
- Characters are all ASCII a-z A-Z 0-9 '_', '-' or '.';
- The first character is ASCII a-z A-Z or 0-9.
- The last character is ASCII a-z A-Z or 0-9.
If it's valid, nil is returned. Otherwise, one of ErrLabelTooLong, ErrLabelInvalidFirstCharacter, or ErrLabelInvalidLastCharacter, ErrLabelInvalidCharacter is returned.
Types ¶
type Labels ¶
Labels on a node, a map from label key to value.
Directories
¶
Path | Synopsis |
---|---|
abloader
|
|
Package allocs contains allocations of various types of identifiers used in a node.
|
Package allocs contains allocations of various types of identifiers used in a node. |
bios_bootcode
|
|
genlogo
command
|
|
cluster
Package cluster implements low-level clustering logic, especially logic regarding to bootstrapping, registering into and joining a cluster.
|
Package cluster implements low-level clustering logic, especially logic regarding to bootstrapping, registering into and joining a cluster. |
consensus/client
package client implements a higher-level client for consensus/etcd that is to be used within the Metropolis node code for unprivileged access (ie.
|
package client implements a higher-level client for consensus/etcd that is to be used within the Metropolis node code for unprivileged access (ie. |
curator
package curator implements the Curator, a service responsible for management of the Metropolis cluster that it is running on.
|
package curator implements the Curator, a service responsible for management of the Metropolis cluster that it is running on. |
devmgr
Package devmgr is the userspace pendant to the kernel device management system.
|
Package devmgr is the userspace pendant to the kernel device management system. |
metrics/fake_exporter
command
fake_exporter is a tiny Prometheus-compatible metrics exporter which exports a single metric with a value configured at startup.
|
fake_exporter is a tiny Prometheus-compatible metrics exporter which exports a single metric with a value configured at startup. |
mgmt
Package mgmt implements the node-local management service, a.k.a.
|
Package mgmt implements the node-local management service, a.k.a. |
network/hostsfile
Package hostsfile implements a service which owns and writes all node-local files/interfaces used by the system to resolve the local node's name and the names of other nodes in the cluster:
|
Package hostsfile implements a service which owns and writes all node-local files/interfaces used by the system to resolve the local node's name and the names of other nodes in the cluster: |
network/ipam
Package ipam is just a stub right now which contains a type for describing prefix lists.
|
Package ipam is just a stub right now which contains a type for describing prefix lists. |
network/overlay
Package overlay implements a Cluster Networking mesh service running on all Metropolis nodes.
|
Package overlay implements a Cluster Networking mesh service running on all Metropolis nodes. |
roleserve
Package roleserve implements the roleserver/“Role Server”.
|
Package roleserve implements the roleserver/“Role Server”. |
tconsole/standalone
command
|
|
time
Package time implements a supervisor runnable which is responsible for keeping both the system clock and the RTC accurate.
|
Package time implements a supervisor runnable which is responsible for keeping both the system clock and the RTC accurate. |
update/e2e/testos
command
|
|
authproxy
Package authproxy implements an authenticating proxy in front of the K8s API server converting Metropolis credentials into authentication headers.
|
Package authproxy implements an authenticating proxy in front of the K8s API server converting Metropolis credentials into authentication headers. |
clusternet
Package clusternet implements a WireGuard-based overlay network for Kubernetes.
|
Package clusternet implements a WireGuard-based overlay network for Kubernetes. |
containerd/cniproxy
Package cni implements an adapter between the go-cni interface and the Monogon gRPC Workload Attachment interface.
|
Package cni implements an adapter between the go-cni interface and the Monogon gRPC Workload Attachment interface. |
hyperkube
command
This is the entry point for our multicall Kubernetes binary.
|
This is the entry point for our multicall Kubernetes binary. |
metricsprovider
Package metricsprovider provides a Prometheus registry for code in K8s client-go capable of providing metrics.
|
Package metricsprovider provides a Prometheus registry for code in K8s client-go capable of providing metrics. |
metricsproxy
Package metricsproxy implements an authenticating proxy in front of the K8s controller-manager and scheduler providing unauthenticated access to the metrics via local ports
|
Package metricsproxy implements an authenticating proxy in front of the K8s controller-manager and scheduler providing unauthenticated access to the metrics via local ports |
nfproxy
Package nfproxy is a Kubernetes Service IP proxy based exclusively on the Linux nftables interface.
|
Package nfproxy is a Kubernetes Service IP proxy based exclusively on the Linux nftables interface. |
pki
package pki builds upon osbase/pki/ to provide an etcd-backed implementation of all x509 PKI Certificates/CAs required to run Kubernetes.
|
package pki builds upon osbase/pki/ to provide an etcd-backed implementation of all x509 PKI Certificates/CAs required to run Kubernetes. |
plugins/kvmdevice
Package kvmdevice implements a Kubernetes device plugin for the virtual KVM device.
|
Package kvmdevice implements a Kubernetes device plugin for the virtual KVM device. |
reconciler
The reconciler ensures that a base set of K8s resources is always available in the cluster.
|
The reconciler ensures that a base set of K8s resources is always available in the cluster. |