Documentation ¶
Index ¶
- Constants
- Variables
- func AddressType(address string) (discoveryv1.AddressType, error)
- func DefaultNodeIdentity(ctx context.Context, c cache.CacheReader) (primitive.ObjectID, error)
- func NodeIdentity(ctx context.Context, c cache.CacheReader, nodeName string) (primitive.ObjectID, error)
- func NodeUser(nodeName string) string
- func ResetOnce()
- func ServiceAccountTokenPath(podUid string, volumeName string) string
- func ServiceDns(ep types.EndpointType) string
- func ServiceName(ep types.EndpointType) string
Constants ¶
const ( DefaultNodeGroup = "system:nodes" DefaultNodeNamespace = "" )
const (
AddressFQDNMatcher = `^(([a-z0-9][a-z0-9\-]*[a-z0-9])|[a-z0-9]+\.)*([a-z]+|xn\-\-[a-z0-9]+)\.?$`
)
Variables ¶
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 ¶
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 ¶
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 ¶
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.