controllers

package
v0.0.0-...-dd2566a Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const FinalizerName = "rule.finalizers.merlin.mercari.com"
View Source
const Separator = string(types.Separator)

Variables

View Source
var NotifierNotFoundErr = fmt.Errorf("notifiers not found")

Functions

func GetStructName

func GetStructName(v interface{}) string

func SetupReconcilers

func SetupReconcilers(mgr manager.Manager) error

Types

type ConfigMapReconciler

type ConfigMapReconciler struct {
	ResourceReconciler
}

ConfigMapReconciler reconciles configmap and rules for configmap objects

type ConfigMapUnusedRuleReconciler

type ConfigMapUnusedRuleReconciler struct {
	RuleReconciler
}

ConfigMapUnusedRuleReconciler reconciles ClusterRuleConfigMapUnused

type EventFilter

type EventFilter struct {
	predicate.Funcs
	Log logr.Logger
}

EventFilter determine what events we care about. Kubernetes first filter events then hands off those events to EventHandler

func (*EventFilter) Create

func (e *EventFilter) Create(evt event.CreateEvent) bool

func (*EventFilter) Delete

func (e *EventFilter) Delete(evt event.DeleteEvent) bool

func (*EventFilter) Generic

func (e *EventFilter) Generic(evt event.GenericEvent) bool

func (*EventFilter) Update

func (e *EventFilter) Update(evt event.UpdateEvent) bool

type EventHandler

type EventHandler struct {
	// logger
	Log logr.Logger
}

EventHandler determine how events should be handled. Kubernetes first uses EventFilter then hands off those events to this handler

func (*EventHandler) Create

Create handles events from creating resources

func (*EventHandler) Delete

Delete handles events from deleting resources

func (*EventHandler) Generic

Generic handles events from generic operations

func (*EventHandler) Update

Update handles events from updating resources

type HPAInvalidScaleTargetRefRuleReconciler

type HPAInvalidScaleTargetRefRuleReconciler struct {
	RuleReconciler
}

HPAInvalidScaleTargetRefRuleReconciler reconciles rule of secret unused

type HPAReplicaPercentageRuleReconciler

type HPAReplicaPercentageRuleReconciler struct {
	RuleReconciler
}

HPAReplicaPercentageRuleReconciler reconciles rule of secret unused

type HorizontalPodAutoscalerReconciler

type HorizontalPodAutoscalerReconciler struct {
	ResourceReconciler
}

HorizontalPodAutoscalerReconciler reconciles a HorizontalPodAutoscaler object

type NamespaceReconciler

type NamespaceReconciler struct {
	ResourceReconciler
}

NamespaceReconciler reconciles a Namespace object

type NamespaceRequiredLabelRuleReconciler

type NamespaceRequiredLabelRuleReconciler struct {
	RuleReconciler
}

NamespaceRequiredLabelRuleReconciler reconciles a Namespace object

type NotifierReconciler

type NotifierReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

NotifierReconciler reconciles a Notifier object

func (*NotifierReconciler) Reconcile

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

func (*NotifierReconciler) SetupWithManager

func (r *NotifierReconciler) SetupWithManager(mgr ctrl.Manager, alertMetrics *prometheus.GaugeVec) error

type PDBInvalidSelectorRuleReconciler

type PDBInvalidSelectorRuleReconciler struct {
	RuleReconciler
}

PDBInvalidSelectorRuleReconciler reconciles clusterrulepdbinvalidselector

type PDBMinAllowedDisruptionRuleReconciler

type PDBMinAllowedDisruptionRuleReconciler struct {
	RuleReconciler
}

PDBMinAllowedDisruptionRuleReconciler reconciles clusterrulepdbminalloweddisruption and rulepdbminalloweddisruption

type PodDisruptionBudgetReconciler

type PodDisruptionBudgetReconciler struct {
	ResourceReconciler
}

PodDisruptionBudgetReconciler reconciles PodDisruptionBudgets

type PodReconciler

type PodReconciler struct {
	ResourceReconciler
}

PodReconciler reconciles a Pod object

type ResourceReconciler

type ResourceReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

func (*ResourceReconciler) Reconcile

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

func (*ResourceReconciler) SetupWithManager

func (r *ResourceReconciler) SetupWithManager(mgr ctrl.Manager, indexingFunc func(rawObj runtime.Object) []string) error

type RuleReconciler

type RuleReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

func (*RuleReconciler) Reconcile

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

func (*RuleReconciler) SetupWithManager

func (r *RuleReconciler) SetupWithManager(mgr ctrl.Manager, violationMetrics *prometheus.GaugeVec, clusterRule, namespaceRule runtime.Object, indexingFunc func(rawObj runtime.Object) []string) error

type SecretReconciler

type SecretReconciler struct {
	ResourceReconciler
}

SecretReconciler reconciles secret and rules for secret objects

type SecretUnusedRuleReconciler

type SecretUnusedRuleReconciler struct {
	RuleReconciler
}

SecretUnusedReconciler reconciles ClusterRuleSecretUnused

type ServiceInvalidSelectorRuleReconciler

type ServiceInvalidSelectorRuleReconciler struct {
	RuleReconciler
}

ServiceInvalidSelectorRuleReconciler reconciles rules for ClusterRuleServiceInvalidSelector

type ServiceReconciler

type ServiceReconciler struct {
	ResourceReconciler
}

ServiceReconciler reconciles service and rules for service objects

Jump to

Keyboard shortcuts

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