mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 17:52:20 +08:00

* 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>
25 lines
619 B
Go
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
|
|
}
|