samplepolicy

package
v0.0.0-...-1783eb8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventOnParent string

EventOnParent specifies if we also want to send events to the parent policy. Available options are yes/no/ifpresent.

View Source
var KubeClient *kubernetes.Interface

KubeClient a k8s client used for k8s native resources.

View Source
var NamespaceWatched string

NamespaceWatched defines which namespace we can watch for the GRC policies and ignore others.

View Source
var PlcChan chan *policiesv1.SamplePolicy

PlcChan a channel used to pass policies ready for update.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new SamplePolicy Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

func Initialize

func Initialize(client *kubernetes.Interface, mgr manager.Manager, namespace, eventParent string)

Initialize to initialize some controller variables.

func PeriodicallyExecSamplePolicies

func PeriodicallyExecSamplePolicies(freq uint)

PeriodicallyExecSamplePolicies always check status.

Types

type ReconcileSamplePolicy

type ReconcileSamplePolicy struct {
	// contains filtered or unexported fields
}

ReconcileSamplePolicy reconciles a SamplePolicy object.

func (*ReconcileSamplePolicy) Reconcile

func (r *ReconcileSamplePolicy) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a SamplePolicy object and makes changes based on the state read and what is in the SamplePolicy.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.

Jump to

Keyboard shortcuts

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