metadata

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	AnnotationTrue  = "true"
	AnnotationFalse = "false"

	AnnotationPrefix = "pulumi.com/"

	AnnotationAutonamed      = AnnotationPrefix + "autonamed"
	AnnotationSkipAwait      = AnnotationPrefix + "skipAwait"
	AnnotationTimeoutSeconds = AnnotationPrefix + "timeoutSeconds"
)

Variables

This section is empty.

Functions

func AdoptOldNameIfUnnamed

func AdoptOldNameIfUnnamed(newObj, oldObj *unstructured.Unstructured)

AdoptOldNameIfUnnamed checks if `newObj` has a name, and if not, "adopts" the name of `oldObj` instead. If `oldObj` was autonamed, then we mark `newObj` as autonamed, too.

func AssignNameIfAutonamable

func AssignNameIfAutonamable(obj *unstructured.Unstructured, base tokens.QName)

AssignNameIfAutonamable generates a name for an object. Uses DNS-1123-compliant characters. All auto-named resources get the annotation `pulumi.com/autonamed` for tooling purposes.

func GetAnnotationValue added in v0.20.4

func GetAnnotationValue(obj *unstructured.Unstructured, key string) string

GetAnnotationValue returns the value of the specified annotation on the provided Unstructured object.

func IsAnnotationTrue

func IsAnnotationTrue(obj *unstructured.Unstructured, key string) bool

IsAnnotationTrue returns true if the specified annotation has the value "true", false otherwise.

func IsAutonamed

func IsAutonamed(obj *unstructured.Unstructured) bool

func IsInternalAnnotation

func IsInternalAnnotation(key string) bool

IsInternalAnnotation returns true if the specified annotation has the `pulumi.com/` prefix, false otherwise.

func SetAnnotation

func SetAnnotation(obj *unstructured.Unstructured, key, value string)

SetAnnotation sets the specified key, value annotation on the provided Unstructured object.

func SetAnnotationTrue

func SetAnnotationTrue(obj *unstructured.Unstructured, key string)

SetAnnotationTrue sets the specified annotation key to "true" on the provided Unstructured object.

func SetLabel

func SetLabel(obj *unstructured.Unstructured, key, value string)

SetLabel sets the specified key/value pair as a label on the provided Unstructured object.

func SetManagedByLabel

func SetManagedByLabel(obj *unstructured.Unstructured)

SetManagedByLabel sets the `app.kubernetes.io/managed-by` label to `pulumi`.

func SkipAwaitLogic

func SkipAwaitLogic(obj *unstructured.Unstructured) bool

SkipAwaitLogic returns true if the `pulumi.com/skipAwait` annotation is "true", false otherwise.

func TimeoutSeconds added in v0.20.4

func TimeoutSeconds(obj *unstructured.Unstructured, defaultSeconds int) int

TimeoutSeconds returns the int value of the `pulumi.com/timeoutSeconds` annotation, or the defaultSeconds value if the annotation is unset/invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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