resrc

package
v0.0.0-...-3d5d804 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAnnotationOrLabelByKeyPattern

func FindAnnotationOrLabelByKeyPattern(annotationsOrLabels map[string]string, pattern *regexp.Regexp) (key string, value string, found bool)

func FindAnnotationsOrLabelsByKeyPattern

func FindAnnotationsOrLabelsByKeyPattern(annotationsOrLabels map[string]string, pattern *regexp.Regexp) (result map[string]string, found bool)

func IsCRDFromGK

func IsCRDFromGK(groupKind schema.GroupKind) bool

func IsCRDFromGR

func IsCRDFromGR(groupKind schema.GroupResource) bool

func IsHook

func IsHook(annotations map[string]string) bool

func IsSecret

func IsSecret(groupKind schema.GroupKind) bool

Types

type GeneralResource

type GeneralResource struct {
	*resrcid.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 []*depnd.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 []*depnd.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 []*depnd.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 {
	*resrcid.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 []*depnd.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 []*depnd.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) LogRegex

func (r *HookResource) LogRegex() (regex *regexp.Regexp, set 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 []*depnd.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 ReleaseNamespace

type ReleaseNamespace struct {
	*resrcid.ResourceID
	// contains filtered or unexported fields
}

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 {
	*resrcid.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 string, 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 StandaloneCRD

type StandaloneCRD struct {
	*resrcid.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"

Jump to

Keyboard shortcuts

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