func IsAnnotationTrue(obj *unstructured.Unstructured, key string) bool {
	annotations := obj.GetAnnotations()
	value := annotations[key]
	return value == AnnotationTrue
}
IsAnnotationTrue returns true if the specified annotation has the value "true", false otherwise.
package metadata
import (
	"strings"
	"github.com/pulumi/pulumi/sdk/v3/go/common/resource"
	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
const (
	AnnotationTrue  = "true"
	AnnotationFalse = "false"
	AnnotationPrefix = "pulumi.com/"
	AnnotationAutonamed         = AnnotationPrefix + "autonamed"
	AnnotationSkipAwait         = AnnotationPrefix + "skipAwait"
	AnnotationTimeoutSeconds    = AnnotationPrefix + "timeoutSeconds"
	AnnotationInitialAPIVersion = AnnotationPrefix + "initialApiVersion"
	AnnotationReplaceUnready    = AnnotationPrefix + "replaceUnready"
	AnnotationHelmHook = "helm.sh/hook"
)
var internalAnnotationPrefixes = []string{AnnotationAutonamed}
func IsInternalAnnotation(key string) bool {
	for _, annotationPrefix := range internalAnnotationPrefixes {
		if strings.HasPrefix(key, annotationPrefix) {
			return true
		}
	}
	return false
}
func IsHelmHookAnnotation(key string) bool {
	return strings.HasPrefix(key, AnnotationHelmHook)
}
func SetAnnotation(obj *unstructured.Unstructured, key, value string) {
	metadataRaw := obj.Object["metadata"]
	if isComputedValue(metadataRaw) {
		return
	}
	metadata := metadataRaw.(map[string]interface{})
	annotationsRaw, ok := metadata["annotations"]
	if isComputedValue(annotationsRaw) {
		return
	}
	var annotations map[string]interface{}
	if !ok {
		annotations = make(map[string]interface{})
	} else {
		annotations = annotationsRaw.(map[string]interface{})
	}
	annotations[key] = value
	metadata["annotations"] = annotations
}
func SetAnnotationTrue(obj *unstructured.Unstructured, key string) {
	SetAnnotation(obj, key, AnnotationTrue)
}