approval

package
v0.0.0-...-889b5f9 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

README

Approval controller

The approval controller automatically takes a package from Draft to Proposed and then to Published, according to a policy that is added as an annotation to a PackageRevision.

Currently the only supported value is a built-in policy called initial, which will publish a Draft if and only if:

  • The package readiness gates are all True.
  • There is not already a Published revision for the package.

This allows us to use it for initial approvals, but also allows us to then create a new Draft and have it not be automatically published.

To enable this policy, annotate the package revision with approval.nephio.org/policy: initial.

This controller will automatically delay taking any action for two minutes after the creation of the package revision. This is due to some current issues during the early lifecycle of a package generated by a PackageVariant. Hopefully we will fix this soon and can relax the delay.

You can change the delay time by setting approval.nephio.org/delay to a duration string. For example, setting approval.nephio.org/delay: 5m to require the revision to have existed for at least five minutes before it is proposed and approved.

If you set it to less than 30s, a delay of 30s will be used.

Documentation

Index

Constants

View Source
const (
	DelayAnnotationName          = "approval.nephio.org/delay"
	PolicyAnnotationName         = "approval.nephio.org/policy"
	InitialPolicyAnnotationValue = "initial"
	RequeueDuration              = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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