psp

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPSP

func BuildPSP(cr CRDObject) *v1beta1.PodSecurityPolicy

func CreateOrUpdateServiceAccountWithPSP

func CreateOrUpdateServiceAccountWithPSP(ctx context.Context, cr CRDObject, rclient client.Client) error

CreateOrUpdateServiceAccountWithPSP - creates psp for api object. ensure that ServiceAccount exists, PodSecurityPolicy exists, we only update it, if its our PSP. ClusterRole exists, ClusterRoleBinding exists.

func CreateServiceAccountForCRD

func CreateServiceAccountForCRD(ctx context.Context, cr CRDObject, rclient client.Client) error

func DeletePSPChain added in v0.9.0

func DeletePSPChain(ctx context.Context, rclient client.Client, crd CRDObject) error

DeletePSPChain - removes psp, cluster role and cluster role binding, on finalize request for given CRD

Types

type CRDObject

type CRDObject interface {
	AsOwner() []metav1.OwnerReference
	Annotations() map[string]string
	Labels() map[string]string
	PrefixedName() string
	GetServiceAccountName() string
	GetPSPName() string
	GetNSName() string
}

Jump to

Keyboard shortcuts

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