mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
docs: note why check.Expose is not part of chech.Hash
This commit is contained in:
@@ -290,7 +290,6 @@ func (sc *ServiceCheck) Hash(serviceID string) string {
|
||||
hashString(h, sc.Path)
|
||||
hashString(h, sc.Protocol)
|
||||
hashString(h, sc.PortLabel)
|
||||
hashBool(h, sc.Expose, "Expose")
|
||||
hashString(h, sc.Interval.String())
|
||||
hashString(h, sc.Timeout.String())
|
||||
hashString(h, sc.Method)
|
||||
@@ -310,6 +309,11 @@ func (sc *ServiceCheck) Hash(serviceID string) string {
|
||||
// use name "true" to maintain ID stability
|
||||
hashBool(h, sc.GRPCUseTLS, "true")
|
||||
|
||||
// Hash is used for diffing against the Consul check definition, which does
|
||||
// not have an expose parameter. Instead we rely on implied changes to
|
||||
// other fields if the Expose setting is changed in a nomad service.
|
||||
// hashBool(h, sc.Expose, "Expose")
|
||||
|
||||
// maintain use of hex (i.e. not b32) to maintain ID stability
|
||||
return fmt.Sprintf("%x", h.Sum(nil))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user