deploy

package
v0.0.0-...-711439c Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CompositionVersionLabel  = "krateo.io/composition-version"
	CompositionStillExistErr = "compositions still exist"
)

Variables

View Source
var (
	ErrCompositionStillExist = errors.New(CompositionStillExistErr)
)

Functions

func Deploy

func Deploy(ctx context.Context, kube client.Client, opts DeployOptions) (digest string, err error)

func Lookup

func Lookup(ctx context.Context, kube client.Client, opts DeployOptions) (digest string, err error)

This function is used to lookup the current state of the deployment and return the hash of the current state This is used to determine if the deployment needs to be updated or not

func Undeploy

func Undeploy(ctx context.Context, kube client.Client, opts UndeployOptions) error

Types

type DeployOptions

type DeployOptions struct {
	GVR                    schema.GroupVersionResource
	DiscoveryClient        discovery.CachedDiscoveryInterface
	KubeClient             client.Client
	DynClient              dynamic.Interface
	Namespace              string
	Spec                   *definitionsv1alpha1.ChartInfo
	RBACFolderPath         string
	DeploymentTemplatePath string
	ConfigmapTemplatePath  string
	JsonSchemaTemplatePath string
	ServiceTemplatePath    string
	JsonSchemaBytes        []byte
	// DryRunServer is used to determine if the deployment should be applied in dry-run mode. This is ignored in lookup mode
	DryRunServer bool
}

type UndeployOptions

type UndeployOptions struct {
	DiscoveryClient        discovery.CachedDiscoveryInterface
	KubeClient             client.Client
	DynamicClient          dynamic.Interface
	Namespace              string
	GVR                    schema.GroupVersionResource
	Spec                   *definitionsv1alpha1.ChartInfo
	RBACFolderPath         string
	SkipCRD                bool
	DeploymentTemplatePath string
	ServiceTemplatePath    string
	ConfigmapTemplatePath  string
	JsonSchemaTemplatePath string
	JsonSchemaBytes        []byte
}

Jump to

Keyboard shortcuts

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