diff --git a/pkg/router/ingress_test.go b/pkg/router/ingress_test.go index 803595be..f330777c 100644 --- a/pkg/router/ingress_test.go +++ b/pkg/router/ingress_test.go @@ -48,9 +48,6 @@ func TestIngressRouter_Reconcile(t *testing.T) { inCanary, err := router.kubeClient.NetworkingV1().Ingresses("default").Get(context.TODO(), canaryName, metav1.GetOptions{}) require.NoError(t, err) - annotation := inCanary.Annotations["kustomize.toolkit.fluxcd.io/checksum"] - assert.Equal(t, "", annotation) - // test initialisation assert.Equal(t, "true", inCanary.Annotations[canaryAn]) assert.Equal(t, "0", inCanary.Annotations[canaryWeightAn]) @@ -184,6 +181,5 @@ func TestIngressRouter_ABTest(t *testing.T) { // test initialisation assert.Equal(t, "true", inCanary.Annotations[canaryAn]) assert.Equal(t, "test", inCanary.Annotations[table.annotation]) - assert.Equal(t, "", inCanary.Annotations["kustomize.toolkit.fluxcd.io/checksum"]) } } diff --git a/pkg/router/util.go b/pkg/router/util.go index 5f389fb0..72e08806 100644 --- a/pkg/router/util.go +++ b/pkg/router/util.go @@ -28,16 +28,7 @@ func includeLabelsByPrefix(labels map[string]string, includeLabelPrefixes []stri } func filterMetadata(meta map[string]string) map[string]string { - res := make(map[string]string) - for k, v := range meta { - // remove Flux ownership - if strings.Contains(k, toolkitMarker) { - continue - } - res[k] = v - } - // prevent Flux from overriding Flagger managed objects - res[toolkitReconcileKey] = toolkitReconcileValue - return res + meta[toolkitReconcileKey] = toolkitReconcileValue + return meta }