configmap

package
v0.0.0-...-1fb7f3c Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: Apache-2.0 Imports: 10 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGVR

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

Types

type AdditionalOptions

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

AdditionalOptions additional options for configmap object.

type Builder

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

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

func List

func List(apiClient *clients.Settings, nsname string, options ...metav1.ListOptions) ([]*Builder, error)

List returns configmap inventory in the given namespace.

func ListInAllNamespaces

func ListInAllNamespaces(apiClient *clients.Settings, options ...metav1.ListOptions) ([]*Builder, error)

ListInAllNamespaces returns configmap inventory in the all the namespaces.

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 retrieves an existing configmap object from the cluster.

func (*Builder) Create

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

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

func (*Builder) Delete

func (builder *Builder) Delete() error

Delete removes a configmap.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks whether the given configmap exists.

func (*Builder) Update

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

Update renovates the existing configmap object with configmap definition in builder.

func (*Builder) WithData

func (builder *Builder) WithData(data map[string]string) *Builder

WithData defines the data placed in the configmap.

func (*Builder) WithOptions

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

WithOptions creates configmap with generic mutation options.

Jump to

Keyboard shortcuts

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