_import

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersionV1 = "kp.kpack.io/v1alpha1"
View Source
const CurrentAPIVersion = "kp.kpack.io/v1alpha3"

Variables

This section is empty.

Functions

func DefaultTimestampProvider

func DefaultTimestampProvider() defaultTimestampProvider

func SummarizeChange

func SummarizeChange(
	ctx context.Context,
	keychain authn.Keychain,
	desc DependencyDescriptor,
	kpConfig config.KpConfig,
	relocatedImageProvider RelocatedImageProvider,
	differ Differ, cs buildk8s.ClientSet) (hasChanges bool, changes string, err error)

Types

type API

type API struct {
	Version string `yaml:"apiVersion" json:"apiVersion"`
}

type ClusterBuilder

type ClusterBuilder struct {
	Name         string                       `yaml:"name" json:"name"`
	ClusterStack string                       `yaml:"clusterStack" json:"clusterStack"`
	ClusterStore string                       `yaml:"clusterStore" json:"clusterStore"`
	Order        []v1alpha2.BuilderOrderEntry `yaml:"order" json:"order"`
}

type ClusterBuilderV1

type ClusterBuilderV1 struct {
	Name  string                    `yaml:"name"`
	Stack string                    `yaml:"stack"`
	Store string                    `yaml:"store"`
	Order []corev1alpha1.OrderEntry `yaml:"order"`
}

type ClusterStack

type ClusterStack struct {
	Name       string `yaml:"name" json:"name"`
	BuildImage Source `yaml:"buildImage" json:"buildImage"`
	RunImage   Source `yaml:"runImage" json:"runImage"`
}

type ClusterStore

type ClusterStore struct {
	Name    string   `yaml:"name" json:"name"`
	Sources []Source `yaml:"sources" json:"sources"`
}

type DefaultRelocatedImageProvider added in v0.4.0

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

func NewDefaultRelocatedImageProvider added in v0.4.0

func NewDefaultRelocatedImageProvider(fetcher registry.Fetcher) *DefaultRelocatedImageProvider

func (*DefaultRelocatedImageProvider) RelocatedImage added in v0.4.0

func (r *DefaultRelocatedImageProvider) RelocatedImage(keychain authn.Keychain, kpConfig config.KpConfig, srcImage string) (string, error)

type DependencyDescriptor

type DependencyDescriptor struct {
	APIVersion            string           `yaml:"apiVersion" json:"apiVersion"`
	Kind                  string           `yaml:"kind" json:"kind"`
	DefaultClusterStack   string           `yaml:"defaultClusterStack" json:"defaultClusterStack"`
	DefaultClusterBuilder string           `yaml:"defaultClusterBuilder" json:"defaultClusterBuilder"`
	Lifecycle             Lifecycle        `yaml:"lifecycle" json:"lifecycle"`
	ClusterStores         []ClusterStore   `yaml:"clusterStores" json:"clusterStores"`
	ClusterStacks         []ClusterStack   `yaml:"clusterStacks" json:"clusterStacks"`
	ClusterBuilders       []ClusterBuilder `yaml:"clusterBuilders" json:"clusterBuilders"`
}

func (DependencyDescriptor) GetClusterBuilders

func (d DependencyDescriptor) GetClusterBuilders() []ClusterBuilder

func (DependencyDescriptor) GetClusterStacks

func (d DependencyDescriptor) GetClusterStacks() []ClusterStack

func (DependencyDescriptor) GetLifecycleImage

func (d DependencyDescriptor) GetLifecycleImage() string

func (DependencyDescriptor) HasLifecycleImage

func (d DependencyDescriptor) HasLifecycleImage() bool

func (DependencyDescriptor) Validate

func (d DependencyDescriptor) Validate() error

type DependencyDescriptorV1

type DependencyDescriptorV1 struct {
	APIVersion            string             `yaml:"apiVersion"`
	Kind                  string             `yaml:"kind"`
	DefaultStack          string             `yaml:"defaultStack"`
	DefaultClusterBuilder string             `yaml:"defaultClusterBuilder"`
	Stores                []ClusterStore     `yaml:"stores"`
	Stacks                []ClusterStack     `yaml:"stacks"`
	ClusterBuilders       []ClusterBuilderV1 `yaml:"clusterBuilders"`
}

func (DependencyDescriptorV1) ToNextVersion

func (d1 DependencyDescriptorV1) ToNextVersion() DependencyDescriptor

type Differ

type Differ interface {
	Diff(dOld, dNew interface{}) (string, error)
}

type ImportDiffer

type ImportDiffer struct {
	Differ                 Differ
	RelocatedImageProvider RelocatedImageProvider
}

func (*ImportDiffer) DiffClusterBuilder

func (id *ImportDiffer) DiffClusterBuilder(oldCB *v1alpha2.ClusterBuilder, newCB ClusterBuilder) (string, error)

func (*ImportDiffer) DiffClusterStack

func (id *ImportDiffer) DiffClusterStack(keychain authn.Keychain, kpConfig config.KpConfig, oldCS *v1alpha2.ClusterStack, newCS ClusterStack) (diff string, err error)

func (*ImportDiffer) DiffClusterStore

func (id *ImportDiffer) DiffClusterStore(keychain authn.Keychain, kpConfig config.KpConfig, oldCS *v1alpha2.ClusterStore, newCS ClusterStore) (string, error)

func (*ImportDiffer) DiffLifecycle

func (id *ImportDiffer) DiffLifecycle(keychain authn.Keychain, kpConfig config.KpConfig, oldImg string, newImg string) (string, error)

type Importer

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

func NewImporter

func NewImporter(printer Printer, k8sClient kubernetes.Interface, client versioned.Interface, fetcher registry.Fetcher, relocator registry.Relocator, waiter commands.ResourceWaiter, timestampProvider TimestampProvider) *Importer

func (*Importer) ImportDescriptor

func (i *Importer) ImportDescriptor(ctx context.Context, keychain authn.Keychain, kpConfig config.KpConfig, rawDescriptor string) ([]runtime.Object, error)

func (*Importer) ImportDescriptorDryRun

func (i *Importer) ImportDescriptorDryRun(ctx context.Context, keychain authn.Keychain, kpConfig config.KpConfig, rawDescriptor string) ([]runtime.Object, error)

func (*Importer) ReadDescriptor

func (i *Importer) ReadDescriptor(rawDescriptor string) (DependencyDescriptor, error)

type Lifecycle

type Lifecycle Source

type Printer

type Printer interface {
	Printlnf(format string, args ...interface{}) error
	PrintStatus(format string, args ...interface{}) error
}

type RelocatedImageProvider added in v0.4.0

type RelocatedImageProvider interface {
	RelocatedImage(authn.Keychain, config.KpConfig, string) (string, error)
}

type Source

type Source struct {
	Image string `yaml:"image"`
}

type TimestampProvider

type TimestampProvider interface {
	GetTimestamp() string
}

Jump to

Keyboard shortcuts

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