psp

package
v0.42.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 14 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

CreateServiceAccountForCRD creates service account for CRD if needed

Types

type CRDObject

type CRDObject interface {
	AnnotationsFiltered() map[string]string
	AllLabels() map[string]string
	PrefixedName() string
	GetServiceAccountName() string
	IsOwnsServiceAccount() bool
	GetPSPName() string
	GetNSName() string
	AsOwner() []metav1.OwnerReference
	AsCRDOwner() []metav1.OwnerReference
}

Jump to

Keyboard shortcuts

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