controllers

package
v0.38.93 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const FinalizerName = "canary.canaries.flanksource.com"

Variables

View Source
var CanaryConfigFiles []string
View Source
var DataFile string
View Source
var Kommons *kommons.Client
View Source
var Scheduler = cron.New()
View Source
var SystemScheduler = cron.New()

Functions

func ScanCanaryConfigs added in v0.38.85

func ScanCanaryConfigs()

func ScheduleSystemFunc added in v0.38.85

func ScheduleSystemFunc(schedule string, fn func()) (interface{}, error)

func Start added in v0.38.85

func Start()

func StartScanCanaryConfigs added in v0.38.85

func StartScanCanaryConfigs(dataFile string, configFiles []string)

func SyncCanaryJobs added in v0.38.85

func SyncCanaryJobs()

Types

type CanaryJob

type CanaryJob struct {
	*kommons.Client
	v1.Canary
	// model   pkg.Canary
	LogPass bool
	LogFail bool
}

func (CanaryJob) GetNamespacedName

func (job CanaryJob) GetNamespacedName() types.NamespacedName

func (*CanaryJob) NewContext added in v0.38.85

func (job *CanaryJob) NewContext() *context.Context

func (CanaryJob) Run

func (job CanaryJob) Run()

type CanaryReconciler

type CanaryReconciler struct {
	IncludeCheck      string
	IncludeNamespaces []string
	LogPass, LogFail  bool
	client.Client
	Kubernetes kubernetes.Interface
	Kommons    *kommons.Client
	Log        logr.Logger
	Scheme     *runtime.Scheme
	Events     record.EventRecorder
	Cron       *cron.Cron
	RunnerName string
	Done       chan *pkg.CheckResult
}

CanaryReconciler reconciles a Canary object

func (*CanaryReconciler) Patch

func (r *CanaryReconciler) Patch(canary *v1.Canary)

func (*CanaryReconciler) Reconcile

func (r *CanaryReconciler) Reconcile(ctx gocontext.Context, req ctrl.Request) (ctrl.Result, error)

+kubebuilder:rbac:groups=canaries.flanksource.com,resources=canaries,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=canaries.flanksource.com,resources=canaries/status,verbs=get;update;patch +kubebuilder:rbac:groups="",resources=pods/exec,verbs=* +kubebuilder:rbac:groups="",resources=pods/logs,verbs=*

func (*CanaryReconciler) Report

func (r *CanaryReconciler) Report(ctx *context.Context, canary v1.Canary, results []*pkg.CheckResult)

func (*CanaryReconciler) SetupWithManager

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

Jump to

Keyboard shortcuts

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