Documentation ¶
Index ¶
- Constants
- func AdoptOldAutonameIfUnnamed(newObj, oldObj *unstructured.Unstructured)
- func AssignNameIfAutonamable(obj *unstructured.Unstructured, base tokens.QName)
- func GetAnnotationValue(obj *unstructured.Unstructured, key string) string
- func GetLabel(obj *unstructured.Unstructured, key string) interface{}
- func HasManagedByLabel(obj *unstructured.Unstructured) bool
- func IsAnnotationTrue(obj *unstructured.Unstructured, key string) bool
- func IsAutonamed(obj *unstructured.Unstructured) bool
- func IsInternalAnnotation(key string) bool
- func SetAnnotation(obj *unstructured.Unstructured, key, value string)
- func SetAnnotationTrue(obj *unstructured.Unstructured, key string)
- func SkipAwaitLogic(obj *unstructured.Unstructured) bool
- func TimeoutSeconds(obj *unstructured.Unstructured, defaultSeconds int) int
- func TrySetLabel(obj *unstructured.Unstructured, key, value string) (succeeded bool, err error)
- func TrySetManagedByLabel(obj *unstructured.Unstructured) (bool, error)
Constants ¶
const ( AnnotationTrue = "true" AnnotationFalse = "false" AnnotationPrefix = "pulumi.com/" AnnotationAutonamed = AnnotationPrefix + "autonamed" AnnotationSkipAwait = AnnotationPrefix + "skipAwait" AnnotationTimeoutSeconds = AnnotationPrefix + "timeoutSeconds" )
Variables ¶
This section is empty.
Functions ¶
func AdoptOldAutonameIfUnnamed ¶ added in v0.25.1
func AdoptOldAutonameIfUnnamed(newObj, oldObj *unstructured.Unstructured)
AdoptOldAutonameIfUnnamed 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 GetLabel ¶ added in v0.25.2
func GetLabel(obj *unstructured.Unstructured, key string) interface{}
GetLabel gets the value of the specified label from the given object.
func HasManagedByLabel ¶ added in v0.25.2
func HasManagedByLabel(obj *unstructured.Unstructured) bool
HasManagedByLabel returns true if the object has the `app.kubernetes.io/managed-by` label set to `pulumi`, or is a computed value.
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 ¶
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 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.
func TrySetLabel ¶ added in v0.25.3
func TrySetLabel(obj *unstructured.Unstructured, key, value string) (succeeded bool, err error)
TrySetLabel attempts to set the specified key/value pair as a label on the provided Unstructured object, reporting whether the write was successful, and an error if (e.g.) the underlying object is mistyped. In particular, TrySetLabel will fail if the underlying object has a Pulumi computed value.
func TrySetManagedByLabel ¶ added in v0.25.3
func TrySetManagedByLabel(obj *unstructured.Unstructured) (bool, error)
TrySetManagedByLabel attempts to set the `app.kubernetes.io/managed-by` label to the `pulumi` key on the provided Unstructured object, reporting whether the write was successful, and an error if (e.g.) the underlying object is mistyped. In particular, TrySetLabel will fail if the underlying object has a Pulumi computed value.
Types ¶
This section is empty.