kubemanifest

package
v1.22.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 101

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapEtcHosts

func MapEtcHosts(pod *v1.Pod, container *v1.Container, readOnly bool)

MapEtcHosts maps the /etc/hosts file into the pod (useful for gossip DNS)

func MarkPodAsClusterCritical added in v1.15.1

func MarkPodAsClusterCritical(pod *v1.Pod)

MarkPodAsClusterCritical sets the pod priority to system-cluster-critical

func MarkPodAsCritical

func MarkPodAsCritical(pod *v1.Pod)

MarkPodAsCritical adds the required annotations for a pod to be considered critical

func MarkPodAsNodeCritical added in v1.15.1

func MarkPodAsNodeCritical(pod *v1.Pod)

MarkPodAsNodeCritical sets the pod priority to system-node-critical

Types

type ImageRemapFunction

type ImageRemapFunction func(image string) (string, error)

type Object added in v1.19.0

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

Object holds arbitrary untyped kubernetes objects; it is used when we don't have the type definitions for them

func NewObject added in v1.21.3

func NewObject(data map[string]interface{}) *Object

NewObject returns an Object wrapping the provided data

func (*Object) APIVersion added in v1.19.0

func (m *Object) APIVersion() string

APIVersion returns the apiVersion field of the object, or "" if it cannot be found or is invalid

func (*Object) IsEmptyObject added in v1.19.0

func (m *Object) IsEmptyObject() bool

IsEmptyObject checks if the object has no keys set (i.e. `== {}`)

func (*Object) Kind added in v1.19.0

func (m *Object) Kind() string

Kind returns the kind field of the object, or "" if it cannot be found or is invalid

func (*Object) RemapImages added in v1.19.0

func (m *Object) RemapImages(mapper ImageRemapFunction) error

func (*Object) Reparse added in v1.19.0

func (m *Object) Reparse(obj interface{}, fields ...string) error

Reparse parses a subfield from an object

func (*Object) Set added in v1.19.0

func (m *Object) Set(newValue interface{}, fieldPath ...string) error

Set mutates a subfield to the newValue

func (*Object) ToYAML added in v1.19.0

func (m *Object) ToYAML() ([]byte, error)

type ObjectList added in v1.19.0

type ObjectList []*Object

ObjectList describes a list of objects, allowing us to add bulk-methods

func LoadObjectsFrom added in v1.19.0

func LoadObjectsFrom(contents []byte) (ObjectList, error)

LoadObjectsFrom parses multiple objects from a yaml file

func (ObjectList) ToYAML added in v1.19.0

func (l ObjectList) ToYAML() ([]byte, error)

ToYAML serializes a list of objects back to bytes; it is the opposite of LoadObjectsFrom

type Visitor

type Visitor interface {
	VisitBool(path []string, v bool, mutator func(bool)) error
	VisitString(path []string, v string, mutator func(string)) error
	VisitFloat64(path []string, v float64, mutator func(float64)) error
}

Jump to

Keyboard shortcuts

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