Documentation ¶
Index ¶
- func FetchControllerObj(kind, name, namespace string, clientset *kubernetes.Clientset) (runtime.Object, error)
- func FetchControllerPod(kind, name, namespace string, clientset *kubernetes.Clientset) (*metav1.ObjectMeta, *v1.PodSpec, error)
- func GetContainerSecurityContexts(podSpec *v1.PodSpec) []*v1.SecurityContext
- func GetPSPAnnotations(annotations map[string]string) map[string]string
- func IsPSPMutating(pspObj *v1beta1.PodSecurityPolicy) (mutating bool, fields, annotations []string)
- func IsPodBeingMutatedByPSP(pod *v1.Pod, clientset *kubernetes.Clientset) (mutating bool, diff []string, err error)
- func SuggestedPodSecurityStandard(pod *v1.Pod) (psaapi.Level, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchControllerObj ¶
func FetchControllerPod ¶
func FetchControllerPod(kind, name, namespace string, clientset *kubernetes.Clientset) (*metav1.ObjectMeta, *v1.PodSpec, error)
func GetContainerSecurityContexts ¶
func GetContainerSecurityContexts(podSpec *v1.PodSpec) []*v1.SecurityContext
func IsPSPMutating ¶
func IsPSPMutating(pspObj *v1beta1.PodSecurityPolicy) (mutating bool, fields, annotations []string)
IsPSPMutating checks wheter a PodSecurityPolicy is potentially mutating pods. It returns true if one of the fields or annotations used in the PodSecurityPolicy is suspected to be mutating pods. The field or annotations that are suspected to be mutating are returned as well.
func IsPodBeingMutatedByPSP ¶
func IsPodBeingMutatedByPSP(pod *v1.Pod, clientset *kubernetes.Clientset) (mutating bool, diff []string, err error)
IsPodBeingMutatedByPSP returns whether a pod is likely mutated by a PSP object. It also returns the difference of the securityContext attribute between the parent controller (e.g. Deployment) and the running pod.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.