k8s

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCustomizedManifests

func BuildCustomizedManifests(filePath, fsPath string, resourceFS embed.FS, scheme *runtime.Scheme, templateData any) ([][]byte, error)

func BuildCustomizedObjects

func BuildCustomizedObjects(filePath, fsPath string, resourceFS embed.FS, scheme *runtime.Scheme, templateData any) ([]client.Object, error)

func ConvertRawResourcesToObjects

func ConvertRawResourcesToObjects(scheme *runtime.Scheme, rawResources [][]byte) ([]client.Object, error)

func ConvertYamlToObjects

func ConvertYamlToObjects(scheme *runtime.Scheme, objYamls []byte) ([]client.Object, error)

func ConvertYamlToObjectsWithOverride

func ConvertYamlToObjectsWithOverride(scheme *runtime.Scheme, originalFiles [][]byte, overrideYamls []byte) ([][]byte, []client.Object, error)

replace k8s objects in given YAML doc with override objects. returns built yaml file and objects

func EnsureNamespace

func EnsureNamespace(ctx context.Context, kubeClient client.Client, name string) error

func EnsureObject

func EnsureObject(ctx context.Context, kubeClient client.Client, obj client.Object, namespace string) error

func GetObjectIdentifier

func GetObjectIdentifier(n *kyaml.RNode) string

func GetScheme

func GetScheme() *runtime.Scheme

Types

type ConversionError

type ConversionError struct {
	// contains filtered or unexported fields
}

func (*ConversionError) Error

func (e *ConversionError) Error() string

Jump to

Keyboard shortcuts

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