serviceaccount

package
v0.0.0-...-75a2d0c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGVR

GetGVR returns service's GroupVersionResource which could be used for Clean function.

Types

type AdditionalOptions

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

AdditionalOptions additional options for ServiceAccount object.

type Builder

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

Builder provides struct for serviceaccount object containing connection to the cluster and the serviceaccount definitions.

func NewBuilder

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

NewBuilder creates a new instance of Builder.

func Pull

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

Pull loads an existing serviceaccount into Builder struct.

func (*Builder) Create

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

Create makes a serviceaccount in cluster and stores the created object in struct.

func (*Builder) Delete

func (builder *Builder) Delete() error

Delete removes a serviceaccount.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks whether the given serviceaccount exists.

func (*Builder) WithOptions

func (builder *Builder) WithOptions(options ...AdditionalOptions) *Builder

WithOptions creates serviceAccount with generic mutation options.

Jump to

Keyboard shortcuts

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