applicationrollout

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleReplicas added in v1.1.0

func HandleReplicas(ctx context.Context, rolloutComp string, c client.Client) assemble.WorkloadOption

HandleReplicas override initial replicas of workload

func RolloutWorkloadName added in v1.1.0

func RolloutWorkloadName(rolloutComp string) assemble.WorkloadOption

RolloutWorkloadName generate workload name for when rollout

func Setup

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

Setup adds a controller that reconciles AppRollout.

Types

type Reconciler

type Reconciler struct {
	client.Client

	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

Reconciler reconciles an AppRollout object

func NewReconciler added in v1.0.4

func NewReconciler(c client.Client, dm discoverymapper.DiscoveryMapper, pd *packages.PackageDiscover, record event.Recorder, scheme *runtime.Scheme, concurrent int) *Reconciler

NewReconciler render a applicationRollout reconciler

func (*Reconciler) DoReconcile added in v1.0.4

func (r *Reconciler) DoReconcile(ctx context.Context, appRollout *v1beta1.AppRollout) (reconcile.Result, error)

DoReconcile is real reconcile logic for appRollout. 1.prepare rollout info: use assemble module in application pkg to generate manifest with appRevision 2.determine which component is the common component between source and target AppRevision 3.if target workload isn't exist yet, template the targetAppRevision to apply target manifest 4.extract target workload and source workload(if sourceAppRevision not empty) 5.generate a rolloutPlan controller with source and target workload and call rolloutPlan's reconcile func 6.handle output status !!! Note the AppRollout object should not be updated in this function as it could be logically used in Application reconcile loop which does not have real AppRollout object.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (res reconcile.Result, retErr error)

Reconcile is the main logic of appRollout controller nolint:gocyclo

func (*Reconciler) SetupWithManager

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

SetupWithManager setup the controller with manager

Jump to

Keyboard shortcuts

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