application

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RolloutReconcileWaitTime = time.Second * 3
)

RolloutReconcileWaitTime is the time to wait before reconcile again an application still in rollout phase

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 ConvertComponent2RawRevision added in v1.0.0

func ConvertComponent2RawRevision(comps []*v1alpha2.Component) []common.RawComponent

ConvertComponent2RawRevision convert to ComponentMap

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)

func Setup

func Setup(mgr ctrl.Manager, args core.Args) error

Setup adds a controller that reconciles AppRollout.

Types

type AppRevisionHash added in v1.0.0

type AppRevisionHash struct {
	ApplicationSpecHash     string
	WorkloadDefinitionHash  map[string]string
	ComponentDefinitionHash map[string]string
	TraitDefinitionHash     map[string]string
	ScopeDefinitionHash     map[string]string
}

AppRevisionHash is used to compute the hash value of the AppRevision

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) Reconcile

func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile process app event

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager install to manager

func (*Reconciler) UpdateStatus added in v0.3.3

func (r *Reconciler) UpdateStatus(ctx context.Context, app *v1beta1.Application, opts ...client.UpdateOption) error

UpdateStatus updates v1beta1.Application's Status with retry.RetryOnConflict

Jump to

Keyboard shortcuts

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