translation

package
v1.1.0-beta16 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IssuedCertificateSecretType

func IssuedCertificateSecretType() corev1.SecretType

func PrivateKeySecretType

func PrivateKeySecretType() corev1.SecretType

Types

type Translator

type Translator interface {

	// Should the reconciler process this resource
	ShouldProcess(ctx context.Context, issuedCertificate *certificatesv1.IssuedCertificate) bool

	// This function is called when the IssuedCertiticate is first created, it is meant to create the CSR
	// and return the bytes directly
	// If both return values are nil, it signals to the reconciler to ignore this resource.
	IssuedCertiticatePending(
		ctx context.Context,
		issuedCertificate *certificatesv1.IssuedCertificate,
		inputs input.Snapshot,
		outputs certagent.Builder,
	) ([]byte, error)

	// This function is called when the IssuedCertiticate has been REQUESTED, this means that the
	// CertificateRequest has been successfully created, and is passed in along with the
	// IssuedCertificate
	// This function may be called multiple times in a row, as long as the IssuedCertificate is in a
	// REQUESTED state
	// If err == nil, and continueIterating == false it signals to the reconciler to ignore this resource.
	IssuedCertificateRequested(
		ctx context.Context,
		issuedCertificate *certificatesv1.IssuedCertificate,
		certificateRequest *certificatesv1.CertificateRequest,
		inputs input.Snapshot,
		outputs certagent.Builder,
	) error

	// This function is called when the IssuedCertiticate has been ISSUED, this means that the
	// CertificateRequest has been fulfilled by the relevant party. By this stage the intermediate
	// cert should already have made it to it's destination.
	IssuedCertificateIssued(
		ctx context.Context,
		issuedCertificate *certificatesv1.IssuedCertificate,
		inputs input.Snapshot,
		outputs certagent.Builder,
	) error

	// This function is called when the IssuedCertiticate has been FINISHED, this means that the
	// Cert has been issued, and the pod bounce directive has completed.
	IssuedCertificateFinished(
		ctx context.Context,
		issuedCertificate *certificatesv1.IssuedCertificate,
		inputs input.Snapshot,
		outputs certagent.Builder,
	) error
}

These functions correspond to issued certiticate statuses PENDING REQUESTED ISSUED FINISHED

func NewCertAgentTranslator

func NewCertAgentTranslator() Translator

Directories

Path Synopsis
Package mock_translation is a generated GoMock package.
Package mock_translation is a generated GoMock package.

Jump to

Keyboard shortcuts

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