apply

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package apply is a dynamic, client-side substitute for `kubectl apply` that tries to guess the right thing to do without any type-specific knowledge. Instead of generating a PATCH request, it does the patching locally and returns a full object with the ResourceVersion intact.

We can't use actual `kubectl apply` yet because it doesn't support strategic merge for CRDs, which would make it infeasible to include a PodTemplateSpec in a CRD (e.g. containers and volumes will merge incorrectly).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLastApplied

func GetLastApplied(obj *unstructured.Unstructured) (map[string]interface{}, error)

func Merge

func Merge(observed, lastApplied, desired map[string]interface{}) (map[string]interface{}, error)

Merge updates the given observed object to apply the desired changes. It returns an updated copy of the observed object if no error occurs.

func SetLastApplied

func SetLastApplied(obj *unstructured.Unstructured, lastApplied map[string]interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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