Documentation ¶
Index ¶
- func NewDefaultConfigString() string
- type APIGroupKindMatcher
- type APIVersionKindMatcher
- type AllMatcher
- type AndMatcher
- type AnyMatcher
- type ChangeGroupBinding
- type ChangeRuleBinding
- type Conf
- func (c Conf) AdditionalLabels() map[string]string
- func (c Conf) ChangeGroupBindings() []ChangeGroupBinding
- func (c Conf) ChangeRuleBindings() []ChangeRuleBinding
- func (c Conf) DiffAgainstExistingFieldExclusionMods() []ctlres.FieldRemoveMod
- func (c Conf) DiffAgainstLastAppliedFieldExclusionMods() []ctlres.FieldRemoveMod
- func (c Conf) DiffMaskRules() []DiffMaskRule
- func (c Conf) LabelScopingMods(defaultRules bool) func(kvs map[string]string) []ctlres.StringMapAppendMod
- func (c Conf) OwnershipLabelMods() func(kvs map[string]string) []ctlres.StringMapAppendMod
- func (c Conf) PreflightRules() []PreflightRule
- func (c Conf) RebaseMods() []ctlres.ResourceModWithMultiple
- func (c Conf) TemplateRules() []TemplateRule
- func (c Conf) WaitRules() []WaitRule
- type Config
- type CustomResourceMatcher
- type DiffAgainstExistingFieldExclusionRule
- type DiffAgainstLastAppliedFieldExclusionRule
- type DiffMaskRule
- type EmptyFieldMatcher
- type FuncContractV1
- type HasAnnotationMatcher
- type HasNamespaceMatcher
- type KindNamespaceNameMatcher
- type LabelScopingRule
- type NotMatcher
- type OwnershipLabelRule
- type PreflightRule
- type RebaseRule
- type RebaseRuleYtt
- type RebaseRuleYttOverlayContractV1
- type ResourceMatcher
- type ResourceMatchers
- type TemplateAffectedObjRef
- type TemplateAffectedResources
- type TemplateRule
- type WaitRule
- type WaitRuleConditionMatcher
- type WaitRuleYtt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultConfigString ¶
func NewDefaultConfigString() string
Types ¶
type APIGroupKindMatcher ¶ added in v0.62.0
type APIVersionKindMatcher ¶
type AllMatcher ¶ added in v0.62.0
type AllMatcher struct{}
type AndMatcher ¶ added in v0.62.0
type AndMatcher struct {
Matchers []ResourceMatcher
}
type AnyMatcher ¶ added in v0.62.0
type AnyMatcher struct {
Matchers []ResourceMatcher
}
type ChangeGroupBinding ¶ added in v0.62.0
type ChangeGroupBinding struct { Name string ResourceMatchers []ResourceMatcher }
type ChangeRuleBinding ¶ added in v0.62.0
type ChangeRuleBinding struct { Rules []string IgnoreIfCyclical bool ResourceMatchers []ResourceMatcher }
type Conf ¶
type Conf struct {
// contains filtered or unexported fields
}
func NewConfFromResources ¶
func (Conf) AdditionalLabels ¶ added in v0.6.0
func (Conf) ChangeGroupBindings ¶ added in v0.62.0
func (c Conf) ChangeGroupBindings() []ChangeGroupBinding
func (Conf) ChangeRuleBindings ¶ added in v0.62.0
func (c Conf) ChangeRuleBindings() []ChangeRuleBinding
func (Conf) DiffAgainstExistingFieldExclusionMods ¶ added in v0.62.0
func (c Conf) DiffAgainstExistingFieldExclusionMods() []ctlres.FieldRemoveMod
func (Conf) DiffAgainstLastAppliedFieldExclusionMods ¶ added in v0.14.0
func (c Conf) DiffAgainstLastAppliedFieldExclusionMods() []ctlres.FieldRemoveMod
func (Conf) DiffMaskRules ¶ added in v0.62.0
func (c Conf) DiffMaskRules() []DiffMaskRule
func (Conf) LabelScopingMods ¶
func (Conf) OwnershipLabelMods ¶
func (c Conf) OwnershipLabelMods() func(kvs map[string]string) []ctlres.StringMapAppendMod
func (Conf) PreflightRules ¶ added in v0.62.0
func (c Conf) PreflightRules() []PreflightRule
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 MinimumRequiredVersion string `json:"minimumRequiredVersion,omitempty"` RebaseRules []RebaseRule WaitRules []WaitRule OwnershipLabelRules []OwnershipLabelRule LabelScopingRules []LabelScopingRule TemplateRules []TemplateRule DiffMaskRules []DiffMaskRule PreflightRules []PreflightRule AdditionalLabels map[string]string DiffAgainstLastAppliedFieldExclusionRules []DiffAgainstLastAppliedFieldExclusionRule DiffAgainstExistingFieldExclusionRules []DiffAgainstExistingFieldExclusionRule // TODO additional? // TODO validations ChangeGroupBindings []ChangeGroupBinding ChangeRuleBindings []ChangeRuleBinding }
type CustomResourceMatcher ¶ added in v0.62.0
type CustomResourceMatcher struct{}
type DiffAgainstExistingFieldExclusionRule ¶ added in v0.62.0
type DiffAgainstExistingFieldExclusionRule struct { ResourceMatchers []ResourceMatcher Path ctlres.Path }
func (DiffAgainstExistingFieldExclusionRule) AsMod ¶ added in v0.62.0
func (r DiffAgainstExistingFieldExclusionRule) AsMod() ctlres.FieldRemoveMod
type DiffAgainstLastAppliedFieldExclusionRule ¶ added in v0.14.0
type DiffAgainstLastAppliedFieldExclusionRule struct { ResourceMatchers []ResourceMatcher Path ctlres.Path }
func (DiffAgainstLastAppliedFieldExclusionRule) AsMod ¶ added in v0.62.0
func (r DiffAgainstLastAppliedFieldExclusionRule) AsMod() ctlres.FieldRemoveMod
type DiffMaskRule ¶ added in v0.62.0
type DiffMaskRule struct { ResourceMatchers []ResourceMatcher Path ctlres.Path }
type EmptyFieldMatcher ¶ added in v0.62.0
type FuncContractV1 ¶ added in v0.62.0
type FuncContractV1 struct {
Resource string `json:"resource.star"`
}
type HasAnnotationMatcher ¶ added in v0.62.0
type HasAnnotationMatcher struct {
Keys []string
}
type HasNamespaceMatcher ¶ added in v0.62.0
type HasNamespaceMatcher struct {
Names []string
}
type LabelScopingRule ¶
type LabelScopingRule struct { ResourceMatchers []ResourceMatcher Path ctlres.Path IsDefault bool `json:"isDefault"` }
func (LabelScopingRule) AsMod ¶ added in v0.62.0
func (r LabelScopingRule) AsMod(kvs map[string]string) ctlres.StringMapAppendMod
type NotMatcher ¶ added in v0.62.0
type NotMatcher struct {
Matcher ResourceMatcher
}
type OwnershipLabelRule ¶
type OwnershipLabelRule struct { ResourceMatchers []ResourceMatcher Path ctlres.Path }
func (OwnershipLabelRule) AsMod ¶ added in v0.62.0
func (r OwnershipLabelRule) AsMod(kvs map[string]string) ctlres.StringMapAppendMod
type PreflightRule ¶ added in v0.62.0
type RebaseRule ¶
type RebaseRule struct { ResourceMatchers []ResourceMatcher Path ctlres.Path Paths []ctlres.Path Type string Sources []ctlres.FieldCopyModSource Ytt *RebaseRuleYtt }
func (RebaseRule) AsMods ¶
func (r RebaseRule) AsMods() []ctlres.ResourceModWithMultiple
func (RebaseRule) Validate ¶ added in v0.62.0
func (r RebaseRule) Validate() error
type RebaseRuleYtt ¶ added in v0.62.0
type RebaseRuleYtt struct { // Contracts are named (eg overlay) and versioned (eg v1) // to provide a stable interface to rule authors. // Multiple contracts will be offered at the same time // so that existing rules do not not break as we decide to evolve running environment. OverlayContractV1 *RebaseRuleYttOverlayContractV1 `json:"overlayContractV1"` }
type RebaseRuleYttOverlayContractV1 ¶ added in v0.62.0
type RebaseRuleYttOverlayContractV1 struct {
OverlayYAML string `json:"overlay.yml"`
}
type ResourceMatcher ¶
type ResourceMatcher struct { AllMatcher *AllMatcher // default AnyMatcher *AnyMatcher NotMatcher *NotMatcher AndMatcher *AndMatcher APIGroupKindMatcher *APIGroupKindMatcher APIVersionKindMatcher *APIVersionKindMatcher `json:"apiVersionKindMatcher"` KindNamespaceNameMatcher *KindNamespaceNameMatcher HasAnnotationMatcher *HasAnnotationMatcher HasNamespaceMatcher *HasNamespaceMatcher CustomResourceMatcher *CustomResourceMatcher EmptyFieldMatcher *EmptyFieldMatcher }
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 }
type WaitRule ¶ added in v0.62.0
type WaitRule struct { SupportsObservedGeneration bool ConditionMatchers []WaitRuleConditionMatcher ResourceMatchers []ResourceMatcher Ytt *WaitRuleYtt }
func (WaitRule) ResourceMatcher ¶ added in v0.62.0
func (r WaitRule) ResourceMatcher() ctlres.ResourceMatcher
type WaitRuleConditionMatcher ¶ added in v0.62.0
type WaitRuleYtt ¶ added in v0.62.0
type WaitRuleYtt struct { // Contracts are named and versioned (eg v1) // to provide a stable interface to rule authors. // Multiple contracts will be offered at the same time // so that existing rules do not not break as we decide to evolve running environment. FuncContractV1 *FuncContractV1 `json:"funcContractV1"` }
Click to show internal directories.
Click to hide internal directories.