resources

package
v0.28.6 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// YAMLSeparator is a separator for multi-document YAML files.
	YAMLSeparator = "---"
)

Variables

Functions

func ClearCRDStatusModifier

func ClearCRDStatusModifier(o runtime.Object) (runtime.Object, error)

func ClusterScopeNamespaceFixModifier

func ClusterScopeNamespaceFixModifier(o runtime.Object) (runtime.Object, error)

func GetHash

func GetHash(o runtime.Object) string

func IsObjectBeingDeleted

func IsObjectBeingDeleted(object runtime.Object) (bool, error)

IsObjectBeingDeleted returns true, if the given object is being deleted with finalizers still existing on it (this is the only case when deleteion timestamp is non-zero)

func MutatingWebhookConfigurationModifier

func MutatingWebhookConfigurationModifier(o runtime.Object) (runtime.Object, error)

func ValidatingWebhookConfigurationModifier

func ValidatingWebhookConfigurationModifier(o runtime.Object) (runtime.Object, error)

Types

type GroupVersionKind

type GroupVersionKind struct {
	Group   string `json:"group,omitempty"`
	Version string `json:"version,omitempty"`
	Kind    string `json:"kind,omitempty"`
}

type K8SResourceOverlay

type K8SResourceOverlay struct {
	GVK       *GroupVersionKind         `json:"groupVersionKind,omitempty"`
	ObjectKey types.ObjectKey           `json:"objectKey,omitempty"`
	Patches   []K8SResourceOverlayPatch `json:"patches,omitempty"`
}

+kubebuilder:object:generate=true

func (*K8SResourceOverlay) DeepCopy

func (in *K8SResourceOverlay) DeepCopy() *K8SResourceOverlay

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8SResourceOverlay.

func (*K8SResourceOverlay) DeepCopyInto

func (in *K8SResourceOverlay) DeepCopyInto(out *K8SResourceOverlay)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type K8SResourceOverlayPatch

type K8SResourceOverlayPatch struct {
	Type       OverlayPatchType `json:"type,omitempty"`
	Path       *string          `json:"path,omitempty"`
	Value      *string          `json:"value,omitempty"`
	ParseValue bool             `json:"parseValue,omitempty"`
}

+kubebuilder:object:generate=true

func (*K8SResourceOverlayPatch) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8SResourceOverlayPatch.

func (*K8SResourceOverlayPatch) DeepCopyInto

func (in *K8SResourceOverlayPatch) DeepCopyInto(out *K8SResourceOverlayPatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObjectModifierFunc

type ObjectModifierFunc func(o runtime.Object) (runtime.Object, error)

func PatchYAMLModifier

func PatchYAMLModifier(overlay K8SResourceOverlay, parser *ObjectParser) (ObjectModifierFunc, error)

func WorkloadImagePullSecretsModifier

func WorkloadImagePullSecretsModifier(imagePullSecrets ...[]corev1.LocalObjectReference) ObjectModifierFunc

type ObjectModifierWithParentFunc

type ObjectModifierWithParentFunc func(o, p runtime.Object) (runtime.Object, error)

type ObjectParser

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

func NewObjectParser

func NewObjectParser(scheme *runtime.Scheme) *ObjectParser

func (*ObjectParser) ParseYAMLManifest

func (p *ObjectParser) ParseYAMLManifest(manifest string, modifiers ...YAMLModifierFuncs) ([]runtime.Object, error)

func (*ObjectParser) ParseYAMLToK8sObject

func (p *ObjectParser) ParseYAMLToK8sObject(yaml []byte, yamlModifiers ...YAMLModifierFuncs) (runtime.Object, error)

type Objects

type Objects []runtime.Object

func (Objects) ToMap

func (os Objects) ToMap() map[string]runtime.Object

ToMap returns a map of K8sObject hash to K8sObject.

type OverlayPatchType

type OverlayPatchType string

+kubebuilder:object:generate=true

const (
	ReplaceOverlayPatchType OverlayPatchType = "replace"
	DeleteOverlayPatchType  OverlayPatchType = "remove"
)

type YAMLModifierFuncs

type YAMLModifierFuncs func([]byte) []byte

func ReplaceAPIVersionYAMLModifier

func ReplaceAPIVersionYAMLModifier(from, to string) YAMLModifierFuncs

Jump to

Keyboard shortcuts

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