networkpolicy

package
v0.0.0-...-aba7421 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResultNormal            = common.ResultNormal
	ResultRequeue           = common.ResultRequeue
	ResultRequeueAfter5mins = common.ResultRequeueAfter5mins
	MetricResType           = common.MetricResTypeNetworkPolicy
)

Functions

func StartNetworkPolicyController

func StartNetworkPolicyController(mgr ctrl.Manager, commonService servicecommon.Service, vpcService servicecommon.VPCServiceProvider)

Types

type NetworkPolicyReconciler

type NetworkPolicyReconciler struct {
	Client   client.Client
	Scheme   *apimachineryruntime.Scheme
	Service  *securitypolicy.SecurityPolicyService
	Recorder record.EventRecorder
}

NetworkPolicyReconciler reconciles a NetworkPolicy object

func (*NetworkPolicyReconciler) GarbageCollector

func (r *NetworkPolicyReconciler) GarbageCollector(cancel chan bool, timeout time.Duration)

GarbageCollector collect networkpolicy which has been removed from K8s. cancel is used to break the loop during UT

func (*NetworkPolicyReconciler) Reconcile

func (r *NetworkPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*NetworkPolicyReconciler) Start

func (r *NetworkPolicyReconciler) Start(mgr ctrl.Manager) error

Start setup manager and launch GC

Jump to

Keyboard shortcuts

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