generator

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GenerateInputsAnnKey = "secretgen.k14s.io/generate-inputs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateReconciler

type CertificateReconciler struct {
	// contains filtered or unexported fields
}

func NewCertificateReconciler

func NewCertificateReconciler(sgClient sgclient.Interface,
	coreClient kubernetes.Interface, log logr.Logger) *CertificateReconciler

func (*CertificateReconciler) AttachWatches

func (r *CertificateReconciler) AttachWatches(controller controller.Controller) error

AttachWatches adds starts watches this reconciler requires.

func (*CertificateReconciler) Reconcile

Reconcile is the entrypoint for incoming requests from k8s

type ClientLoader added in v0.9.0

type ClientLoader interface {
	Client(ctx context.Context, saName, saNamespace string) (client.Client, error)
}

ClientLoader allows Kubernetes Clients to be loaded from a Service Account.

type GenerateInputs

type GenerateInputs struct {
	// contains filtered or unexported fields
}

func (GenerateInputs) Add

func (i GenerateInputs) Add(anns map[string]string) error

Add adds the metadata annotations from the certificate to the secret annotations map, specifically as JSON string in the GenerateInputsAnnKey key

func (GenerateInputs) IsChanged

func (i GenerateInputs) IsChanged(anns map[string]string) bool

type JSONPath added in v0.9.0

type JSONPath string

JSONPath represents a jsonpath parsable string surrounded in open/close syntax "$( )".

func (JSONPath) EvaluateWith added in v0.9.0

func (p JSONPath) EvaluateWith(values interface{}) (*bytes.Buffer, error)

EvaluateWith an expression with respect to values and return the result.

func (JSONPath) ToK8sJSONPath added in v0.9.0

func (p JSONPath) ToK8sJSONPath() string

ToK8sJSONPath converts the syntax open close syntax "$( )" to "{ }".

type PasswordReconciler

type PasswordReconciler struct {
	// contains filtered or unexported fields
}

func NewPasswordReconciler

func NewPasswordReconciler(sgClient sgclient.Interface,
	coreClient kubernetes.Interface, log logr.Logger) *PasswordReconciler

func (*PasswordReconciler) AttachWatches

func (r *PasswordReconciler) AttachWatches(controller controller.Controller) error

AttachWatches adds starts watches this reconciler requires.

func (*PasswordReconciler) Reconcile

func (r *PasswordReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile is the entrypoint for incoming requests from k8s

type RSAKeyReconciler

type RSAKeyReconciler struct {
	// contains filtered or unexported fields
}

func NewRSAKeyReconciler

func NewRSAKeyReconciler(sgClient sgclient.Interface,
	coreClient kubernetes.Interface, log logr.Logger) *RSAKeyReconciler

func (*RSAKeyReconciler) AttachWatches

func (r *RSAKeyReconciler) AttachWatches(controller controller.Controller) error

AttachWatches adds starts watches this reconciler requires.

func (*RSAKeyReconciler) Reconcile

func (r *RSAKeyReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile is the entrypoint for incoming requests from k8s

type SSHKeyReconciler

type SSHKeyReconciler struct {
	// contains filtered or unexported fields
}

func NewSSHKeyReconciler

func NewSSHKeyReconciler(sgClient sgclient.Interface,
	coreClient kubernetes.Interface, log logr.Logger) *SSHKeyReconciler

func (*SSHKeyReconciler) AttachWatches

func (r *SSHKeyReconciler) AttachWatches(controller controller.Controller) error

AttachWatches adds starts watches this reconciler requires.

func (*SSHKeyReconciler) Reconcile

func (r *SSHKeyReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile is the entrypoint for incoming requests from k8s

type SecretTemplateReconciler added in v0.9.0

type SecretTemplateReconciler struct {
	// contains filtered or unexported fields
}

SecretTemplateReconciler watches for SecretTemplate Resources and generates a new secret from a set of input resources.

func NewSecretTemplateReconciler added in v0.9.0

func NewSecretTemplateReconciler(client client.Client, loader ClientLoader, secretTracker Tracker, log logr.Logger) *SecretTemplateReconciler

NewSecretTemplateReconciler create a new SecretTemplate Reconciler

func (*SecretTemplateReconciler) AttachWatches added in v0.9.0

func (r *SecretTemplateReconciler) AttachWatches(controller controller.Controller) error

AttachWatches adds starts watches this reconciler requires.

func (*SecretTemplateReconciler) Reconcile added in v0.9.0

Reconcile is the entrypoint for incoming requests from k8s

type ServiceAccountLoader added in v0.9.0

type ServiceAccountLoader struct {
	// contains filtered or unexported fields
}

ServiceAccountLoader allows the construction of a k8s client from a Service Account

func NewServiceAccountLoader added in v0.9.0

func NewServiceAccountLoader(manager TokenManager) *ServiceAccountLoader

NewServiceAccountLoader creates a new ServiceAccountLoader

func (*ServiceAccountLoader) Client added in v0.9.0

func (s *ServiceAccountLoader) Client(ctx context.Context, saName, saNamespace string) (client.Client, error)

Client returns a new k8s client for a Service Account

type TokenManager added in v0.9.0

type TokenManager interface {
	GetServiceAccountToken(ctx context.Context, namespace, name string, tr *authv1.TokenRequest) (*authv1.TokenRequest, error)
}

TokenManager handles getting a valid token for a given ServiceAccount.

type Tracker added in v0.9.0

type Tracker interface {
	Track(tracking types.NamespacedName, tracked ...types.NamespacedName)
	UntrackAll(tracking types.NamespacedName)
	GetTracking(tracked types.NamespacedName) []types.NamespacedName
}

Tracker allows a tracking resource to track multiple other resources

Jump to

Keyboard shortcuts

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