From dcc4a1914dbded0ea8c40e6988d4ef674c829ecb Mon Sep 17 00:00:00 2001 From: Kent Dong Date: Mon, 22 Jan 2024 20:21:35 +0800 Subject: [PATCH] fix: Not to consider disabled annotations as custom annotations (#286) --- .../sdk/service/kubernetes/KubernetesModelConverter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/sdk/src/main/java/com/alibaba/higress/sdk/service/kubernetes/KubernetesModelConverter.java b/backend/sdk/src/main/java/com/alibaba/higress/sdk/service/kubernetes/KubernetesModelConverter.java index 3cc2082b..473c5acb 100644 --- a/backend/sdk/src/main/java/com/alibaba/higress/sdk/service/kubernetes/KubernetesModelConverter.java +++ b/backend/sdk/src/main/java/com/alibaba/higress/sdk/service/kubernetes/KubernetesModelConverter.java @@ -1625,6 +1625,9 @@ private static void setFunctionalAnnotation(V1ObjectMeta metadata, String key, S } private static boolean isCustomAnnotation(String key) { + if (key.startsWith(KubernetesConstants.Annotation.DISABLED_KEY_EXTRA_PREFIX)) { + key = key.substring(KubernetesConstants.Annotation.DISABLED_KEY_EXTRA_PREFIX.length()); + } if (SUPPORTED_ANNOTATIONS.contains(key)) { return false; }