job

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRunJobType

func GetRunJobType(run *model.ResourceRun) (types.RunJobType, error)

GetRunJobType gets the run job type for deployer with its type and status. It makes the following decision.

| Run type         | Run status       | Job type         |
| ---------------- | ---------------- | ---------------- |
| create           | pending          | plan             |
| create           | planed           | apply            |
| upgrade          | pending          | plan             |
| upgrade          | planed           | apply            |
| delete           | pending          | plan             |
| delete           | planed           | destroy          |
| start            | pending          | plan             |
| start            | planed           | apply            |
| stop             | pending          | plan             |
| stop             | planed           | destroy          |
| rollback         | pending          | plan             |
| rollback         | planed           | apply            |

func PerformRunJob

func PerformRunJob(ctx context.Context, mc model.ClientSet, dp deptypes.Deployer, run *model.ResourceRun) (err error)

PerformRunJob performs the run job by the given run. Depending on the run type and status, the deployer will perform different actions.

func Syncer

func Syncer(kc *rest.Config) syncer

Types

type Reconciler

type Reconciler struct {
	Logger         logr.Logger
	Kubeconfig     *rest.Config
	KubeClient     client.Client
	ModelClient    *model.Client
	StorageManager *storage.Manager
}

func (Reconciler) Reconcile

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

func (Reconciler) Setup

func (r Reconciler) Setup(mgr ctrl.Manager) error

Jump to

Keyboard shortcuts

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