psp

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 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

Types

type CRDObject

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

Jump to

Keyboard shortcuts

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