Files
grafana/pkg/registry/apis/secret/xkube/annotations.go
Matheus Macabu 4c59219adb SecretsManager: Add reststorage logic with validations (#102464)
* SecretsManager: rename keeper + securevalues rest file

* SecretsManager: add rest of xkube helper methods

* SecretsManager: add domain errors to contracts

* SecretsManager: copy over Keeper reststorage from feature branch

* SecretsManager: copy over SecureValue reststorage from feature branch

---------

Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>
Co-authored-by: Dana Axinte <53751979+dana-axinte@users.noreply.github.com>
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2025-03-19 16:31:10 +01:00

25 lines
619 B
Go

package xkube
import "github.com/grafana/grafana/pkg/apimachinery/utils"
var (
// Exclude these annotations
skipAnnotations = map[string]bool{
"kubectl.kubernetes.io/last-applied-configuration": true, // force server side apply
utils.AnnoKeyCreatedBy: true,
utils.AnnoKeyUpdatedBy: true,
utils.AnnoKeyUpdatedTimestamp: true,
}
)
func CleanAnnotations(anno map[string]string) map[string]string {
copy := make(map[string]string)
for k, v := range anno {
if skipAnnotations[k] {
continue
}
copy[k] = v
}
return copy
}