Documentation
¶
Index ¶
- func NewDefaultConfigString() string
- type APIVersionKindMatcher
- type AllResourceMatcher
- type Conf
- func (c Conf) AdditionalLabels() map[string]string
- func (c Conf) LabelScopingMods() func(kvs map[string]string) []ctlres.StringMapAppendMod
- func (c Conf) OwnershipLabelMods() func(kvs map[string]string) []ctlres.StringMapAppendMod
- func (c Conf) RebaseMods() []ctlres.ResourceModWithMultiple
- func (c Conf) TemplateRules() []TemplateRule
- type Config
- type KindNamespaceNameMatcher
- type LabelScopingRule
- type OwnershipLabelRule
- type RebaseRule
- type ResourceMatcher
- type ResourceMatchers
- type TemplateAffectedObjRef
- type TemplateAffectedResources
- type TemplateRule
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) 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
}
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
}
type OwnershipLabelRule ¶
type OwnershipLabelRule struct {
ResourceMatchers []ResourceMatcher
Path ctlres.Path
}
type RebaseRule ¶
type RebaseRule struct {
ResourceMatchers []ResourceMatcher
Path ctlres.Path
Type string
Sources []ctlres.FieldCopyModSource
}
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
}
Click to show internal directories.
Click to hide internal directories.