Documentation
¶
Index ¶
- func FindAnnotationOrLabelByKeyPattern(annotationsOrLabels map[string]string, pattern *regexp.Regexp) (key, value string, found bool)
- func FindAnnotationsOrLabelsByKeyPattern(annotationsOrLabels map[string]string, pattern *regexp.Regexp) (result map[string]string, found bool)
- func IsHook(annotations map[string]string) bool
- func IsSensitive(groupKind schema.GroupKind, annotations map[string]string) bool
- func ResourceIDsSortHandler(id1, id2 *id.ResourceID) bool
- type DropInvalidAnnotationsAndLabelsTransformer
- func (t *DropInvalidAnnotationsAndLabelsTransformer) Match(ctx context.Context, info *ResourceTransformerResourceInfo) (matched bool, err error)
- func (t *DropInvalidAnnotationsAndLabelsTransformer) Transform(ctx context.Context, info *ResourceTransformerResourceInfo) ([]*unstructured.Unstructured, error)
- func (t *DropInvalidAnnotationsAndLabelsTransformer) Type() ResourceTransformerType
- type ExtraMetadataPatcher
- type GeneralResource
- func (r *GeneralResource) AutoInternalDependencies() (dependencies []*dependency.InternalDependency, set bool)
- func (r *GeneralResource) DefaultReplicasOnCreation() (replicas int, set bool)
- func (r *GeneralResource) DeleteOnFailed() bool
- func (r *GeneralResource) DeleteOnSucceeded() bool
- func (r *GeneralResource) ExternalDependencies() (dependencies []*dependency.ExternalDependency, set bool, err error)
- func (r *GeneralResource) FailMode() multitrack.FailMode
- func (r *GeneralResource) FailuresAllowed() int
- func (r *GeneralResource) IgnoreReadinessProbeFailsForContainers() (durationByContainer map[string]time.Duration, set bool)
- func (r *GeneralResource) KeepOnDelete() bool
- func (r *GeneralResource) LogRegex() (regex *regexp.Regexp, set bool)
- func (r *GeneralResource) LogRegexesForContainers() (regexByContainer map[string]*regexp.Regexp, set bool)
- func (r *GeneralResource) ManageableBy() ManageableBy
- func (r *GeneralResource) ManualInternalDependencies() (dependencies []*dependency.InternalDependency, set bool)
- func (r *GeneralResource) NoActivityTimeout() (timeout *time.Duration, set bool)
- func (r *GeneralResource) Recreate() bool
- func (r *GeneralResource) ShowLogsOnlyForContainers() (containers []string, set bool)
- func (r *GeneralResource) ShowServiceMessages() bool
- func (r *GeneralResource) SkipLogs() bool
- func (r *GeneralResource) SkipLogsForContainers() (containers []string, set bool)
- func (r *GeneralResource) TrackTerminationMode() multitrack.TrackTerminationMode
- func (r *GeneralResource) Type() Type
- func (r *GeneralResource) Unstructured() *unstructured.Unstructured
- func (r *GeneralResource) Validate() error
- func (r *GeneralResource) Weight() int
- type GeneralResourceFromManifestOptions
- type GeneralResourceOptions
- type HookResource
- func (r *HookResource) AutoInternalDependencies() (dependencies []*dependency.InternalDependency, set bool)
- func (r *HookResource) DefaultReplicasOnCreation() (replicas int, set bool)
- func (r *HookResource) DeleteOnFailed() bool
- func (r *HookResource) DeleteOnSucceeded() bool
- func (r *HookResource) ExternalDependencies() (dependencies []*dependency.ExternalDependency, set bool, err error)
- func (r *HookResource) FailMode() multitrack.FailMode
- func (r *HookResource) FailuresAllowed() int
- func (r *HookResource) IgnoreReadinessProbeFailsForContainers() (durationByContainer map[string]time.Duration, set bool)
- func (r *HookResource) KeepOnDelete() bool
- func (r *HookResource) LogRegex() (regex *regexp.Regexp, set bool)
- func (r *HookResource) LogRegexesForContainers() (regexByContainer map[string]*regexp.Regexp, set bool)
- func (r *HookResource) ManageableBy() ManageableBy
- func (r *HookResource) ManualInternalDependencies() (dependencies []*dependency.InternalDependency, set bool)
- func (r *HookResource) NoActivityTimeout() (timeout *time.Duration, set bool)
- func (r *HookResource) OnPostAnything() bool
- func (r *HookResource) OnPostDelete() bool
- func (r *HookResource) OnPostInstall() bool
- func (r *HookResource) OnPostRollback() bool
- func (r *HookResource) OnPostUpgrade() bool
- func (r *HookResource) OnPreAnything() bool
- func (r *HookResource) OnPreDelete() bool
- func (r *HookResource) OnPreInstall() bool
- func (r *HookResource) OnPreRollback() bool
- func (r *HookResource) OnPreUpgrade() bool
- func (r *HookResource) OnTest() bool
- func (r *HookResource) Recreate() bool
- func (r *HookResource) ShowLogsOnlyForContainers() (containers []string, set bool)
- func (r *HookResource) ShowServiceMessages() bool
- func (r *HookResource) SkipLogs() bool
- func (r *HookResource) SkipLogsForContainers() (containers []string, set bool)
- func (r *HookResource) TrackTerminationMode() multitrack.TrackTerminationMode
- func (r *HookResource) Type() Type
- func (r *HookResource) Unstructured() *unstructured.Unstructured
- func (r *HookResource) Validate() error
- func (r *HookResource) Weight() int
- type HookResourceFromManifestOptions
- type HookResourceOptions
- type ManageableBy
- type ReleaseMetadataPatcher
- type ReleaseNamespace
- type ReleaseNamespaceOptions
- type RemoteResource
- func (r *RemoteResource) AdoptableBy(releaseName, releaseNamespace string) (adoptable bool, nonAdoptableReason string)
- func (r *RemoteResource) FixManagedFields() (changed bool, err error)
- func (r *RemoteResource) KeepOnDelete(releaseName, releaseNamespace string) bool
- func (r *RemoteResource) Type() Type
- func (r *RemoteResource) Unstructured() *unstructured.Unstructured
- type RemoteResourceOptions
- type ResourceListsTransformer
- func (t *ResourceListsTransformer) Match(ctx context.Context, info *ResourceTransformerResourceInfo) (matched bool, err error)
- func (t *ResourceListsTransformer) Transform(ctx context.Context, info *ResourceTransformerResourceInfo) ([]*unstructured.Unstructured, error)
- func (t *ResourceListsTransformer) Type() ResourceTransformerType
- type ResourcePatcher
- type ResourcePatcherResourceInfo
- type ResourcePatcherType
- type ResourceTransformer
- type ResourceTransformerResourceInfo
- type ResourceTransformerType
- type StandaloneCRD
- type StandaloneCRDFromManifestOptions
- type StandaloneCRDOptions
- type Type
- type UpToDateStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResourceIDsSortHandler ¶
func ResourceIDsSortHandler(id1, id2 *id.ResourceID) bool
Types ¶
type DropInvalidAnnotationsAndLabelsTransformer ¶
type DropInvalidAnnotationsAndLabelsTransformer struct{}
TODO(3.0): remove this transformer. Replace it with proper early validation of resource Heads.
func NewDropInvalidAnnotationsAndLabelsTransformer ¶
func NewDropInvalidAnnotationsAndLabelsTransformer() *DropInvalidAnnotationsAndLabelsTransformer
func (*DropInvalidAnnotationsAndLabelsTransformer) Match ¶
func (t *DropInvalidAnnotationsAndLabelsTransformer) Match(ctx context.Context, info *ResourceTransformerResourceInfo) (matched bool, err error)
func (*DropInvalidAnnotationsAndLabelsTransformer) Transform ¶
func (t *DropInvalidAnnotationsAndLabelsTransformer) Transform(ctx context.Context, info *ResourceTransformerResourceInfo) ([]*unstructured.Unstructured, error)
func (*DropInvalidAnnotationsAndLabelsTransformer) Type ¶
func (t *DropInvalidAnnotationsAndLabelsTransformer) Type() ResourceTransformerType
type ExtraMetadataPatcher ¶
type ExtraMetadataPatcher struct {
// contains filtered or unexported fields
}
func NewExtraMetadataPatcher ¶
func NewExtraMetadataPatcher(annotations, labels map[string]string) *ExtraMetadataPatcher
func (*ExtraMetadataPatcher) Match ¶
func (p *ExtraMetadataPatcher) Match(ctx context.Context, info *ResourcePatcherResourceInfo) (bool, error)
func (*ExtraMetadataPatcher) Patch ¶
func (p *ExtraMetadataPatcher) Patch(ctx context.Context, info *ResourcePatcherResourceInfo) (*unstructured.Unstructured, error)
func (*ExtraMetadataPatcher) Type ¶
func (p *ExtraMetadataPatcher) Type() ResourcePatcherType
type GeneralResource ¶
type GeneralResource struct {
*id.ResourceID
// contains filtered or unexported fields
}
func NewGeneralResource ¶
func NewGeneralResource(unstruct *unstructured.Unstructured, opts GeneralResourceOptions) *GeneralResource
func NewGeneralResourceFromManifest ¶
func NewGeneralResourceFromManifest(manifest string, opts GeneralResourceFromManifestOptions) (*GeneralResource, error)
func (*GeneralResource) AutoInternalDependencies ¶
func (r *GeneralResource) AutoInternalDependencies() (dependencies []*dependency.InternalDependency, set bool)
func (*GeneralResource) DefaultReplicasOnCreation ¶
func (r *GeneralResource) DefaultReplicasOnCreation() (replicas int, set bool)
func (*GeneralResource) DeleteOnFailed ¶
func (r *GeneralResource) DeleteOnFailed() bool
func (*GeneralResource) DeleteOnSucceeded ¶
func (r *GeneralResource) DeleteOnSucceeded() bool
func (*GeneralResource) ExternalDependencies ¶
func (r *GeneralResource) ExternalDependencies() (dependencies []*dependency.ExternalDependency, set bool, err error)
func (*GeneralResource) FailMode ¶
func (r *GeneralResource) FailMode() multitrack.FailMode
func (*GeneralResource) FailuresAllowed ¶
func (r *GeneralResource) FailuresAllowed() int
func (*GeneralResource) IgnoreReadinessProbeFailsForContainers ¶
func (r *GeneralResource) IgnoreReadinessProbeFailsForContainers() (durationByContainer map[string]time.Duration, set bool)
func (*GeneralResource) KeepOnDelete ¶
func (r *GeneralResource) KeepOnDelete() bool
func (*GeneralResource) LogRegex ¶
func (r *GeneralResource) LogRegex() (regex *regexp.Regexp, set bool)
func (*GeneralResource) LogRegexesForContainers ¶
func (r *GeneralResource) LogRegexesForContainers() (regexByContainer map[string]*regexp.Regexp, set bool)
func (*GeneralResource) ManageableBy ¶
func (r *GeneralResource) ManageableBy() ManageableBy
func (*GeneralResource) ManualInternalDependencies ¶
func (r *GeneralResource) ManualInternalDependencies() (dependencies []*dependency.InternalDependency, set bool)
func (*GeneralResource) NoActivityTimeout ¶
func (r *GeneralResource) NoActivityTimeout() (timeout *time.Duration, set bool)
func (*GeneralResource) Recreate ¶
func (r *GeneralResource) Recreate() bool
func (*GeneralResource) ShowLogsOnlyForContainers ¶
func (r *GeneralResource) ShowLogsOnlyForContainers() (containers []string, set bool)
func (*GeneralResource) ShowServiceMessages ¶
func (r *GeneralResource) ShowServiceMessages() bool
func (*GeneralResource) SkipLogs ¶
func (r *GeneralResource) SkipLogs() bool
func (*GeneralResource) SkipLogsForContainers ¶
func (r *GeneralResource) SkipLogsForContainers() (containers []string, set bool)
func (*GeneralResource) TrackTerminationMode ¶
func (r *GeneralResource) TrackTerminationMode() multitrack.TrackTerminationMode
func (*GeneralResource) Type ¶
func (r *GeneralResource) Type() Type
func (*GeneralResource) Unstructured ¶
func (r *GeneralResource) Unstructured() *unstructured.Unstructured
func (*GeneralResource) Validate ¶
func (r *GeneralResource) Validate() error
func (*GeneralResource) Weight ¶
func (r *GeneralResource) Weight() int
type GeneralResourceFromManifestOptions ¶
type GeneralResourceFromManifestOptions struct {
FilePath string
DefaultNamespace string
Mapper meta.ResettableRESTMapper
DiscoveryClient discovery.CachedDiscoveryInterface
}
type GeneralResourceOptions ¶
type GeneralResourceOptions struct {
FilePath string
DefaultNamespace string
Mapper meta.ResettableRESTMapper
DiscoveryClient discovery.CachedDiscoveryInterface
}
type HookResource ¶
type HookResource struct {
*id.ResourceID
// contains filtered or unexported fields
}
func NewHookResource ¶
func NewHookResource(unstruct *unstructured.Unstructured, opts HookResourceOptions) *HookResource
func NewHookResourceFromManifest ¶
func NewHookResourceFromManifest(manifest string, opts HookResourceFromManifestOptions) (*HookResource, error)
func (*HookResource) AutoInternalDependencies ¶
func (r *HookResource) AutoInternalDependencies() (dependencies []*dependency.InternalDependency, set bool)
func (*HookResource) DefaultReplicasOnCreation ¶
func (r *HookResource) DefaultReplicasOnCreation() (replicas int, set bool)
func (*HookResource) DeleteOnFailed ¶
func (r *HookResource) DeleteOnFailed() bool
func (*HookResource) DeleteOnSucceeded ¶
func (r *HookResource) DeleteOnSucceeded() bool
func (*HookResource) ExternalDependencies ¶
func (r *HookResource) ExternalDependencies() (dependencies []*dependency.ExternalDependency, set bool, err error)
func (*HookResource) FailMode ¶
func (r *HookResource) FailMode() multitrack.FailMode
func (*HookResource) FailuresAllowed ¶
func (r *HookResource) FailuresAllowed() int
func (*HookResource) IgnoreReadinessProbeFailsForContainers ¶
func (r *HookResource) IgnoreReadinessProbeFailsForContainers() (durationByContainer map[string]time.Duration, set bool)
func (*HookResource) KeepOnDelete ¶
func (r *HookResource) KeepOnDelete() bool
func (*HookResource) LogRegexesForContainers ¶
func (r *HookResource) LogRegexesForContainers() (regexByContainer map[string]*regexp.Regexp, set bool)
func (*HookResource) ManageableBy ¶
func (r *HookResource) ManageableBy() ManageableBy
func (*HookResource) ManualInternalDependencies ¶
func (r *HookResource) ManualInternalDependencies() (dependencies []*dependency.InternalDependency, set bool)
func (*HookResource) NoActivityTimeout ¶
func (r *HookResource) NoActivityTimeout() (timeout *time.Duration, set bool)
func (*HookResource) OnPostAnything ¶
func (r *HookResource) OnPostAnything() bool
func (*HookResource) OnPostDelete ¶
func (r *HookResource) OnPostDelete() bool
func (*HookResource) OnPostInstall ¶
func (r *HookResource) OnPostInstall() bool
func (*HookResource) OnPostRollback ¶
func (r *HookResource) OnPostRollback() bool
func (*HookResource) OnPostUpgrade ¶
func (r *HookResource) OnPostUpgrade() bool
func (*HookResource) OnPreAnything ¶
func (r *HookResource) OnPreAnything() bool
func (*HookResource) OnPreDelete ¶
func (r *HookResource) OnPreDelete() bool
func (*HookResource) OnPreInstall ¶
func (r *HookResource) OnPreInstall() bool
func (*HookResource) OnPreRollback ¶
func (r *HookResource) OnPreRollback() bool
func (*HookResource) OnPreUpgrade ¶
func (r *HookResource) OnPreUpgrade() bool
func (*HookResource) OnTest ¶
func (r *HookResource) OnTest() bool
func (*HookResource) Recreate ¶
func (r *HookResource) Recreate() bool
func (*HookResource) ShowLogsOnlyForContainers ¶
func (r *HookResource) ShowLogsOnlyForContainers() (containers []string, set bool)
func (*HookResource) ShowServiceMessages ¶
func (r *HookResource) ShowServiceMessages() bool
func (*HookResource) SkipLogs ¶
func (r *HookResource) SkipLogs() bool
func (*HookResource) SkipLogsForContainers ¶
func (r *HookResource) SkipLogsForContainers() (containers []string, set bool)
func (*HookResource) TrackTerminationMode ¶
func (r *HookResource) TrackTerminationMode() multitrack.TrackTerminationMode
func (*HookResource) Type ¶
func (r *HookResource) Type() Type
func (*HookResource) Unstructured ¶
func (r *HookResource) Unstructured() *unstructured.Unstructured
func (*HookResource) Validate ¶
func (r *HookResource) Validate() error
func (*HookResource) Weight ¶
func (r *HookResource) Weight() int
type HookResourceFromManifestOptions ¶
type HookResourceFromManifestOptions struct {
FilePath string
DefaultNamespace string
Mapper meta.ResettableRESTMapper
DiscoveryClient discovery.CachedDiscoveryInterface
}
type HookResourceOptions ¶
type HookResourceOptions struct {
FilePath string
DefaultNamespace string
Mapper meta.ResettableRESTMapper
DiscoveryClient discovery.CachedDiscoveryInterface
}
type ManageableBy ¶
type ManageableBy string
const ( ManageableByAnyone ManageableBy = "" ManageableBySingleRelease ManageableBy = "manageable-by-single-release" )
type ReleaseMetadataPatcher ¶
type ReleaseMetadataPatcher struct {
// contains filtered or unexported fields
}
func NewReleaseMetadataPatcher ¶
func NewReleaseMetadataPatcher(releaseName, releaseNamespace string) *ReleaseMetadataPatcher
func (*ReleaseMetadataPatcher) Match ¶
func (p *ReleaseMetadataPatcher) Match(ctx context.Context, info *ResourcePatcherResourceInfo) (bool, error)
func (*ReleaseMetadataPatcher) Patch ¶
func (p *ReleaseMetadataPatcher) Patch(ctx context.Context, info *ResourcePatcherResourceInfo) (*unstructured.Unstructured, error)
func (*ReleaseMetadataPatcher) Type ¶
func (p *ReleaseMetadataPatcher) Type() ResourcePatcherType
type ReleaseNamespace ¶
type ReleaseNamespace struct {
*id.ResourceID
// contains filtered or unexported fields
}
func NewReleaseNamespace ¶
func NewReleaseNamespace(unstruct *unstructured.Unstructured, opts ReleaseNamespaceOptions) *ReleaseNamespace
func (*ReleaseNamespace) ManageableBy ¶
func (r *ReleaseNamespace) ManageableBy() ManageableBy
func (*ReleaseNamespace) Type ¶
func (r *ReleaseNamespace) Type() Type
func (*ReleaseNamespace) Unstructured ¶
func (r *ReleaseNamespace) Unstructured() *unstructured.Unstructured
func (*ReleaseNamespace) Validate ¶
func (r *ReleaseNamespace) Validate() error
type ReleaseNamespaceOptions ¶
type ReleaseNamespaceOptions struct {
FilePath string
Mapper meta.ResettableRESTMapper
}
type RemoteResource ¶
type RemoteResource struct {
*id.ResourceID
// contains filtered or unexported fields
}
func NewRemoteResource ¶
func NewRemoteResource(unstruct *unstructured.Unstructured, opts RemoteResourceOptions) *RemoteResource
func (*RemoteResource) AdoptableBy ¶
func (r *RemoteResource) AdoptableBy(releaseName, releaseNamespace string) (adoptable bool, nonAdoptableReason string)
func (*RemoteResource) FixManagedFields ¶
func (r *RemoteResource) FixManagedFields() (changed bool, err error)
func (*RemoteResource) KeepOnDelete ¶
func (r *RemoteResource) KeepOnDelete(releaseName, releaseNamespace string) bool
func (*RemoteResource) Type ¶
func (r *RemoteResource) Type() Type
func (*RemoteResource) Unstructured ¶
func (r *RemoteResource) Unstructured() *unstructured.Unstructured
type RemoteResourceOptions ¶
type RemoteResourceOptions struct {
FallbackNamespace string
Mapper meta.ResettableRESTMapper
}
type ResourceListsTransformer ¶
type ResourceListsTransformer struct{}
func NewResourceListsTransformer ¶
func NewResourceListsTransformer() *ResourceListsTransformer
func (*ResourceListsTransformer) Match ¶
func (t *ResourceListsTransformer) Match(ctx context.Context, info *ResourceTransformerResourceInfo) (matched bool, err error)
func (*ResourceListsTransformer) Transform ¶
func (t *ResourceListsTransformer) Transform(ctx context.Context, info *ResourceTransformerResourceInfo) ([]*unstructured.Unstructured, error)
func (*ResourceListsTransformer) Type ¶
func (t *ResourceListsTransformer) Type() ResourceTransformerType
type ResourcePatcher ¶
type ResourcePatcher interface {
Match(ctx context.Context, resourceInfo *ResourcePatcherResourceInfo) (matched bool, err error)
Patch(ctx context.Context, matchedResourceInfo *ResourcePatcherResourceInfo) (output *unstructured.Unstructured, err error)
Type() ResourcePatcherType
}
type ResourcePatcherResourceInfo ¶
type ResourcePatcherResourceInfo struct {
Obj *unstructured.Unstructured
Type Type
ManageableBy ManageableBy
}
type ResourcePatcherType ¶
type ResourcePatcherType string
const TypeExtraMetadataPatcher ResourcePatcherType = "extra-metadata-patcher"
const TypeReleaseMetadataPatcher ResourcePatcherType = "release-metadata-patcher"
type ResourceTransformer ¶
type ResourceTransformer interface {
Match(ctx context.Context, resourceInfo *ResourceTransformerResourceInfo) (matched bool, err error)
Transform(ctx context.Context, matchedResourceInfo *ResourceTransformerResourceInfo) (output []*unstructured.Unstructured, err error)
Type() ResourceTransformerType
}
type ResourceTransformerResourceInfo ¶
type ResourceTransformerResourceInfo struct {
Obj *unstructured.Unstructured
Type Type
ManageableBy ManageableBy
}
type ResourceTransformerType ¶
type ResourceTransformerType string
const TypeDropInvalidAnnotationsAndLabelsTransformer ResourceTransformerType = "drop-invalid-annotations-and-labels-transformer"
const TypeResourceListsTransformer ResourceTransformerType = "resource-lists-transformer"
type StandaloneCRD ¶
type StandaloneCRD struct {
*id.ResourceID
// contains filtered or unexported fields
}
func NewStandaloneCRD ¶
func NewStandaloneCRD(unstruct *unstructured.Unstructured, opts StandaloneCRDOptions) *StandaloneCRD
func NewStandaloneCRDFromManifest ¶
func NewStandaloneCRDFromManifest(manifest string, opts StandaloneCRDFromManifestOptions) (*StandaloneCRD, error)
func (*StandaloneCRD) ManageableBy ¶
func (r *StandaloneCRD) ManageableBy() ManageableBy
func (*StandaloneCRD) Type ¶
func (r *StandaloneCRD) Type() Type
func (*StandaloneCRD) Unstructured ¶
func (r *StandaloneCRD) Unstructured() *unstructured.Unstructured
func (*StandaloneCRD) Validate ¶
func (r *StandaloneCRD) Validate() error
type StandaloneCRDFromManifestOptions ¶
type StandaloneCRDFromManifestOptions struct {
FilePath string
DefaultNamespace string
Mapper meta.ResettableRESTMapper
}
type StandaloneCRDOptions ¶
type StandaloneCRDOptions struct {
FilePath string
DefaultNamespace string
Mapper meta.ResettableRESTMapper
}
type Type ¶
type Type string
const TypeGeneralResource Type = "general-resource"
const TypeHookResource Type = "hook-resource"
const TypeReleaseNamespace Type = "release-namespace"
const TypeRemoteResource Type = "remote-resource"
const TypeStandaloneCRD Type = "standalone-crd"
type UpToDateStatus ¶
type UpToDateStatus string
const ( UpToDateStatusUnknown UpToDateStatus = "unknown" UpToDateStatusYes UpToDateStatus = "yes" UpToDateStatusNo UpToDateStatus = "no" )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.