scc

package
v0.0.0-...-05d41a9 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// SecurityContextConstraints definition. Used to create SecurityContextConstraints object
	Definition *securityV1.SecurityContextConstraints
	// Created SecurityContextConstraints object
	Object *securityV1.SecurityContextConstraints
	// contains filtered or unexported fields
}

Builder provides struct for SecurityContextConstraints object containing connection to the cluster SecurityContextConstraints definition.

func NewBuilder

func NewBuilder(apiClient *clients.Settings, name, runAsUser, selinuxContext string) *Builder

NewBuilder creates new instance of Builder.

func Pull

func Pull(apiClient *clients.Settings, name string) (*Builder, error)

Pull pulls existing SecurityContextConstraints from cluster.

func (*Builder) Create

func (builder *Builder) Create() (*Builder, error)

Create generates a SecurityContextConstraints and stores the created object in struct.

func (*Builder) Delete

func (builder *Builder) Delete() error

Delete removes a SecurityContextConstraints.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks whether the given SecurityContextConstraints exists.

func (*Builder) Get

Get returns NMState object if found.

func (*Builder) Update

func (builder *Builder) Update() (*Builder, error)

Update modifies an existing SecurityContextConstraints in the cluster.

func (*Builder) WithAllowCapabilities

func (builder *Builder) WithAllowCapabilities(allowCapabilities []corev1.Capability) *Builder

WithAllowCapabilities adds list of allow capabilities to SecurityContextConstraints.

func (*Builder) WithDefaultAddCapabilities

func (builder *Builder) WithDefaultAddCapabilities(defaultAddCapabilities []corev1.Capability) *Builder

WithDefaultAddCapabilities adds list of defaultAddCapabilities to SecurityContextConstraints.

func (*Builder) WithDropCapabilities

func (builder *Builder) WithDropCapabilities(requiredDropCapabilities []corev1.Capability) *Builder

WithDropCapabilities adds list of drop capabilities to SecurityContextConstraints.

func (*Builder) WithFSGroup

func (builder *Builder) WithFSGroup(fsGroup string) *Builder

WithFSGroup adds fsGroup to SecurityContextConstraints.

func (*Builder) WithFSGroupRange

func (builder *Builder) WithFSGroupRange(fsGroupMin, fsGroupMax int64) *Builder

WithFSGroupRange adds fsGroupRange to SecurityContextConstraints.

func (*Builder) WithGroups

func (builder *Builder) WithGroups(groups []string) *Builder

WithGroups adds groups to SecurityContextConstraints.

func (*Builder) WithHostDirVolumePlugin

func (builder *Builder) WithHostDirVolumePlugin(allowPlugin bool) *Builder

WithHostDirVolumePlugin adds bool flag to the allowHostDirVolumePlugin of SecurityContextConstraints.

func (*Builder) WithHostIPC

func (builder *Builder) WithHostIPC(allowHostIPC bool) *Builder

WithHostIPC adds bool flag to the allowHostIPC of SecurityContextConstraints.

func (*Builder) WithHostNetwork

func (builder *Builder) WithHostNetwork(allowHostNetwork bool) *Builder

WithHostNetwork adds bool flag to the allowHostNetwork of SecurityContextConstraints.

func (*Builder) WithHostPID

func (builder *Builder) WithHostPID(allowHostPID bool) *Builder

WithHostPID adds bool flag to the allowHostPID of SecurityContextConstraints.

func (*Builder) WithHostPorts

func (builder *Builder) WithHostPorts(allowHostPorts bool) *Builder

WithHostPorts adds bool flag to the allowHostPorts of SecurityContextConstraints.

func (*Builder) WithPriority

func (builder *Builder) WithPriority(priority *int32) *Builder

WithPriority adds priority to SecurityContextConstraints.

func (*Builder) WithPrivilegedContainer

func (builder *Builder) WithPrivilegedContainer(allowPrivileged bool) *Builder

WithPrivilegedContainer adds bool flag to the allowPrivilegedContainer of SecurityContextConstraints.

func (*Builder) WithPrivilegedEscalation

func (builder *Builder) WithPrivilegedEscalation(allowPrivilegedEscalation bool) *Builder

WithPrivilegedEscalation adds bool flag to the allowPrivilegeEscalation of SecurityContextConstraints.

func (*Builder) WithReadOnlyRootFilesystem

func (builder *Builder) WithReadOnlyRootFilesystem(readOnlyRootFilesystem bool) *Builder

WithReadOnlyRootFilesystem adds bool flag to the readOnlyRootFilesystem of SecurityContextConstraints.

func (*Builder) WithSeccompProfiles

func (builder *Builder) WithSeccompProfiles(seccompProfiles []string) *Builder

WithSeccompProfiles adds list of seccompProfiles to SecurityContextConstraints.

func (*Builder) WithSupplementalGroups

func (builder *Builder) WithSupplementalGroups(supplementalGroupsType string) *Builder

WithSupplementalGroups adds SupplementalGroups to SecurityContextConstraints.

func (*Builder) WithUsers

func (builder *Builder) WithUsers(users []string) *Builder

WithUsers adds users to SecurityContextConstraints.

func (*Builder) WithVolumes

func (builder *Builder) WithVolumes(volumes []securityV1.FSType) *Builder

WithVolumes adds list of volumes to SecurityContextConstraints.

type SecurityContextConstraintsAdditionalOptions

type SecurityContextConstraintsAdditionalOptions func(builder *Builder) (*Builder, error)

SecurityContextConstraintsAdditionalOptions additional options for SecurityContextConstraints object.

Jump to

Keyboard shortcuts

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