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 ¶
const Finalizer = "finalizer.policies.ibm.com"
Finalizer used to ensure consistency when deleting a CRD
Variables ¶
var EventOnParent string
EventOnParent specifies if we also want to send events to the parent policy. Available options are yes/no/ifpresent
var KubeClient *kubernetes.Interface
KubeClient a k8s client used for k8s native resources
var NamespaceWatched string
NamespaceWatched defines which namespace we can watch for the GRC policies and ignore others
var PlcChan chan *policiesv1alpha1.TrustedContainerPolicy
PlcChan a channel used to pass policies ready for update
var PrometheusAddr string
PrometheusAddr port addr for prom metrics
Functions ¶
func Add ¶
Add creates a new TrustedContainerPolicy 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 ReconcileTrustedContainerPolicy ¶
type ReconcileTrustedContainerPolicy struct {
// contains filtered or unexported fields
}
ReconcileTrustedContainerPolicy reconciles a TrustedContainerPolicy object
func (*ReconcileTrustedContainerPolicy) Reconcile ¶
func (r *ReconcileTrustedContainerPolicy) Reconcile(request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of the cluster for a TrustedContainerPolicy object and makes changes based on the state read and what is in the TrustedContainerPolicy.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.