utils

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ResourceTypeCiliumNetworkPolicy is the resource type used for the
	// PolicyLabelDerivedFrom label
	ResourceTypeCiliumNetworkPolicy = "CiliumNetworkPolicy"
)

Variables

This section is empty.

Functions

func GetPolicyLabels

func GetPolicyLabels(ns, name string, uid types.UID, derivedFrom string) labels.LabelArray

GetPolicyLabels returns a LabelArray for the given namespace and name.

func ParseToCiliumLabels

func ParseToCiliumLabels(namespace, name string, uid types.UID, ruleLbs labels.LabelArray) labels.LabelArray

ParseToCiliumLabels returns all ruleLbls appended with a specific label that represents the given namespace and name along with a label that specifies these labels were derived from a CiliumNetworkPolicy.

func ParseToCiliumRule

func ParseToCiliumRule(namespace, name string, uid types.UID, r *api.Rule) *api.Rule

ParseToCiliumRule returns an api.Rule with all the labels parsed into cilium labels.

Types

This section is empty.

Jump to

Keyboard shortcuts

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