templatesync

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 43 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DepFailNoAPIMapping    = "Could not find an API mapping for the dependency"
	DepFailObjNotFound     = "Dependency object not found"
	DepFailGet             = "Failed to get the dependency object"
	DepFailCompNotFound    = "Failed to find complianceState on the dependency object"
	DepFailWrongCompliance = "Compliance mismatch on the dependency object"
)
View Source
const (
	ControllerName string = "policy-template-sync"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyReconciler

type PolicyReconciler struct {
	// This client, initialized using mgr.Client() above, is a split client
	// that reads objects from the cache and writes to the apiserver
	client.Client
	DynamicWatcher   depclient.DynamicWatcher
	Scheme           *runtime.Scheme
	Config           *rest.Config
	Recorder         record.EventRecorder
	ClusterNamespace string
	Clientset        *kubernetes.Clientset
	InstanceName     string
	DisableGkSync    bool

	ConcurrentReconciles int
	// EventsQueue is a queue that accepts ComplianceAPIEventRequest to then be recorded in the compliance events
	// API by StartComplianceEventsSyncer. If the compliance events API is disabled, this will be nil.
	EventsQueue workqueue.RateLimitingInterface
	// contains filtered or unexported fields
}

PolicyReconciler reconciles a Policy object

func (*PolicyReconciler) Reconcile

func (r *PolicyReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Policy object and makes changes based on the state read and what is in the Policy.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*PolicyReconciler) Setup added in v0.10.0

func (r *PolicyReconciler) Setup(mgr ctrl.Manager, depEvents *source.Channel) error

Setup sets up the controller

Jump to

Keyboard shortcuts

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