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 ¶
func Secret ¶ added in v0.26.0
func Secret(ctx context.Context, config SecretLocator, secretProviderFunc SecretProviderFunc) (*corev1.Secret, error)
Types ¶
type ConfigOption ¶
func NewSaramaSecurityOptionFromSecret ¶ added in v0.26.0
func NewSaramaSecurityOptionFromSecret(secret *corev1.Secret) ConfigOption
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)
func (*MTConfigMapSecretLocator) SecretNamespace ¶
func (cmp *MTConfigMapSecretLocator) SecretNamespace() (string, bool)
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) // SecretNamespace returns the secret name. // It returns true if the namespace should be used and false if should be ignored. SecretNamespace() (string, bool) }
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 to check if the secret doesn't actually exist.
Click to show internal directories.
Click to hide internal directories.