resource

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourceCache added in v1.3.0

func GetResourceCache(ctx context.Context) *cache

GetResourceCache returns the cache from the context. Result will return nil when none exists.

func GetResourceName added in v1.1.1

func GetResourceName(meta metav1.ObjectMeta) (name string)

GetResourceName attempts to get the best name for a resource

func WithResourceCache added in v1.3.0

func WithResourceCache(ctx context.Context) context.Context

WithResourceCache adds a resource cache to the context returned.

Types

type IngressResource

type IngressResource struct {
	IngressExt   extensionsv1beta1.Ingress
	IngressNet   networkingv1beta1.Ingress
	ResourceName string
	ResourceKind string
}

IngressResource contains the information needed for processing by a Policy

func GetIngressResource

func GetIngressResource(ctx context.Context, ar *admissionv1beta1.AdmissionRequest) *IngressResource

GetIngressResource extracts and IngressResource from an AdmissionRequest

type PersistentVolumeResource added in v1.5.0

type PersistentVolumeResource struct {
	PersistentVolume corev1.PersistentVolume
	ResourceName     string
	ResourceKind     string
}

PersistentVolumeResource contains the information needed for processing by a Policy

func GetPersistentVolumeResource added in v1.5.0

func GetPersistentVolumeResource(ctx context.Context, ar *admissionv1beta1.AdmissionRequest) *PersistentVolumeResource

GetPersistentVolumeResource extracts and PersistentVolumeResource from an AdmissionRequest

type PodExecResource added in v1.1.1

type PodExecResource struct {
	Command      string
	ResourceName string
	ResourceKind string
}

PodExecResource contains the information needed for processing by a Policy

func GetPodExecResource added in v1.1.1

func GetPodExecResource(ctx context.Context, ar *admissionv1beta1.AdmissionRequest) *PodExecResource

GetPodExecResource extracts and PodExecResource from an AdmissionRequest

type PodResource

type PodResource struct {
	PodSpec        corev1.PodSpec
	PodAnnotations map[string]string
	ResourceName   string
	ResourceKind   string
}

PodResource contains the information needed for processing by a Policy

func GetPodResource

GetPodResource extracts a PodResource from an AdmissionRequest

type ServiceResource added in v1.5.0

type ServiceResource struct {
	Service      corev1.Service
	ResourceName string
	ResourceKind string
}

ServiceResource contains the information needed for processing by a Policy

func GetServiceResource added in v1.5.0

func GetServiceResource(ctx context.Context, ar *admissionv1beta1.AdmissionRequest) *ServiceResource

GetServiceResource extracts and ServiceResource from an AdmissionRequest

Jump to

Keyboard shortcuts

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