config

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultConfigString

func NewDefaultConfigString() string

Types

type APIVersionKindMatcher

type APIVersionKindMatcher struct {
	APIVersion string `json:"apiVersion"`
	Kind       string
}

type AllResourceMatcher

type AllResourceMatcher struct{}

type Conf

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

func NewConfFromResources

func NewConfFromResources(resources []ctlres.Resource) ([]ctlres.Resource, Conf, error)

func NewConfFromResourcesWithDefaults

func NewConfFromResourcesWithDefaults(resources []ctlres.Resource) ([]ctlres.Resource, Conf, error)

func (Conf) AdditionalLabels added in v0.6.0

func (c Conf) AdditionalLabels() map[string]string

func (Conf) DiffAgainstLastAppliedFieldExclusionMods added in v0.14.0

func (c Conf) DiffAgainstLastAppliedFieldExclusionMods() []ctlres.FieldRemoveMod

func (Conf) LabelScopingMods

func (c Conf) LabelScopingMods() func(kvs map[string]string) []ctlres.StringMapAppendMod

func (Conf) OwnershipLabelMods

func (c Conf) OwnershipLabelMods() func(kvs map[string]string) []ctlres.StringMapAppendMod

func (Conf) RebaseMods

func (c Conf) RebaseMods() []ctlres.ResourceModWithMultiple

func (Conf) TemplateRules

func (c Conf) TemplateRules() []TemplateRule

type Config

type Config struct {
	APIVersion string `json:"apiVersion"`
	Kind       string

	RebaseRules         []RebaseRule
	OwnershipLabelRules []OwnershipLabelRule
	LabelScopingRules   []LabelScopingRule
	TemplateRules       []TemplateRule

	AdditionalLabels                          map[string]string
	DiffAgainstLastAppliedFieldExclusionRules []DiffAgainstLastAppliedFieldExclusionRule
}

func NewConfigFromResource

func NewConfigFromResource(res ctlres.Resource) (Config, error)

type DiffAgainstLastAppliedFieldExclusionRule added in v0.14.0

type DiffAgainstLastAppliedFieldExclusionRule struct {
	ResourceMatchers []ResourceMatcher
	Path             ctlres.Path
}

func (DiffAgainstLastAppliedFieldExclusionRule) AsMods added in v0.14.0

type KindNamespaceNameMatcher

type KindNamespaceNameMatcher struct {
	Kind      string
	Namespace string
	Name      string
}

type LabelScopingRule

type LabelScopingRule struct {
	ResourceMatchers []ResourceMatcher
	Path             ctlres.Path
}

func (LabelScopingRule) AsMods

type OwnershipLabelRule

type OwnershipLabelRule struct {
	ResourceMatchers []ResourceMatcher
	Path             ctlres.Path
}

func (OwnershipLabelRule) AsMods

type RebaseRule

type RebaseRule struct {
	ResourceMatchers []ResourceMatcher
	Path             ctlres.Path
	Type             string
	Sources          []ctlres.FieldCopyModSource
}

func (RebaseRule) AsMods

type ResourceMatcher

type ResourceMatcher struct {
	AllResourceMatcher       *AllResourceMatcher    // default
	APIVersionKindMatcher    *APIVersionKindMatcher `json:"apiVersionKindMatcher"`
	KindNamespaceNameMatcher *KindNamespaceNameMatcher
}

func (ResourceMatcher) AsResourceMatcher

func (m ResourceMatcher) AsResourceMatcher() ctlres.ResourceMatcher

type ResourceMatchers

type ResourceMatchers []ResourceMatcher

func (ResourceMatchers) AsResourceMatchers

func (ms ResourceMatchers) AsResourceMatchers() []ctlres.ResourceMatcher

type TemplateAffectedObjRef

type TemplateAffectedObjRef struct {
	ResourceMatchers []ResourceMatcher
	Path             ctlres.Path
	NameKey          string `json:"nameKey"`
}

type TemplateAffectedResources

type TemplateAffectedResources struct {
	ObjectReferences []TemplateAffectedObjRef
}

type TemplateRule

type TemplateRule struct {
	ResourceMatchers  []ResourceMatcher
	AffectedResources TemplateAffectedResources
}

Jump to

Keyboard shortcuts

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