Documentation ¶
Index ¶
- func GetResourceCache(ctx context.Context) *cache
- func GetResourceName(meta metav1.ObjectMeta) (name string)
- func WithResourceCache(ctx context.Context) context.Context
- type ClusterRoleBindingResource
- type IngressResource
- type PersistentVolumeResource
- type PodDisruptionBudgetResource
- type PodExecResource
- type PodResource
- type RoleBindingResource
- type ServiceResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResourceCache ¶
GetResourceCache returns the cache from the context. Result will return nil when none exists.
func GetResourceName ¶
func GetResourceName(meta metav1.ObjectMeta) (name string)
GetResourceName attempts to get the best name for a resource
Types ¶
type ClusterRoleBindingResource ¶
type ClusterRoleBindingResource struct { ClusterRoleBinding rbacv1.ClusterRoleBinding ResourceName string ResourceKind string }
ClusterRoleBindingResource contains the information needed for processing by a Policy
func GetClusterRoleBindingResource ¶
func GetClusterRoleBindingResource(ctx context.Context, ar *admissionv1.AdmissionRequest) *ClusterRoleBindingResource
GetClusterRoleBindingResource extracts a ClusterRoleBindingResource from an AdmissionRequest
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 *admissionv1.AdmissionRequest) *IngressResource
GetIngressResource extracts and IngressResource from an AdmissionRequest
type PersistentVolumeResource ¶
type PersistentVolumeResource struct { PersistentVolume corev1.PersistentVolume ResourceName string ResourceKind string }
PersistentVolumeResource contains the information needed for processing by a Policy
func GetPersistentVolumeResource ¶
func GetPersistentVolumeResource(ctx context.Context, ar *admissionv1.AdmissionRequest) *PersistentVolumeResource
GetPersistentVolumeResource extracts and PersistentVolumeResource from an AdmissionRequest
type PodDisruptionBudgetResource ¶
type PodDisruptionBudgetResource struct { PodDisruptionBudget policyv1beta1.PodDisruptionBudget ResourceName string ResourceKind string }
PodDisruptionBudgetResource contains the information needed for processing by a Policy
func GetPodDisruptionBudgetResource ¶
func GetPodDisruptionBudgetResource(ctx context.Context, ar *admissionv1beta1.AdmissionRequest) *PodDisruptionBudgetResource
GetPodDisruptionBudgetResource extracts an PodDisruptionBudgetResource from an AdmissionRequest
type PodExecResource ¶
PodExecResource contains the information needed for processing by a Policy
func GetPodExecResource ¶
func GetPodExecResource(ctx context.Context, ar *admissionv1.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 ¶
func GetPodResource(ctx context.Context, ar *admissionv1.AdmissionRequest) *PodResource
GetPodResource extracts a PodResource from an AdmissionRequest
type RoleBindingResource ¶
type RoleBindingResource struct { RoleBinding rbacv1.RoleBinding ResourceName string ResourceKind string }
RoleBindingResource contains the information needed for processing by a Policy
func GetRoleBindingResource ¶
func GetRoleBindingResource(ctx context.Context, ar *admissionv1.AdmissionRequest) *RoleBindingResource
GetRoleBindingResource extracts a RoleBindingResource from an AdmissionRequest
type ServiceResource ¶
ServiceResource contains the information needed for processing by a Policy
func GetServiceResource ¶
func GetServiceResource(ctx context.Context, ar *admissionv1.AdmissionRequest) *ServiceResource
GetServiceResource extracts and ServiceResource from an AdmissionRequest