Skip to content

Commit

Permalink
Only validate spiffe id if in HA mode
Browse files Browse the repository at this point in the history
  • Loading branch information
plorenz committed Nov 1, 2024
1 parent cbb851b commit ffb4255
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,10 @@ func LoadConfig(path string) (*Config, error) {
panic("unable to determine trust domain from SPIFFE id: hostname was empty")
}

if err = ValidateSpiffeId(controllerConfig.Id, spiffeId); err != nil {
panic(err)
if controllerConfig.Raft != nil {
if err = ValidateSpiffeId(controllerConfig.Id, spiffeId); err != nil {
panic(err)
}
}

//only preserve trust domain
Expand Down

0 comments on commit ffb4255

Please sign in to comment.