resourceinfo

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDeployableResourceInfos

func BuildDeployableResourceInfos(
	ctx context.Context,
	releaseName string,
	releaseNamespace string,
	standaloneCRDs []*resource.StandaloneCRD,
	hookResources []*resource.HookResource,
	generalResources []*resource.GeneralResource,
	prevReleaseGeneralResources []*resource.GeneralResource,
	kubeClient kube.KubeClienter,
	mapper meta.ResettableRESTMapper,
	parallelism int,
) (
	releaseNamespaceInfo *DeployableReleaseNamespaceInfo,
	standaloneCRDsInfos []*DeployableStandaloneCRDInfo,
	hookResourcesInfos []*DeployableHookResourceInfo,
	generalResourcesInfos []*DeployableGeneralResourceInfo,
	prevReleaseGeneralResourceInfos []*DeployablePrevReleaseGeneralResourceInfo,
	err error,
)

Types

type DeployableGeneralResourceInfo

type DeployableGeneralResourceInfo struct {
	*id.ResourceID
	// contains filtered or unexported fields
}

func NewDeployableGeneralResourceInfo

func NewDeployableGeneralResourceInfo(ctx context.Context, res *resource.GeneralResource, releaseNamespace string, kubeClient kube.KubeClienter, mapper meta.ResettableRESTMapper) (*DeployableGeneralResourceInfo, error)

func (*DeployableGeneralResourceInfo) DryApplyResource

func (i *DeployableGeneralResourceInfo) DryApplyResource() *resource.RemoteResource

func (*DeployableGeneralResourceInfo) ForceReplicas

func (i *DeployableGeneralResourceInfo) ForceReplicas() (replicas int, set bool)

func (*DeployableGeneralResourceInfo) LiveResource

func (*DeployableGeneralResourceInfo) LiveUID

func (i *DeployableGeneralResourceInfo) LiveUID() (uid types.UID, found bool)

func (*DeployableGeneralResourceInfo) Resource

func (*DeployableGeneralResourceInfo) ShouldApply

func (i *DeployableGeneralResourceInfo) ShouldApply() bool

func (*DeployableGeneralResourceInfo) ShouldCleanup

func (i *DeployableGeneralResourceInfo) ShouldCleanup(releaseName, releaseNamespace string) bool

func (*DeployableGeneralResourceInfo) ShouldCleanupOnFailed

func (i *DeployableGeneralResourceInfo) ShouldCleanupOnFailed(prevRelFailed bool, releaseName, releaseNamespace string) bool

func (*DeployableGeneralResourceInfo) ShouldCreate

func (i *DeployableGeneralResourceInfo) ShouldCreate() bool

func (*DeployableGeneralResourceInfo) ShouldKeepOnDelete

func (i *DeployableGeneralResourceInfo) ShouldKeepOnDelete(releaseName, releaseNamespace string) bool

func (*DeployableGeneralResourceInfo) ShouldRecreate

func (i *DeployableGeneralResourceInfo) ShouldRecreate() bool

func (*DeployableGeneralResourceInfo) ShouldTrackReadiness

func (i *DeployableGeneralResourceInfo) ShouldTrackReadiness(prevRelFailed bool) bool

func (*DeployableGeneralResourceInfo) ShouldUpdate

func (i *DeployableGeneralResourceInfo) ShouldUpdate() bool

type DeployableHookResourceInfo

type DeployableHookResourceInfo struct {
	*id.ResourceID
	// contains filtered or unexported fields
}

func NewDeployableHookResourceInfo

func NewDeployableHookResourceInfo(ctx context.Context, res *resource.HookResource, releaseNamespace string, kubeClient kube.KubeClienter, mapper meta.ResettableRESTMapper) (*DeployableHookResourceInfo, error)

func (*DeployableHookResourceInfo) DryApplyResource

func (i *DeployableHookResourceInfo) DryApplyResource() *resource.RemoteResource

func (*DeployableHookResourceInfo) ForceReplicas

func (i *DeployableHookResourceInfo) ForceReplicas() (replicas int, set bool)

func (*DeployableHookResourceInfo) LiveResource

func (*DeployableHookResourceInfo) LiveUID

func (i *DeployableHookResourceInfo) LiveUID() (uid types.UID, found bool)

func (*DeployableHookResourceInfo) Resource

func (*DeployableHookResourceInfo) ShouldApply

func (i *DeployableHookResourceInfo) ShouldApply() bool

func (*DeployableHookResourceInfo) ShouldCleanup

func (i *DeployableHookResourceInfo) ShouldCleanup(releaseName, releaseNamespace string) bool

func (*DeployableHookResourceInfo) ShouldCleanupOnFailed

func (i *DeployableHookResourceInfo) ShouldCleanupOnFailed(prevRelFailed bool, releaseName, releaseNamespace string) bool

func (*DeployableHookResourceInfo) ShouldCreate

func (i *DeployableHookResourceInfo) ShouldCreate() bool

func (*DeployableHookResourceInfo) ShouldKeepOnDelete

func (i *DeployableHookResourceInfo) ShouldKeepOnDelete(releaseName, releaseNamespace string) bool

func (*DeployableHookResourceInfo) ShouldRecreate

func (i *DeployableHookResourceInfo) ShouldRecreate() bool

func (*DeployableHookResourceInfo) ShouldTrackReadiness

func (i *DeployableHookResourceInfo) ShouldTrackReadiness(prevRelFailed bool) bool

func (*DeployableHookResourceInfo) ShouldUpdate

func (i *DeployableHookResourceInfo) ShouldUpdate() bool

type DeployablePrevReleaseGeneralResourceInfo

type DeployablePrevReleaseGeneralResourceInfo struct {
	*id.ResourceID
	// contains filtered or unexported fields
}

func NewDeployablePrevReleaseGeneralResourceInfo

func NewDeployablePrevReleaseGeneralResourceInfo(ctx context.Context, res *resource.GeneralResource, releaseNamespace string, kubeClient kube.KubeClienter, mapper meta.ResettableRESTMapper) (*DeployablePrevReleaseGeneralResourceInfo, error)

func (*DeployablePrevReleaseGeneralResourceInfo) LiveResource

func (*DeployablePrevReleaseGeneralResourceInfo) Resource

func (*DeployablePrevReleaseGeneralResourceInfo) ShouldDelete

func (i *DeployablePrevReleaseGeneralResourceInfo) ShouldDelete(curReleaseExistingResourcesUIDs []types.UID, releaseName, releaseNamespace string) bool

func (*DeployablePrevReleaseGeneralResourceInfo) ShouldKeepOnDelete

func (i *DeployablePrevReleaseGeneralResourceInfo) ShouldKeepOnDelete(releaseName, releaseNamespace string) bool

type DeployableReleaseNamespaceInfo

type DeployableReleaseNamespaceInfo struct {
	*id.ResourceID
	// contains filtered or unexported fields
}

func (*DeployableReleaseNamespaceInfo) DryApplyResource

func (*DeployableReleaseNamespaceInfo) LiveResource

func (*DeployableReleaseNamespaceInfo) Resource

func (*DeployableReleaseNamespaceInfo) ShouldApply

func (i *DeployableReleaseNamespaceInfo) ShouldApply() bool

func (*DeployableReleaseNamespaceInfo) ShouldCreate

func (i *DeployableReleaseNamespaceInfo) ShouldCreate() bool

func (*DeployableReleaseNamespaceInfo) ShouldKeepOnDelete

func (i *DeployableReleaseNamespaceInfo) ShouldKeepOnDelete(releaseName, releaseNamespace string) bool

func (*DeployableReleaseNamespaceInfo) ShouldUpdate

func (i *DeployableReleaseNamespaceInfo) ShouldUpdate() bool

type DeployableResourcesProcessor

type DeployableResourcesProcessor struct {
	// contains filtered or unexported fields
}

func NewDeployableResourcesProcessor

func NewDeployableResourcesProcessor(
	deployType common.DeployType,
	releaseName string,
	releaseNamespace string,
	standaloneCRDs []*resource.StandaloneCRD,
	hookResources []*resource.HookResource,
	generalResources []*resource.GeneralResource,
	prevReleaseGeneralResources []*resource.GeneralResource,
	opts DeployableResourcesProcessorOptions,
) *DeployableResourcesProcessor

func (*DeployableResourcesProcessor) DeployableGeneralResources

func (p *DeployableResourcesProcessor) DeployableGeneralResources() []*resource.GeneralResource

func (*DeployableResourcesProcessor) DeployableGeneralResourcesInfos

func (p *DeployableResourcesProcessor) DeployableGeneralResourcesInfos() []*DeployableGeneralResourceInfo

func (*DeployableResourcesProcessor) DeployableHookResources

func (p *DeployableResourcesProcessor) DeployableHookResources() []*resource.HookResource

func (*DeployableResourcesProcessor) DeployableHookResourcesInfos

func (p *DeployableResourcesProcessor) DeployableHookResourcesInfos() []*DeployableHookResourceInfo

func (*DeployableResourcesProcessor) DeployablePrevReleaseGeneralResourcesInfos

func (p *DeployableResourcesProcessor) DeployablePrevReleaseGeneralResourcesInfos() []*DeployablePrevReleaseGeneralResourceInfo

func (*DeployableResourcesProcessor) DeployableStandaloneCRDs

func (p *DeployableResourcesProcessor) DeployableStandaloneCRDs() []*resource.StandaloneCRD

func (*DeployableResourcesProcessor) DeployableStandaloneCRDsInfos

func (p *DeployableResourcesProcessor) DeployableStandaloneCRDsInfos() []*DeployableStandaloneCRDInfo

func (*DeployableResourcesProcessor) Process

TODO(ilya-lesikov): optimize. Avoid excessive deep copies.

func (*DeployableResourcesProcessor) ReleasableGeneralResources

func (p *DeployableResourcesProcessor) ReleasableGeneralResources() []*resource.GeneralResource

func (*DeployableResourcesProcessor) ReleasableHookResources

func (p *DeployableResourcesProcessor) ReleasableHookResources() []*resource.HookResource

type DeployableResourcesProcessorOptions

type DeployableResourcesProcessorOptions struct {
	NetworkParallelism                int
	HookResourceTransformers          []resource.ResourceTransformer
	GeneralResourceTransformers       []resource.ResourceTransformer
	ReleasableHookResourcePatchers    []resource.ResourcePatcher
	ReleasableGeneralResourcePatchers []resource.ResourcePatcher
	DeployableStandaloneCRDsPatchers  []resource.ResourcePatcher
	DeployableHookResourcePatchers    []resource.ResourcePatcher
	DeployableGeneralResourcePatchers []resource.ResourcePatcher
	KubeClient                        kube.KubeClienter
	Mapper                            meta.ResettableRESTMapper
	DiscoveryClient                   discovery.CachedDiscoveryInterface
	AllowClusterAccess                bool
}

type DeployableStandaloneCRDInfo

type DeployableStandaloneCRDInfo struct {
	*id.ResourceID
	// contains filtered or unexported fields
}

func NewDeployableStandaloneCRDInfo

func NewDeployableStandaloneCRDInfo(ctx context.Context, res *resource.StandaloneCRD, releaseNamespace string, kubeClient kube.KubeClienter, mapper meta.ResettableRESTMapper) (*DeployableStandaloneCRDInfo, error)

func (*DeployableStandaloneCRDInfo) DryApplyResource

func (i *DeployableStandaloneCRDInfo) DryApplyResource() *resource.RemoteResource

func (*DeployableStandaloneCRDInfo) LiveResource

func (*DeployableStandaloneCRDInfo) LiveUID

func (i *DeployableStandaloneCRDInfo) LiveUID() (uid types.UID, found bool)

func (*DeployableStandaloneCRDInfo) Resource

func (*DeployableStandaloneCRDInfo) ShouldApply

func (i *DeployableStandaloneCRDInfo) ShouldApply() bool

func (*DeployableStandaloneCRDInfo) ShouldCreate

func (i *DeployableStandaloneCRDInfo) ShouldCreate() bool

func (*DeployableStandaloneCRDInfo) ShouldUpdate

func (i *DeployableStandaloneCRDInfo) ShouldUpdate() bool

Jump to

Keyboard shortcuts

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