Documentation ¶
Index ¶
- Constants
- Variables
- func MergeDeployments(source *unstructured.Unstructured, target *unstructured.Unstructured) error
- func NewAction(opts ...ActionOpts) actions.Fn
- func RemoveDeploymentsResources(obj *unstructured.Unstructured) error
- type Action
- type ActionOpts
- func WithAnnotation(name string, value string) ActionOpts
- func WithAnnotations(values map[string]string) ActionOpts
- func WithCache(opts ...CacheOpt) ActionOpts
- func WithFieldOwner(value string) ActionOpts
- func WithLabel(name string, value string) ActionOpts
- func WithLabels(values map[string]string) ActionOpts
- func WithMode(value Mode) ActionOpts
- type Cache
- type CacheOpt
- type Mode
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)
Click to show internal directories.
Click to hide internal directories.