chore: Tweak configuration validation and yaml output (#1302)

This commit is contained in:
TwiN
2025-09-30 13:38:17 -04:00
committed by GitHub
parent bd296c75da
commit 6f1312dfcf
2 changed files with 11 additions and 14 deletions

View File

@@ -575,11 +575,8 @@ func ValidateUniqueKeys(config *Config) error {
func ValidateSecurityConfig(config *Config) error {
if config.Security != nil {
if config.Security.ValidateAndSetDefaults() {
if !config.Security.ValidateAndSetDefaults() {
logr.Debug("[config.ValidateSecurityConfig] Basic security configuration has been validated")
} else {
// If there was an attempt to configure security, then it must mean that some confidential or private
// data are exposed. As a result, we'll force a panic because it's better to be safe than sorry.
return ErrInvalidSecurityConfig
}
}