Documentation
¶
Index ¶
- Constants
- Variables
- func DisclaimerTransform(_ context.Context, _ Object, resources []*unstructured.Unstructured) error
- func DockerImageLocalizationTransform(ctx context.Context, obj Object, resources []*unstructured.Unstructured) error
- func KymaComponentTransform(_ context.Context, obj Object, resources []*unstructured.Unstructured) error
- func ManagedByOwnedBy(_ context.Context, obj Object, resources []*unstructured.Unstructured) error
- type ExistsStateCheck
- type InMemoryManifestCache
- type ManagedByLabelRemoval
- type ManifestAPIClient
- type ManifestCache
- type ManifestParser
- type Object
- type ObjectTransform
- type Option
- type Options
- type OrphanDetection
- type PostRenderTransformOption
- type Reconciler
- type ResourceList
- type SKRClient
- type SKRClientCache
- type Spec
- type SpecResolver
- type StateCheck
- type WithCustomResourceLabels
- type WithCustomStateCheckOption
- type WithManagerOption
- type WithManifestCache
- type WithManifestParserOption
Constants ¶
View Source
const ( DisclaimerAnnotation = shared.OperatorGroup + shared.Separator + "managed-by-reconciler-disclaimer" DisclaimerAnnotationValue = "DO NOT EDIT - This resource is managed by Kyma.\n" + "Any modifications are discarded and the resource is reverted to the original state." OwnedByFormat = "%s/%s" )
View Source
const ( EventRecorderDefault = "declarative.kyma-project.io/events" DefaultInMemoryParseTTL = 24 * time.Hour )
View Source
const ManifestFilePrefix = "manifest"
View Source
const (
SyncedOCIRefAnnotation = "sync-oci-ref"
)
Variables ¶
View Source
var ( ErrManagerInErrorState = errors.New("manager is in error state") ErrResourceSyncDiffInSameOCILayer = errors.New("resource syncTarget diff detected but in " + "same oci layer, prevent sync resource to be deleted") )
View Source
var ErrInvalidManifestType = errors.New("invalid object type, expected *v1beta2.Manifest")
View Source
var ErrNotValidClientObject = errors.New("object in resource info is not a valid client object")
Functions ¶
func DisclaimerTransform ¶
func DisclaimerTransform(_ context.Context, _ Object, resources []*unstructured.Unstructured) error
func DockerImageLocalizationTransform ¶
func DockerImageLocalizationTransform(ctx context.Context, obj Object, resources []*unstructured.Unstructured) error
DockerImageLocalizationTransform rewrites Docker images in the provided resources according to the Spec.LocalizedImages field in the Manifest object.
func KymaComponentTransform ¶
func KymaComponentTransform(_ context.Context, obj Object, resources []*unstructured.Unstructured) error
func ManagedByOwnedBy ¶
func ManagedByOwnedBy(_ context.Context, obj Object, resources []*unstructured.Unstructured) error
Types ¶
type ExistsStateCheck ¶
type ExistsStateCheck struct{}
func NewExistsStateCheck ¶
func NewExistsStateCheck() *ExistsStateCheck
type InMemoryManifestCache ¶
type InMemoryManifestCache struct { *ttlcache.Cache[string, internal.ManifestResources] TTL time.Duration }
func NewInMemoryManifestCache ¶
func NewInMemoryManifestCache(ttl time.Duration) *InMemoryManifestCache
func (*InMemoryManifestCache) EvictCache ¶
func (c *InMemoryManifestCache) EvictCache(spec *Spec)
func (*InMemoryManifestCache) Parse ¶
func (c *InMemoryManifestCache) Parse(spec *Spec, ) (internal.ManifestResources, error)
type ManagedByLabelRemoval ¶
type ManifestAPIClient ¶
type ManifestCache ¶
type ManifestCache string
type ManifestParser ¶
type ManifestParser interface { Parse(spec *Spec) (internal.ManifestResources, error) EvictCache(spec *Spec) }
type ObjectTransform ¶
type ObjectTransform = func(context.Context, Object, []*unstructured.Unstructured) error
type Options ¶
type Options struct { client.Client ManifestCache ManifestParser record.EventRecorder Config *rest.Config CustomStateCheck StateCheck PostRenderTransforms []ObjectTransform }
func DefaultOptions ¶
func DefaultOptions() *Options
type OrphanDetection ¶
type PostRenderTransformOption ¶
type PostRenderTransformOption struct {
ObjectTransforms []ObjectTransform
}
func WithPostRenderTransform ¶
func WithPostRenderTransform(transforms ...ObjectTransform) PostRenderTransformOption
func (PostRenderTransformOption) Apply ¶
func (o PostRenderTransformOption) Apply(options *Options)
type Reconciler ¶
type Reconciler struct { queue.RequeueIntervals *Options ManifestMetrics *metrics.ManifestMetrics MandatoryModuleMetrics *metrics.MandatoryModulesMetrics // contains filtered or unexported fields }
func NewFromManager ¶
func NewFromManager(mgr manager.Manager, requeueIntervals queue.RequeueIntervals, metrics *metrics.ManifestMetrics, mandatoryModulesMetrics *metrics.MandatoryModulesMetrics, manifestAPIClient ManifestAPIClient, orphanDetectionClient orphan.DetectionRepository, specResolver SpecResolver, clientCache SKRClientCache, skrClient SKRClient, options ...Option, ) *Reconciler
type ResourceList ¶
ResourceList provides convenience methods for comparing collections of Infos. Copy from https://github.com/helm/helm/blob/v3.19.0/pkg/kube/resource.go
func (ResourceList) Difference ¶
func (r ResourceList) Difference(rs ResourceList) ResourceList
Difference will return a new Result with objects not contained in rs.
func (ResourceList) Visit ¶
func (r ResourceList) Visit(fn resource.VisitorFunc) error
Visit implements resource.Visitor.
type SKRClientCache ¶
type SpecResolver ¶
type StateCheck ¶
type WithCustomResourceLabels ¶
func (WithCustomResourceLabels) Apply ¶
func (o WithCustomResourceLabels) Apply(options *Options)
type WithCustomStateCheckOption ¶
type WithCustomStateCheckOption struct {
StateCheck
}
func WithCustomStateCheck ¶
func WithCustomStateCheck(check StateCheck) WithCustomStateCheckOption
func (WithCustomStateCheckOption) Apply ¶
func (o WithCustomStateCheckOption) Apply(options *Options)
type WithManagerOption ¶
func WithManager ¶
func WithManager(mgr manager.Manager) WithManagerOption
func (WithManagerOption) Apply ¶
func (o WithManagerOption) Apply(options *Options)
type WithManifestCache ¶
type WithManifestCache ManifestCache
func (WithManifestCache) Apply ¶
func (o WithManifestCache) Apply(options *Options)
type WithManifestParserOption ¶
type WithManifestParserOption struct {
ManifestParser
}
func WithManifestParser ¶
func WithManifestParser(parser ManifestParser) WithManifestParserOption
func (WithManifestParserOption) Apply ¶
func (o WithManifestParserOption) Apply(options *Options)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.