mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
Remove Flux deprecated marker
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -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"])
|
||||
}
|
||||
}
|
||||
|
||||
+2
-11
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user