libkube

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNodeGroup     = "system:nodes"
	DefaultNodeNamespace = ""
)
View Source
const (
	AddressFQDNMatcher = `^(([a-z0-9][a-z0-9\-]*[a-z0-9])|[a-z0-9]+\.)*([a-z]+|xn\-\-[a-z0-9]+)\.?$`
)

Variables

View Source
var (
	ErrMissingNodeUser = errors.New("unable to resolve node user id")
)

Functions

func AddressType

func AddressType(address string) (discoveryv1.AddressType, error)

AddressType returns the discoveryv1.AddressType identifier corresponding to the provided address.

func DefaultNodeIdentity

func DefaultNodeIdentity(ctx context.Context, c cache.CacheReader) (primitive.ObjectID, error)

DefaultNodeIdentity will return the store id of the default system:nodes group. See reference for details: https://kubernetes.io/docs/reference/access-authn-authz/node/.

func NodeIdentity

func NodeIdentity(ctx context.Context, c cache.CacheReader, nodeName string) (primitive.ObjectID, error)

NodeIdentity will either return the store id of the dedicated node user or store id of the default system:nodes group if a dedicated user is not present. See reference for details: https://kubernetes.io/docs/reference/access-authn-authz/node/.

func NodeUser

func NodeUser(nodeName string) string

NodeUser will return the full name of the dedicated node user. See reference for details: https://kubernetes.io/docs/reference/access-authn-authz/node/

func ServiceAccountTokenPath

func ServiceAccountTokenPath(podUid string, volumeName string) string

ServiceAccountTokenPath returns the full path of a pod's service account token on the host node.

func ServiceDns

func ServiceDns(ep types.EndpointType) string

ServiceDns provides the DNS name of the service associated with the provided EndpointSlice.

func ServiceName

func ServiceName(ep types.EndpointType) string

ServiceName returns the name of the service associated with the provided EndpointSlice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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