优化结构

This commit is contained in:
Yvan
2026-08-25 00:20:29 +08:00
parent 969afee284
commit ee179d6b34
49 changed files with 289 additions and 591 deletions
@@ -8,6 +8,7 @@ import (
"strings"
"time"
"kra/internal/config"
"kra/internal/integration/runtimeconfig"
"gorm.io/gorm"
@@ -158,7 +159,7 @@ func maskIntegrationSecrets(kind, provider string, values map[string]any) {
for key, value := range values {
if secretFields[key] || likelyIntegrationSecret(key) {
if text, ok := value.(string); ok && text != "" {
values[key] = "******"
values[key] = config.MaskedSecret
}
continue
}
@@ -172,7 +173,7 @@ func mergeIntegrationSecrets(kind, provider string, values, old map[string]any)
secretFields := integrationSecretFields(kind, provider)
for key, value := range values {
if secretFields[key] || likelyIntegrationSecret(key) {
if text, ok := value.(string); ok && text == "******" {
if text, ok := value.(string); ok && text == config.MaskedSecret {
if prior, exists := old[key]; exists {
values[key] = prior
}