config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 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) 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.FieldCopyMod

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
}

func NewConfigFromResource

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

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
	// TODO Strategy string
	Sources []ctlres.FieldCopyModSource
}

func (RebaseRule) AsMods

func (r RebaseRule) AsMods() []ctlres.FieldCopyMod

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
}

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