deploy

package
v2.23.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCacheTTL = 10 * time.Minute
)

Variables

View Source
var (
	// DeployedResourcesTotal is a prometheus counter metrics which holds the total
	// number of resource deployed by the action per controller. It has one label.
	// controller label refers  to the controller name.
	DeployedResourcesTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "action_deploy_resources_total",
			Help: "Number of deployed resources",
		},
		[]string{
			"controller",
		},
	)
)

Functions

func MergeDeployments

func MergeDeployments(source *unstructured.Unstructured, target *unstructured.Unstructured) error

func NewAction

func NewAction(opts ...ActionOpts) actions.Fn

func RemoveDeploymentsResources

func RemoveDeploymentsResources(obj *unstructured.Unstructured) error

Types

type Action

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

Action deploys the resources that are included in the ReconciliationRequest using the same create or patch machinery implemented as part of deploy.DeployManifestsFromPath.

type ActionOpts

type ActionOpts func(*Action)

func WithAnnotation

func WithAnnotation(name string, value string) ActionOpts

func WithAnnotations

func WithAnnotations(values map[string]string) ActionOpts

func WithCache

func WithCache(opts ...CacheOpt) ActionOpts

func WithFieldOwner

func WithFieldOwner(value string) ActionOpts

func WithLabel

func WithLabel(name string, value string) ActionOpts

func WithLabels

func WithLabels(values map[string]string) ActionOpts

func WithMode

func WithMode(value Mode) ActionOpts

type Cache

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

func (*Cache) Add

func (r *Cache) Add(original *unstructured.Unstructured, modified *unstructured.Unstructured) error

func (*Cache) Has

func (r *Cache) Has(original *unstructured.Unstructured, modified *unstructured.Unstructured) (bool, error)

func (*Cache) Sync

func (r *Cache) Sync()

type CacheOpt

type CacheOpt func(*Cache)

func WithTTL

func WithTTL(ttl time.Duration) CacheOpt

type Mode

type Mode string
const (
	ModePatch Mode = "patch"
	ModeSSA   Mode = "ssa"

	PlatformFieldOwner = "platform.opendatahub.io"
)

Jump to

Keyboard shortcuts

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