-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate autopilot implementation to raft-autopilot
Nomad's original autopilot was importing from a private package in Consul. It has been moved out to a shared library. Switch Nomad to use this library so that we can eliminate the import of Consul, which is necessary to build Nomad ENT with the current version of the Consul SDK. This also will let us pick up autopilot improvements shared with Consul more easily.
- Loading branch information
Showing
17 changed files
with
447 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:improvement | ||
autopilot: upgrade to raft-autopilot library | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//go:build !ent | ||
// +build !ent | ||
|
||
package nomad | ||
|
||
import ( | ||
autopilot "github.com/hashicorp/raft-autopilot" | ||
|
||
"github.com/hashicorp/nomad/nomad/structs" | ||
) | ||
|
||
func (s *Server) autopilotPromoter() autopilot.Promoter { | ||
return autopilot.DefaultPromoter() | ||
} | ||
|
||
// autopilotServerExt returns the autopilot-enterprise.Server extensions needed | ||
// for ENT feature support, but this is the empty OSS implementation. | ||
func (s *Server) autopilotServerExt(_ *serverParts) interface{} { | ||
return nil | ||
} | ||
|
||
// autopilotConfigExt returns the autopilot-enterprise.Config extensions needed | ||
// for ENT feature support, but this is the empty OSS implementation. | ||
func autopilotConfigExt(_ *structs.AutopilotConfig) interface{} { | ||
return nil | ||
} |
Oops, something went wrong.