Documentation
¶
Index ¶
- Constants
- func ComputeAppRevisionHash(appRevision *v1beta1.ApplicationRevision) (string, error)
- func DeepEqualRevision(old, new *v1beta1.ApplicationRevision) bool
- func Setup(mgr ctrl.Manager, args core.Args) error
- type AppHandler
- func (h *AppHandler) ApplyAppManifests(ctx context.Context, comps []*types.ComponentManifest, ...) error
- func (h *AppHandler) FinalizeAndApplyAppRevision(ctx context.Context, comps []*types.ComponentManifest) error
- func (h *AppHandler) HandleComponentsRevision(ctx context.Context, compManifests []*types.ComponentManifest) error
- func (h *AppHandler) PrepareCurrentAppRevision(ctx context.Context, af *appfile.Appfile) error
- func (h *AppHandler) UpdateAppLatestRevisionStatus(ctx context.Context) error
- type Reconciler
Constants ¶
const (
// ConfigMapKeyResources is the key in ConfigMap Data field for containing data of resources
ConfigMapKeyResources = "resources"
)
const ( // WorkflowReconcileWaitTime is the time to wait before reconcile again workflow running WorkflowReconcileWaitTime = time.Second * 3 )
Variables ¶
This section is empty.
Functions ¶
func ComputeAppRevisionHash ¶ added in v1.0.0
func ComputeAppRevisionHash(appRevision *v1beta1.ApplicationRevision) (string, error)
ComputeAppRevisionHash computes a single hash value for an appRevision object Spec of Application/WorkloadDefinitions/ComponentDefinitions/TraitDefinitions/ScopeDefinitions will be taken into compute
func DeepEqualRevision ¶ added in v1.0.0
func DeepEqualRevision(old, new *v1beta1.ApplicationRevision) bool
DeepEqualRevision will compare the spec of Application and Definition to see if the Application is the same revision Spec of AC and Component will not be compared as they are generated by the application and definitions Note the Spec compare can only work when the RawExtension are decoded well in the RawExtension.Object instead of in RawExtension.Raw(bytes)
Types ¶
type AppHandler ¶ added in v1.1.0
type AppHandler struct {
// contains filtered or unexported fields
}
AppHandler handles application reconcile
func (*AppHandler) ApplyAppManifests ¶ added in v1.1.0
func (h *AppHandler) ApplyAppManifests(ctx context.Context, comps []*types.ComponentManifest, policies []*unstructured.Unstructured) error
ApplyAppManifests will dispatch Application manifests
func (*AppHandler) FinalizeAndApplyAppRevision ¶ added in v1.1.0
func (h *AppHandler) FinalizeAndApplyAppRevision(ctx context.Context, comps []*types.ComponentManifest) error
FinalizeAndApplyAppRevision finalise AppRevision object and apply it
func (*AppHandler) HandleComponentsRevision ¶ added in v1.1.0
func (h *AppHandler) HandleComponentsRevision(ctx context.Context, compManifests []*types.ComponentManifest) error
HandleComponentsRevision manages Component revisions
func (*AppHandler) PrepareCurrentAppRevision ¶ added in v1.1.0
PrepareCurrentAppRevision will generate a pure revision without metadata and rendered result the generated revision will be compare with the last revision to see if there's any difference.
func (*AppHandler) UpdateAppLatestRevisionStatus ¶ added in v1.1.0
func (h *AppHandler) UpdateAppLatestRevisionStatus(ctx context.Context) error
UpdateAppLatestRevisionStatus only call to update app's latest revision status after applying manifests successfully otherwise it will override previous revision which is used during applying to do GC jobs
type Reconciler ¶
type Reconciler struct { client.Client Scheme *runtime.Scheme Recorder event.Recorder // contains filtered or unexported fields }
Reconciler reconciles a Application object
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager install to manager