Documentation
¶
Index ¶
- Constants
- Variables
- func CleanUpDefinitionRevision(ctx context.Context, cli client.Client, def runtime.Object, revisionLimit int) error
- func ConstructDefinitionRevisionName(definitionName, revision string) string
- func CreateDefinitionRevision(ctx context.Context, cli client.Client, def util.ConditionedObject, ...) error
- func DeepEqualDefRevision(old, new *v1beta1.DefinitionRevision) bool
- func GatherRevisionInfo(def runtime.Object) (*v1beta1.DefinitionRevision, *common.Revision, error)
- func GenerateDefinitionRevision(ctx context.Context, cli client.Client, def runtime.Object) (*v1beta1.DefinitionRevision, bool, error)
- func MatchControllerRequirement(definition util.ConditionedObject, controllerVersion string, ...) bool
- func ReconcileDefinitionRevision(ctx context.Context, cli client.Client, record event.Recorder, ...) (*v1beta1.DefinitionRevision, *ctrl.Result, error)
Constants ¶
const DefinitionRevisionNumbersName = "definition-revision-numbers"
DefinitionRevisionNumbersName is the ConfigMap, in each namespace that holds definitions, recording for each definition name there the highest revision number issued and the hashes of the newest ones. A definition's revisions go with it when it is deleted. With the record, one created again under the same name takes back the number of content it once had, so pins on it keep working, and never reuses a number for other content, so no pin binds to that.
Variables ¶
var LiveReader client.Reader
LiveReader reads from the API server, set at setup. The revision garbage collector reads Applications through it when the controller is sharded, since a sharded cache holds only this shard's Applications; revision numbering reads through it always (liveReader).
Functions ¶
func CleanUpDefinitionRevision ¶
func CleanUpDefinitionRevision(ctx context.Context, cli client.Client, def runtime.Object, revisionLimit int) error
CleanUpDefinitionRevision deletes a definition's oldest revisions beyond revisionLimit. The revision in use and any revision an Application pins (type@vN) are kept and not counted.
func ConstructDefinitionRevisionName ¶
ConstructDefinitionRevisionName construct the name of DefinitionRevision.
func CreateDefinitionRevision ¶
func CreateDefinitionRevision(ctx context.Context, cli client.Client, def util.ConditionedObject, defRev *v1beta1.DefinitionRevision) error
CreateDefinitionRevision create the revision of the definition
func DeepEqualDefRevision ¶
func DeepEqualDefRevision(old, new *v1beta1.DefinitionRevision) bool
DeepEqualDefRevision deep compare the spec of definitionRevisions, restrictions aside.
func GatherRevisionInfo ¶
GatherRevisionInfo gather revision information from definition
func GenerateDefinitionRevision ¶
func GenerateDefinitionRevision(ctx context.Context, cli client.Client, def runtime.Object) (*v1beta1.DefinitionRevision, bool, error)
GenerateDefinitionRevision will generate a definition revision the generated revision will be compare with the last revision to see if there's any difference. It reports true when the definition's status must point at the returned revision, which is created where it does not exist yet.
func MatchControllerRequirement ¶
func MatchControllerRequirement(definition util.ConditionedObject, controllerVersion string, ignoreDefNoCtrlReq bool) bool
MatchControllerRequirement check the requirement
func ReconcileDefinitionRevision ¶
func ReconcileDefinitionRevision(ctx context.Context, cli client.Client, record event.Recorder, definition util.ConditionedObject, revisionLimit int, updateLatestRevision func(*common.Revision) error, ) (*v1beta1.DefinitionRevision, *ctrl.Result, error)
ReconcileDefinitionRevision generate the definition revision and update it.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package components provides components related controllers.
|
Package components provides components related controllers. |
|
policies
|
|
|
sources
|
|
|
Package traits provides traits related controllers.
|
Package traits provides traits related controllers. |
|
workflow
|
|