utils

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsBytes

func AsBytes(v map[string]any, format string) ([]byte, error)

func DecodePatch

func DecodePatch(buf []byte) (patch.Patch, error)

DecodePatch decodes the passed JSON document as an RFC 6902 patch.

func FromUnstructured

func FromUnstructured(unstructuredObj *unstructured.Unstructured, obj any) error

func ModuleNameFromValuesKey

func ModuleNameFromValuesKey(moduleValuesKey string) string

ModuleNameFromValuesKey returns kebab-cased name from camelCased (verySimpleModule become very-simple-module)

func ModuleNameToValuesKey

func ModuleNameToValuesKey(moduleName string) string

ModuleNameToValuesKey returns camelCased name from kebab-cased (very-simple-module become verySimpleModule)

func NewValuesFromBytes

func NewValuesFromBytes(data []byte) (map[string]any, error)

NewValuesFromBytes loads values sections from maps in yaml or json format

func ToUnstructured

func ToUnstructured(obj any) (*unstructured.Unstructured, error)

func YamlBytes

func YamlBytes(v map[string]any) ([]byte, error)

Types

type ValuesPatchOperation

type ValuesPatchOperation struct {
	Op    string          `json:"op,omitempty"`
	Path  string          `json:"path,omitempty"`
	Value json.RawMessage `json:"value,omitempty"`
}

func (*ValuesPatchOperation) ToJSONPatch

func (op *ValuesPatchOperation) ToJSONPatch() (patch.Patch, error)

ToJSONPatch returns a jsonpatch.Patch with one operation.

func (*ValuesPatchOperation) ToString

func (op *ValuesPatchOperation) ToString() string

type ValuesPatchType

type ValuesPatchType string
const (
	ConfigMapPatch    ValuesPatchType = "CONFIG_MAP_PATCH"
	MemoryValuesPatch ValuesPatchType = "MEMORY_VALUES_PATCH"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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