signature

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package signature implements the controller verifying package signatures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupConfigurationRevision

func SetupConfigurationRevision(mgr ctrl.Manager, o controller.Options) error

SetupConfigurationRevision adds a controller that reconciles ConfigurationRevisions.

func SetupFunctionRevision

func SetupFunctionRevision(mgr ctrl.Manager, o controller.Options) error

SetupFunctionRevision adds a controller that reconciles FunctionRevisions.

func SetupProviderRevision

func SetupProviderRevision(mgr ctrl.Manager, o controller.Options) error

SetupProviderRevision adds a controller that reconciles ProviderRevisions.

Types

type CosignValidator

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

CosignValidator validates image signatures using cosign.

func NewCosignValidator

func NewCosignValidator(c client.Reader, k kubernetes.Interface, namespace, serviceAccount string) (*CosignValidator, error)

NewCosignValidator returns a new CosignValidator.

func (*CosignValidator) Validate

func (c *CosignValidator) Validate(ctx context.Context, ref name.Reference, config *v1beta1.ImageVerification, pullSecrets ...string) error

Validate validates the image signature.

type Reconciler

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

Reconciler reconciles package for signature verification.

func NewReconciler

func NewReconciler(client client.Client, opts ...ReconcilerOption) *Reconciler

NewReconciler creates a new package reconciler for signature verification.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile packages and verify signatures if configured.

type ReconcilerOption

type ReconcilerOption func(*Reconciler)

ReconcilerOption is used to configure the Reconciler.

func WithConfigStore

func WithConfigStore(c xpkg.ConfigStore) ReconcilerOption

WithConfigStore specifies the ConfigStore to use for fetching image configurations.

func WithLogger

func WithLogger(log logging.Logger) ReconcilerOption

WithLogger specifies how the Reconciler should log messages.

func WithNamespace

func WithNamespace(n string) ReconcilerOption

WithNamespace specifies the namespace in which the Reconciler should create runtime resources.

func WithNewPackageRevisionFn

func WithNewPackageRevisionFn(f func() v1.PackageRevision) ReconcilerOption

WithNewPackageRevisionFn determines the type of package being reconciled.

func WithServiceAccount

func WithServiceAccount(sa string) ReconcilerOption

WithServiceAccount specifies the service account to use for fetching images.

func WithValidator

func WithValidator(v Validator) ReconcilerOption

WithValidator specifies the Validator to use for verifying signatures.

type Validator

type Validator interface {
	Validate(ctx context.Context, ref name.Reference, config *v1beta1.ImageVerification, pullSecrets ...string) error
}

Validator validates image signatures.

Jump to

Keyboard shortcuts

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