K8s: Rename origin.key to origin.hash (#89337)

This commit is contained in:
Ryan McKinley
2024-06-18 22:27:16 +03:00
committed by GitHub
parent b0c043de5f
commit 9b7f9ae22e
13 changed files with 34 additions and 59 deletions
+5 -2
View File
@@ -143,8 +143,11 @@ func (c *K8sResourceClient) SanitizeJSON(v *unstructured.Unstructured) string {
deep := v.DeepCopy()
anno := deep.GetAnnotations()
if anno["grafana.app/originKey"] != "" {
anno["grafana.app/originKey"] = "${originKey}"
if anno["grafana.app/originPath"] != "" {
anno["grafana.app/originPath"] = "${originPath}"
}
if anno["grafana.app/originHash"] != "" {
anno["grafana.app/originHash"] = "${originHash}"
}
if anno["grafana.app/updatedTimestamp"] != "" {
anno["grafana.app/updatedTimestamp"] = "${updatedTimestamp}"
+1 -1
View File
@@ -360,7 +360,7 @@ func doPlaylistTests(t *testing.T, helper *apis.K8sTestHelper) *apis.K8sTestHelp
"kind": "Playlist",
"metadata": {
"annotations": {
"grafana.app/originKey": "${originKey}",
"grafana.app/originPath": "${originPath}",
"grafana.app/originName": "SQL",
"grafana.app/updatedTimestamp": "${updatedTimestamp}"
},