samplepolicy

package
v0.0.0-...-105d4aa Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Copyright 2019 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 Finalizer = "finalizer.policies.ibm.com"

Finalizer used to ensure consistency when deleting a CRD

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

PlcChan a channel used to pass policies ready for update

View Source
var PrometheusAddr string

PrometheusAddr port addr for prom metrics

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(kClient *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