kubernetes

package
v2.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package kubernetes provides data types and custom marshalers for Kubernetes API objects.

Interaction with the Kubernetes API should be handled by the kubectl subpackage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructK8sComponentsCM added in v2.6.0

func ConstructK8sComponentsCM(components components.Components, clusterVersion string) (corev1.ConfigMap, error)

ConstructK8sComponentsCM creates a k8s-components config map for the given components.

func MarshalK8SResources

func MarshalK8SResources(resources any) ([]byte, error)

MarshalK8SResources marshals every field of a struct into a k8s resource YAML.

func MarshalK8SResourcesList

func MarshalK8SResourcesList(resources []runtime.Object) ([]byte, error)

MarshalK8SResourcesList marshals every element of a slice into a k8s resource YAML.

func UnmarshalK8SResources

func UnmarshalK8SResources(data []byte, into any) error

UnmarshalK8SResources takes YAML and converts it into a k8s resources struct.

Types

type ConfigMaps

type ConfigMaps []*corev1.ConfigMap

ConfigMaps represent a list of k8s ConfigMap.

func (ConfigMaps) Marshal

func (s ConfigMaps) Marshal() ([]byte, error)

Marshal marshals config maps into multiple YAML documents.

type Marshaler

type Marshaler interface {
	Marshal() ([]byte, error)
}

Marshaler is used by all k8s resources that can be marshaled to YAML.

type Secrets

type Secrets []*k8s.Secret

Secrets represent a list of k8s Secret.

func (Secrets) Marshal

func (s Secrets) Marshal() ([]byte, error)

Marshal marshals secrets into multiple YAML documents.

Directories

Path Synopsis
Package kubectl provides a kubectl-like interface for Kubernetes.
Package kubectl provides a kubectl-like interface for Kubernetes.

Jump to

Keyboard shortcuts

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