kube

package
v0.0.0-...-5756e46 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTLSKeyFromSecret

func ParseTLSKeyFromSecret(secret *corev1.Secret, keyName string) (crypto.Signer, []byte, error)

ParseTLSKeyFromSecret will parse and decode a private key from the given Secret at the given key index.

func SecretTLSCert

func SecretTLSCert(ctx context.Context, secretLister internalinformers.SecretLister, namespace, name string) (*x509.Certificate, error)

func SecretTLSCertChain

func SecretTLSCertChain(ctx context.Context, secretLister internalinformers.SecretLister, namespace, name string) ([]*x509.Certificate, error)

func SecretTLSKey

func SecretTLSKey(ctx context.Context, secretLister internalinformers.SecretLister, namespace, name string) (crypto.Signer, error)

SecretTLSKey will decode a PKCS1/SEC1 (in effect, a RSA or ECDSA) private key stored in a secret with 'name' in 'namespace'. It will read the private key data from the secret entry with name 'keyName'.

func SecretTLSKeyPair

func SecretTLSKeyPair(ctx context.Context, secretLister internalinformers.SecretLister, namespace, name string) ([]*x509.Certificate, crypto.Signer, error)

func SecretTLSKeyPairAndCA

func SecretTLSKeyPairAndCA(ctx context.Context, secretLister internalinformers.SecretLister, namespace, name string) ([]*x509.Certificate, crypto.Signer, error)

SecretTLSKeyPairAndCA returns the X.509 certificate chain and private key of the leaf certificate contained in the target Secret. If the ca.crt field exists on the Secret, it is parsed and added to the end of the certificate chain.

func SecretTLSKeyRef

func SecretTLSKeyRef(ctx context.Context, secretLister internalinformers.SecretLister, namespace, name, keyName string) (crypto.Signer, error)

SecretTLSKeyRef will decode a PKCS1/SEC1 (in effect, a RSA or ECDSA) private key stored in a secret with 'name' in 'namespace'. It will read the private key data from the secret entry with name 'keyName'.

Types

This section is empty.

Jump to

Keyboard shortcuts

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