Documentation ¶
Index ¶
Constants ¶
View Source
const ( // KubernetesSecretType is the name of a SDS secret stored in Kubernetes. Secrets here take the form // kubernetes://secret-name. They will be pulled from the same namespace and cluster as the requesting proxy lives in. KubernetesSecretType = "kubernetes" KubernetesSecretTypeURI = KubernetesSecretType + "://" // KubernetesGatewaySecretType is the name of a SDS secret stored in Kubernetes, used by the gateway-api. Secrets here // take the form kubernetes-gateway://namespace/name. They are pulled from the config cluster. KubernetesGatewaySecretType = "kubernetes-gateway" // BuiltinGatewaySecretType is the name of a SDS secret that uses the workloads own mTLS certificate BuiltinGatewaySecretType = "builtin" BuiltinGatewaySecretTypeURI = BuiltinGatewaySecretType + "://" // SdsCaSuffix is the suffix of the sds resource name for root CA. SdsCaSuffix = "-cacert" )
Variables ¶
This section is empty.
Functions ¶
func ToResourceName ¶
ToResourceName turns a `credentialName` into a resource name used for SDS
Types ¶
type SecretResource ¶
type SecretResource struct { // ResourceType is the type of secret. One of KubernetesSecretType or KubernetesGatewaySecretType ResourceType string // Name is the name of the secret Name string // Namespace is the namespace the secret resides in. For implicit namespace references (such as in KubernetesSecretType), // this will be resolved to the appropriate namespace. As a result, this should never be empty. Namespace string // ResourceName is the original name of the resource ResourceName string // Cluster is the cluster the secret should be fetched from. Cluster cluster.ID }
SecretResource defines a reference to a secret
func ParseResourceName ¶
func ParseResourceName(resourceName string, proxyNamespace string, proxyCluster cluster.ID, configCluster cluster.ID) (SecretResource, error)
ParseResourceName parses a raw resourceName string.
func (SecretResource) Key ¶
func (sr SecretResource) Key() string
func (SecretResource) KubernetesResourceName ¶
func (sr SecretResource) KubernetesResourceName() string
Click to show internal directories.
Click to hide internal directories.