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 23, 2023
1 parent b782f2e commit 1b04465
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 1b04465

Please sign in to comment.