identity

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package identity implements types and utility routines related to the identity of a workload, as used within OSM.

Index

Constants

View Source
const (
	// ClusterLocalTrustDomain is the trust domain for the local kubernetes cluster
	ClusterLocalTrustDomain = "cluster.local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sServiceAccount added in v0.9.0

type K8sServiceAccount struct {
	Namespace string
	Name      string
}

K8sServiceAccount is a type for a namespaced service account

func (K8sServiceAccount) String added in v0.9.0

func (sa K8sServiceAccount) String() string

String returns the string representation of the service account object

func (K8sServiceAccount) ToServiceIdentity added in v0.9.0

func (sa K8sServiceAccount) ToServiceIdentity() ServiceIdentity

ToServiceIdentity converts K8sServiceAccount to the newer ServiceIdentity TODO(draychev): ToServiceIdentity is used in many places to ease with transition from K8sServiceAccount to ServiceIdentity and should be removed (not everywhere) - [https://github.com/openservicemesh/osm/issues/2218]

type ServiceIdentity

type ServiceIdentity string

ServiceIdentity is the type used to represent the identity for a service For Kubernetes services this string will be in the format: <ServiceAccount>.<Namespace>.cluster.local

const WildcardServiceIdentity ServiceIdentity = "*"

WildcardServiceIdentity is a wildcard to match all service identities

func GetKubernetesServiceIdentity

func GetKubernetesServiceIdentity(svcAccount K8sServiceAccount, trustDomain string) ServiceIdentity

GetKubernetesServiceIdentity returns the ServiceIdentity based on Kubernetes ServiceAccount and a trust domain

func (ServiceIdentity) IsWildcard added in v0.10.0

func (si ServiceIdentity) IsWildcard() bool

IsWildcard determines if the ServiceIdentity is a wildcard

func (ServiceIdentity) String

func (si ServiceIdentity) String() string

String returns the ServiceIdentity as a string

func (ServiceIdentity) ToK8sServiceAccount added in v0.9.0

func (si ServiceIdentity) ToK8sServiceAccount() K8sServiceAccount

ToK8sServiceAccount converts a ServiceIdentity to a K8sServiceAccount to help with transition from K8sServiceAccount to ServiceIdentity

Jump to

Keyboard shortcuts

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