crypto

package
v0.0.0-...-51508ad Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoCert

type AutoCert struct {
	// Alternative IPs in the certificate
	IPs []net.IP

	// Alternative names (SANs) in the certificate
	Names []string

	// The Name of the secret where the certificate will be saved
	SecretName string

	// ... with namespace
	SecretNamespace string
	// contains filtered or unexported fields
}

AutoCert is a certificate for a service that is automatically signed by the Kubernetes CA.

func NewAutoCert

func NewAutoCert(ips []net.IP, names []string, name, namespace string) (*AutoCert, error)

NewAutoCert creates a new automatically-signed service certificate

func NewServiceCertFromReference

func NewServiceCertFromReference(ref corev1.SecretReference) (*AutoCert, error)

NewServiceCertFromReference creates a new automatically-signed service certificate

func (*AutoCert) Delete

func (ac *AutoCert) Delete(cli clientset.Interface) error

Delete removes the certificate. The certificate doesn't need to have been get/requested.

func (AutoCert) GetName

func (ac AutoCert) GetName() string

GetName returns the AutoCert.SecretName

func (AutoCert) GetNamespace

func (ac AutoCert) GetNamespace() string

GetNamespace returns the AutoCert.SecretNamespace

func (*AutoCert) GetOrRequest

func (ac *AutoCert) GetOrRequest(cli clientset.Interface) (*corev1.Secret, error)

GetOrRequest gets a certificate from the secret, or perform a new certificate request

func (*AutoCert) Refresh

func (ac *AutoCert) Refresh(cli clientset.Interface) (*corev1.Secret, error)

Refresh invalidates the local cached Secret and performs a new GetOrRequest()

func (*AutoCert) Request

func (ac *AutoCert) Request(cli clientset.Interface) (*corev1.Secret, error)

Request sends a CSR to the apiserver, requesting auto-approval and waiting until it is approved

type SharedPassword

type SharedPassword struct {
	Name string // The name includes the "namespace" (ie, "kube-system/dex-velum")
	// contains filtered or unexported fields
}

SharedPassword type

func NewSharedPassword

func NewSharedPassword(name, namespace string) SharedPassword

NewSharedPassword returns a new SharedPassword type

func (*SharedPassword) AsSecretReference

func (password *SharedPassword) AsSecretReference() corev1.SecretReference

AsSecretReference returns a SecretReference type

func (SharedPassword) CreateOrUpdateToSecret

func (password SharedPassword) CreateOrUpdateToSecret(cli clientset.Interface) error

CreateOrUpdateToSecret publishes a password as a secret

func (*SharedPassword) Delete

func (password *SharedPassword) Delete(cli clientset.Interface) error

Delete deletes the SharedPassword

func (*SharedPassword) GetFromSecret

func (password *SharedPassword) GetFromSecret(cli clientset.Interface) error

GetFromSecret gets the shared password from a Secret

func (SharedPassword) GetName

func (password SharedPassword) GetName() string

GetName returns the name

func (SharedPassword) GetNamespace

func (password SharedPassword) GetNamespace() string

GetNamespace returns the namespace

func (*SharedPassword) Rand

func (password *SharedPassword) Rand(length int) (string, error)

Rand returns a new password string of random length and characters

func (SharedPassword) String

func (password SharedPassword) String() string

String implements the Stringer interface

Jump to

Keyboard shortcuts

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