pod

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPodManagedByStarboardOperator

func IsPodManagedByStarboardOperator(pod *corev1.Pod) bool

IsPodManagedByStarboardOperator returns true if the specified Pod is managed by the Starboard Operator, false otherwise.

We define managed Pods as ones controlled by Jobs created by the Starboard Operator. They're labeled with `app.kubernetes.io/managed-by=starboard-operator`.

func SliceContainsString

func SliceContainsString(slice []string, value string) bool

SliceContainsString returns true if the specified slice of strings contains the give value, false otherwise.

Types

type PodController

func (*PodController) IgnorePodInOperatorNamespace

func (r *PodController) IgnorePodInOperatorNamespace(installMode etc.InstallMode, pod types.NamespacedName) bool

IgnorePodInOperatorNamespace determines whether to reconcile the specified Pod based on the give InstallMode or not. Returns true if the Pod should be ignored, false otherwise.

In the SingleNamespace install mode we're configuring Client cache to watch the operator namespace, in which the operator runs scan Jobs. However, we do not want to scan the workloads that might run in the operator namespace.

In the MultiNamespace install mode we're configuring Client cache to watch the operator namespace, in which the operator runs scan Jobs. However, we do not want to scan the workloads that might run in the operator namespace unless the operator namespace is added to the list of target namespaces.

func (*PodController) Reconcile

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

func (*PodController) SetupWithManager

func (r *PodController) SetupWithManager(mgr ctrl.Manager) error

Jump to

Keyboard shortcuts

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