manifest

package
v0.0.0-...-67aceb4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

README

Internal Manifest Library

This package contains internal reference coding that is used for translating and implementing the Manifest Reconciler parts that are not generically solved by the declarative library.

It contains various aspects to:

  1. Translate the Manifest CR into a declarative specification in a custom specification resolver. Use the layer parsing methods to download and resolve OCI image layers from the Manifest to make them accessible to the declarative library.
  2. Look up the correct Client for Single or Dual Cluster Mode based on the SKR Client Lookup and ClusterClient to read Secret Data as if they were a kubeconfig.
  3. Look up the correct Keychain to access image layers contained in private registries through a Keychain.
  4. Check for Module Readiness based on the applied resources. For more information, see custom StateCheck.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMoreThanOneSecretFound = errors.New("more than one secret found")
View Source
var ErrRenderModeInvalid = errors.New("render mode is invalid")

Functions

func GenerateCacheKey

func GenerateCacheKey(values ...string) string

Types

type ClusterClient

type ClusterClient struct {
	DefaultClient client.Client
}

func (*ClusterClient) GetRESTConfig

func (cc *ClusterClient) GetRESTConfig(
	ctx context.Context, kymaOwner, kymaNameLabel, namespace string,
) (*rest.Config, error)

type KeyChainLookup

type KeyChainLookup interface {
	Get(ctx context.Context, imageSpec v1beta2.ImageSpec) (authn.Keychain, error)
}

type KeyChainProvider

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

func NewKeyChainProvider

func NewKeyChainProvider(kcpClient client.Client) *KeyChainProvider

func (*KeyChainProvider) Get

type PathExtractor

type PathExtractor interface {
	GetPathFromRawManifest(ctx context.Context, imageSpec v1beta2.ImageSpec, keyChain authn.Keychain) (string, error)
}

type RESTConfigGetter

type RESTConfigGetter func() (*rest.Config, error)

type RemoteClusterLookup

type RemoteClusterLookup struct {
	KCP          *declarativev2.ClusterInfo
	ConfigGetter RESTConfigGetter
}

func (*RemoteClusterLookup) ConfigResolver

type SpecResolver

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

func NewSpecResolver

func NewSpecResolver(kcLookup KeyChainLookup, extractor PathExtractor) *SpecResolver

func (*SpecResolver) GetSpec

func (s *SpecResolver) GetSpec(ctx context.Context, manifest *v1beta2.Manifest) (*declarativev2.Spec, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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