func NewAnnotationPatch()

in pkg/flink/resources.go [346:360]


func NewAnnotationPatch(key string, value string) (client.Patch, error) {
	annotationPatch := ObjectForPatch{
		Metadata: ObjectMetaForPatch{
			Annotations: map[string]interface{}{
				key: value,
			},
		},
	}
	patchBytes, err := json.Marshal(&annotationPatch)
	if err != nil {
		return nil, err
	}

	return client.RawPatch(types.MergePatchType, patchBytes), nil
}