translation

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 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 IssuedCertificate is first created, it is meant to create the CSR
	// and return the bytes directly
	IssuedCertificatePending(
		ctx context.Context,
		issuedCertificate *certificatesv1.IssuedCertificate,
		inputs input.Snapshot,
		outputs certagent.Builder,
	) ([]byte, error)

	// This function is called when the IssuedCertificate 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 waitForCondition is true, than the reconciler will not update the status
	IssuedCertificateRequested(
		ctx context.Context,
		issuedCertificate *certificatesv1.IssuedCertificate,
		certificateRequest *certificatesv1.CertificateRequest,
		inputs input.Snapshot,
		outputs certagent.Builder,
	) (waitForCondition bool, err error)

	// This function is called when the IssuedCertificate 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 IssuedCertificate 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 certificate 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