Skip to content

Commit c82dafe

Browse files
author
Anton Ouzounov
committed
fix(config.go): fix buffer path name check
- fix buffer path name logic mistake Signed-off-by: Anton Ouzounov <[email protected]>
1 parent 4d3a77a commit c82dafe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

config-reloader/config/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (cfg *Config) Validate() error {
119119
return fmt.Errorf("invalid annotation name: '%s'", cfg.AnnotConfigmapName)
120120
}
121121

122-
if cfg.BufferMountFolder != "" && cfg.hasValidBufferMountFolder() {
122+
if cfg.BufferMountFolder != "" && !cfg.hasValidBufferMountFolder() {
123123
return fmt.Errorf("invalid fluentd buffer mount folder: '%s%s'", "/var/log/", cfg.BufferMountFolder)
124124
}
125125

@@ -288,9 +288,9 @@ func (cfg *Config) ParseFluentdLogLevel() (string, error) {
288288
func (cfg *Config) hasValidBufferMountFolder() bool {
289289
for _, r := range cfg.BufferMountFolder {
290290
if !unicode.IsLetter(r) && !unicode.IsDigit(r) && r != '-' && r != '_' {
291-
continue
292-
} else {
293291
return false
292+
} else {
293+
continue
294294
}
295295
}
296296
return true

0 commit comments

Comments
 (0)