Skip to content

Commit

Permalink
Fixes Secondary ConnectCA update
Browse files Browse the repository at this point in the history
This fixes a bug that was identified which resulted in subsequent
ConnectCA configuration update not to persist in the cluster.
  • Loading branch information
Ranjandas committed Jun 15, 2023
1 parent 37bd0e1 commit e43894c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion agent/consul/leader_connect_ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,9 @@ func shouldPersistNewRootAndConfig(newActiveRoot *structs.CARoot, oldConfig, new
if newConfig == nil {
return false
}
return newConfig.Provider == oldConfig.Provider && reflect.DeepEqual(newConfig.Config, oldConfig.Config)

// Need not persist when the provider, old and new config is the same
return !(newConfig.Provider == oldConfig.Provider && reflect.DeepEqual(newConfig.Config, oldConfig.Config))
}

func (c *CAManager) UpdateConfiguration(args *structs.CARequest) (reterr error) {
Expand Down

0 comments on commit e43894c

Please sign in to comment.