controllers

package
v0.38.118 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Copyright 2020 The Kubernetes authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

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

Variables

View Source
var CanaryConfigFiles []string
View Source
var CanaryScheduler = cron.New()
View Source
var DataFile string
View Source
var Executor bool
View Source
var FuncScheduler = cron.New()
View Source
var Kommons *kommons.Client
View Source
var LogPass, LogFail bool
View Source
var SystemScheduler = cron.New()

Functions

func DeleteCanaryJob added in v0.38.100

func DeleteCanaryJob(canary v1.Canary)

func DeleteSystemJob added in v0.38.106

func DeleteSystemJob(systemTemplate v1.SystemTemplate)

func ScanCanaryConfigs added in v0.38.85

func ScanCanaryConfigs()

func ScheduleFunc added in v0.38.110

func ScheduleFunc(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 SyncCanaryJob added in v0.38.102

func SyncCanaryJob(canary v1.Canary) error

func SyncCanaryJobs added in v0.38.85

func SyncCanaryJobs()

func SyncSystemJob added in v0.38.106

func SyncSystemJob(systemTemplate v1.SystemTemplate) error

func SyncSystemsJobs added in v0.38.106

func SyncSystemsJobs()

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

type SystemJob added in v0.38.106

type SystemJob struct {
	*kommons.Client
	v1.SystemTemplate
}

func (SystemJob) GetNamespacedName added in v0.38.106

func (job SystemJob) GetNamespacedName() types.NamespacedName

func (SystemJob) Run added in v0.38.106

func (job SystemJob) Run()

type SystemReconciler added in v0.38.106

type SystemReconciler struct {
	client.Client
	Log        logr.Logger
	Scheme     *runtime.Scheme
	Events     record.EventRecorder
	RunnerName string
}

SystemReconciler reconciles a Canary object

func (*SystemReconciler) Patch added in v0.38.106

func (r *SystemReconciler) Patch(systemTemplate *v1.SystemTemplate)

func (*SystemReconciler) Reconcile added in v0.38.106

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

+kubebuilder:rbac:groups=canaries.flanksource.com,resources=systemtemplates,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=canaries.flanksource.com,resources=systemtemplates/status,verbs=get;update;patch

func (*SystemReconciler) SetupWithManager added in v0.38.106

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

Jump to

Keyboard shortcuts

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