From 7de69b165a7f794e39dc13c073c3c9d75c816e22 Mon Sep 17 00:00:00 2001 From: Icarus9913 Date: Wed, 9 Aug 2023 20:53:46 +0800 Subject: [PATCH] optimize the autopool name length to 253 Signed-off-by: Icarus9913 --- pkg/applicationcontroller/applicationinformers/utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/applicationcontroller/applicationinformers/utils.go b/pkg/applicationcontroller/applicationinformers/utils.go index dba91479ff..530642bee0 100644 --- a/pkg/applicationcontroller/applicationinformers/utils.go +++ b/pkg/applicationcontroller/applicationinformers/utils.go @@ -22,6 +22,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" apitypes "k8s.io/apimachinery/pkg/types" + k8svalidation "k8s.io/apimachinery/pkg/util/validation" "k8s.io/client-go/dynamic" "k8s.io/utils/pointer" "k8s.io/utils/strings/slices" @@ -41,7 +42,7 @@ var errInvalidInput = func(str string) error { } const ( - maxNameLength = 63 + maxNameLength = k8svalidation.DNS1123SubdomainMaxLength randomLength = 5 )