Documentation ¶
Index ¶
- Constants
- func OperatorGroupBundleUnpackRetryInterval(ogLister v1listers.OperatorGroupNamespaceLister) (time.Duration, error)
- func OperatorGroupBundleUnpackTimeout(ogLister v1listers.OperatorGroupNamespaceLister) (time.Duration, error)
- type BundleUnpackResult
- type ConfigMapUnpacker
- type ConfigMapUnpackerOption
- func WithCatalogSourceLister(csLister listersoperatorsv1alpha1.CatalogSourceLister) ConfigMapUnpackerOption
- func WithClient(client kubernetes.Interface) ConfigMapUnpackerOption
- func WithConfigMapLister(cmLister listerscorev1.ConfigMapLister) ConfigMapUnpackerOption
- func WithJobLister(jobLister listersbatchv1.JobLister) ConfigMapUnpackerOption
- func WithLogger(logger *logrus.Logger) ConfigMapUnpackerOption
- func WithNow(now func() metav1.Time) ConfigMapUnpackerOption
- func WithOPMImage(opmImage string) ConfigMapUnpackerOption
- func WithPodLister(podLister listerscorev1.PodLister) ConfigMapUnpackerOption
- func WithRoleBindingLister(rbLister listersrbacv1.RoleBindingLister) ConfigMapUnpackerOption
- func WithRoleLister(roleLister listersrbacv1.RoleLister) ConfigMapUnpackerOption
- func WithUnpackTimeout(timeout time.Duration) ConfigMapUnpackerOption
- func WithUserID(id int64) ConfigMapUnpackerOption
- func WithUtilImage(utilImage string) ConfigMapUnpackerOption
- type Unpacker
Constants ¶
View Source
const ( // TODO: This can be a spec field // BundleUnpackTimeoutAnnotationKey allows setting a bundle unpack timeout per OperatorGroup // and overrides the default specified by the --bundle-unpack-timeout flag // The time duration should be in the same format as accepted by time.ParseDuration() // e.g 1m30s BundleUnpackTimeoutAnnotationKey = "operatorframework.io/bundle-unpack-timeout" BundleUnpackPodLabel = "job-name" // BundleUnpackRetryMinimumIntervalAnnotationKey sets a minimum interval to wait before // attempting to recreate a failed unpack job for a bundle. BundleUnpackRetryMinimumIntervalAnnotationKey = "operatorframework.io/bundle-unpack-min-retry-interval" )
View Source
const ( CatalogSourceMissingReason = "CatalogSourceMissing" CatalogSourceMissingMessage = "referenced catalogsource not found" JobFailedReason = "JobFailed" JobFailedMessage = "unpack job has failed" JobIncompleteReason = "JobIncomplete" JobIncompleteMessage = "unpack job not completed" JobNotStartedReason = "JobNotStarted" JobNotStartedMessage = "unpack job not yet started" NotUnpackedReason = "BundleNotUnpacked" NotUnpackedMessage = "bundle contents have not yet been persisted to installplan status" )
Variables ¶
This section is empty.
Functions ¶
func OperatorGroupBundleUnpackRetryInterval ¶ added in v0.26.0
func OperatorGroupBundleUnpackRetryInterval(ogLister v1listers.OperatorGroupNamespaceLister) (time.Duration, error)
OperatorGroupBundleUnpackRetryInterval returns bundle unpack retry interval from annotation if specified. If the retry annotation is not set, return retry = 0 which is subsequently ignored. This interval, if > 0, determines the minimum interval between recreating a failed unpack job.
func OperatorGroupBundleUnpackTimeout ¶ added in v0.25.0
func OperatorGroupBundleUnpackTimeout(ogLister v1listers.OperatorGroupNamespaceLister) (time.Duration, error)
OperatorGroupBundleUnpackTimeout returns bundle timeout from annotation if specified. If the timeout annotation is not set, return timeout < 0 which is subsequently ignored. This is to overrides the --bundle-unpack-timeout flag value on per-OperatorGroup basis.
Types ¶
type BundleUnpackResult ¶
type BundleUnpackResult struct { *operatorsv1alpha1.BundleLookup // contains filtered or unexported fields }
func (*BundleUnpackResult) Bundle ¶
func (b *BundleUnpackResult) Bundle() *api.Bundle
func (*BundleUnpackResult) Name ¶
func (b *BundleUnpackResult) Name() string
func (*BundleUnpackResult) SetCondition ¶
func (b *BundleUnpackResult) SetCondition(cond operatorsv1alpha1.BundleLookupCondition) operatorsv1alpha1.BundleLookupCondition
SetCondition replaces the existing BundleLookupCondition of the same type, or adds it if it was not found.
type ConfigMapUnpacker ¶
type ConfigMapUnpacker struct {
// contains filtered or unexported fields
}
func NewConfigmapUnpacker ¶
func NewConfigmapUnpacker(options ...ConfigMapUnpackerOption) (*ConfigMapUnpacker, error)
func (*ConfigMapUnpacker) UnpackBundle ¶
func (c *ConfigMapUnpacker) UnpackBundle(lookup *operatorsv1alpha1.BundleLookup, timeout, retryInterval time.Duration) (result *BundleUnpackResult, err error)
type ConfigMapUnpackerOption ¶
type ConfigMapUnpackerOption func(*ConfigMapUnpacker)
func WithCatalogSourceLister ¶
func WithCatalogSourceLister(csLister listersoperatorsv1alpha1.CatalogSourceLister) ConfigMapUnpackerOption
func WithClient ¶
func WithClient(client kubernetes.Interface) ConfigMapUnpackerOption
func WithConfigMapLister ¶
func WithConfigMapLister(cmLister listerscorev1.ConfigMapLister) ConfigMapUnpackerOption
func WithJobLister ¶
func WithJobLister(jobLister listersbatchv1.JobLister) ConfigMapUnpackerOption
func WithLogger ¶ added in v0.19.0
func WithLogger(logger *logrus.Logger) ConfigMapUnpackerOption
func WithNow ¶
func WithNow(now func() metav1.Time) ConfigMapUnpackerOption
func WithOPMImage ¶
func WithOPMImage(opmImage string) ConfigMapUnpackerOption
func WithPodLister ¶ added in v0.18.2
func WithPodLister(podLister listerscorev1.PodLister) ConfigMapUnpackerOption
func WithRoleBindingLister ¶
func WithRoleBindingLister(rbLister listersrbacv1.RoleBindingLister) ConfigMapUnpackerOption
func WithRoleLister ¶
func WithRoleLister(roleLister listersrbacv1.RoleLister) ConfigMapUnpackerOption
func WithUnpackTimeout ¶ added in v0.18.2
func WithUnpackTimeout(timeout time.Duration) ConfigMapUnpackerOption
func WithUserID ¶ added in v0.22.0
func WithUserID(id int64) ConfigMapUnpackerOption
func WithUtilImage ¶
func WithUtilImage(utilImage string) ConfigMapUnpackerOption
type Unpacker ¶
type Unpacker interface {
UnpackBundle(lookup *operatorsv1alpha1.BundleLookup, timeout, retryInterval time.Duration) (result *BundleUnpackResult, err error)
}
Click to show internal directories.
Click to hide internal directories.