bundle

package
v0.0.0-...-d680719 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BundleAnnotationAPIVersion = "dev.tekton.image.apiVersion"

BundleAnnotationAPIVersion is the image layer annotation used to indicate the "apiVersion" of resource stored in a given layer.

View Source
const BundleAnnotationKind = "dev.tekton.image.kind"

BundleAnnotationKind is the image layer annotation used to indicate the "kind" of resource stored in a given layer.

View Source
const BundleAnnotationName = "dev.tekton.image.name"

BundleAnnotationName is the image layer annotation used to indicate the "name" of resource stored in a given layer.

View Source
const ConfigKind = "default-kind"

ConfigKind is the configuration field name for controlling what the layer name in the bundle image is.

View Source
const ConfigServiceAccount = "default-service-account"

ConfigServiceAccount is the configuration field name for controlling the Service Account name to use for bundle requests.

View Source
const LabelValueBundleResolverType string = "bundles"

LabelValueBundleResolverType is the value to use for the resolution.tekton.dev/type label on resource requests

View Source
const ParamBundle = "bundle"

ParamBundle is the parameter defining what the bundle image url is.

View Source
const ParamKind = "kind"

ParamKind is the parameter defining what the layer kind in the bundle image is.

View Source
const ParamName = "name"

ParamName is the parameter defining what the layer name in the bundle image is.

View Source
const ParamServiceAccount = "serviceAccount"

ParamServiceAccount is the parameter defining what service account name to use for bundle requests.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestOptions

type RequestOptions struct {
	ServiceAccount string
	Bundle         string
	EntryName      string
	Kind           string
}

RequestOptions are the options used to request a resource from a remote bundle.

func OptionsFromParams

func OptionsFromParams(ctx context.Context, params map[string]string) (RequestOptions, error)

OptionsFromParams parses the params from a resolution request and converts them into options to pass as part of a bundle request.

type ResolvedResource

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

ResolvedResource wraps the content of a matched entry in a bundle.

func GetEntry

func GetEntry(ctx context.Context, keychain authn.Keychain, opts RequestOptions) (*ResolvedResource, error)

GetEntry accepts a keychain and options for the request and returns either a successfully resolved bundle entry or an error.

func (*ResolvedResource) Annotations

func (br *ResolvedResource) Annotations() map[string]string

Annotations returns the annotations from the bundle that are relevant to resolution.

func (*ResolvedResource) Data

func (br *ResolvedResource) Data() []byte

Data returns the bytes of the resource fetched from the bundle.

type Resolver

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

Resolver implements a framework.Resolver that can fetch files from OCI bundles.

func (*Resolver) GetConfigName

func (r *Resolver) GetConfigName(context.Context) string

GetConfigName returns the name of the bundle resolver's configmap.

func (*Resolver) GetName

func (r *Resolver) GetName(context.Context) string

GetName returns a string name to refer to this Resolver by.

func (*Resolver) GetSelector

func (r *Resolver) GetSelector(context.Context) map[string]string

GetSelector returns a map of labels to match requests to this Resolver.

func (*Resolver) Initialize

func (r *Resolver) Initialize(ctx context.Context) error

Initialize sets up any dependencies needed by the Resolver. None atm.

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, params map[string]string) (framework.ResolvedResource, error)

Resolve uses the given params to resolve the requested file or resource.

func (*Resolver) ValidateParams

func (r *Resolver) ValidateParams(ctx context.Context, params map[string]string) error

ValidateParams ensures parameters from a request are as expected.

Jump to

Keyboard shortcuts

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