Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProtocolKey = "protocol" CaCertificateKey = "ca.crt" UserCertificate = "user.crt" UserKey = "user.key" UserSkip = "user.skip" // default: false SaslMechanismKey = "sasl.mechanism" SaslUserKey = "user" SaslPasswordKey = "password" ProtocolPlaintext = "PLAINTEXT" ProtocolSASLPlaintext = "SASL_PLAINTEXT" ProtocolSSL = "SSL" ProtocolSASLSSL = "SASL_SSL" SaslPlain = "PLAIN" SaslScramSha256 = "SCRAM-SHA-256" SaslScramSha512 = "SCRAM-SHA-512" )
View Source
const (
AuthSecretNameKey = "auth.secret.ref.name" /* #nosec G101 */ /* Potential hardcoded credentials (gosec) */
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigOption ¶
func NewOptionFromSecret ¶
func NewOptionFromSecret(ctx context.Context, config SecretLocator, secretProviderFunc SecretProviderFunc) (ConfigOption, *corev1.Secret, error)
type MTConfigMapSecretLocator ¶
MTConfigMapSecretLocator is a SecretLocator that locates a secret using a reference in a ConfigMap.
The name is take from the data field using the key: AuthSecretNameKey. The namespace is the same namespace of the ConfigMap.
func (*MTConfigMapSecretLocator) SecretName ¶
func (cmp *MTConfigMapSecretLocator) SecretName() (string, bool, error)
func (*MTConfigMapSecretLocator) SecretNamespace ¶
func (cmp *MTConfigMapSecretLocator) SecretNamespace() (string, bool, error)
type SecretLocator ¶
type SecretLocator interface { // SecretName returns the secret name. // It returns true if the name should be used and false if should be ignored. SecretName() (string, bool, error) // SecretNamespace returns the secret name. // It returns true if the namespace should be used and false if should be ignored. SecretNamespace() (string, bool, error) }
SecretLocator locates a secret in a cluster.
type SecretProviderFunc ¶
SecretProviderFunc provides a secret given a namespace/name pair.
func DefaultSecretProviderFunc ¶
func DefaultSecretProviderFunc(lister corelisters.SecretLister, kc kubernetes.Interface) SecretProviderFunc
DefaultSecretProviderFunc is a secret provider that uses the local cache for getting the secret and when the secret is not found it uses the kube client check if the secret doesn't actually exist.
Click to show internal directories.
Click to hide internal directories.