Documentation
¶
Index ¶
- Constants
- func AdoptOldNameIfUnnamed(newObj, oldObj *unstructured.Unstructured)
- func AssignNameIfAutonamable(obj *unstructured.Unstructured, base tokens.QName)
- func GetAnnotationValue(obj *unstructured.Unstructured, key string) string
- 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 SetLabel(obj *unstructured.Unstructured, key, value string)
- func SetManagedByLabel(obj *unstructured.Unstructured)
- func SkipAwaitLogic(obj *unstructured.Unstructured) bool
- func TimeoutSeconds(obj *unstructured.Unstructured, defaultSeconds int) int
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 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 ¶
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.