internal

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFieldsInto

func ExtractFieldsInto(src, dst *unstructured.Unstructured, fieldManager string) error

ExtractFieldsInto copies the fields owned by fieldManager from the main resource (not a subresource) of src into dst.

func FormatExample

func FormatExample(text string) string

FormatExample prepares text to appear in the Examples section of a command's help text. For spacing, all tabs should be replaced with spaces

func MergeStringMaps

func MergeStringMaps(maps ...map[string]string) map[string]string

MergeStringMaps returns a new map that contains all the keys and values in maps. When two or more maps have the same key, the value from the rightmost map is used.

func RemoveEmptyField

func RemoveEmptyField(object *unstructured.Unstructured, fields ...string)

RemoveEmptyField removes a nested field from object when it is an empty map or slice or it is the zero value for its type.

func RemoveEmptySections

func RemoveEmptySections(object *unstructured.Unstructured, sections ...string)

RemoveEmptySections removes an empty nested field from object the same as RemoveEmptyField then removes all its empty parent fields.

Types

type Config

func (*Config) Namespace

func (cfg *Config) Namespace() (string, error)

type PatchConfig

type PatchConfig struct {
	FieldManager string
}

func (*PatchConfig) AddFlags

func (cfg *PatchConfig) AddFlags(flags *pflag.FlagSet)

func (PatchConfig) CreateOptions

func (cfg PatchConfig) CreateOptions(opts metav1.CreateOptions) metav1.CreateOptions

CreateOptions returns a copy of opts with fields set according to cfg.

func (PatchConfig) PatchOptions

func (cfg PatchConfig) PatchOptions(opts metav1.PatchOptions) metav1.PatchOptions

PatchOptions returns a copy of opts with fields set according to cfg.

Directories

Path Synopsis
apis
postgres-operator.crunchydata.com/v1beta1
Package v1beta1 contains API Schema definitions.
Package v1beta1 contains API Schema definitions.
testing
cmp

Jump to

Keyboard shortcuts

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