Documentation ¶
Overview ¶
This file defines interfaces that determines an orchestrator w.r.t maya api server. All the features that maya api server wants from an orchestrator is defined in these set of interfaces.
This file provides orchestrator provider's registry related features.
NOTE:
This is the new file w.r.t the deprecated plugins.go file
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectOrchProviderFromEnv ¶
func DetectOrchProviderFromEnv() string
Detect the Container Orchestrator based on ENV variables
func HasOrchestrator ¶
func HasOrchestrator(name v1.OrchProviderRegistry) bool
HasOrchestrator returns true if name corresponds to an already registered orchestration provider.
func RegisterOrchestrator ¶
func RegisterOrchestrator(name v1.OrchProviderRegistry, oInstFactory OrchProviderFactory)
RegisterOrchestrator registers a orchestration provider by the provider's name. This registers the orchestrator provider name with the provider's instance creating function i.e. a Factory.
NOTE:
Each implementation of orchestrator plugin need to call
RegisterOrchestrator inside their init() function.
Types ¶
type OrchProviderFactory ¶
type OrchProviderFactory func(label v1.NameLabel, name v1.OrchProviderRegistry) (OrchestratorInterface, error)
type OrchestratorInterface ¶
type OrchestratorInterface interface { // Label assigned against the orchestration provider Label() string // Name of the orchestration provider Name() string // Region where this orchestration provider is running/deployed Region() string // StorageOps gets the instance that deals with storage related operations. // Will return false if not supported. // // NOTE: // This is invoked on a per request basis. In other words, every request will // invoke StorageOps to invoke storage specific operations thereafter. StorageOps() (StorageOps, bool) }
OrchestrationInterface is an interface abstraction of a real orchestrator. It represents an abstraction that maya api server expects from its orchestrator.
NOTE:
OrchestratorInterface should be the only interface that exposes orchestration
contracts.
func GetOrchestrator ¶
func GetOrchestrator(name v1.OrchProviderRegistry) (OrchestratorInterface, error)
GetOrchestrator creates a new instance of the named orchestration provider, or nil if the name is unknown.
type StorageOps ¶
type StorageOps interface { // AddStorage will add persistent volume running as containers // // TODO // Use VSM as the return type AddStorage(volProProfile volProfile.VolumeProvisionerProfile) (*v1.Volume, error) // DeleteStorage will remove the persistent volume // // TODO // Use VSM as the return type DeleteStorage(volProProfile volProfile.VolumeProvisionerProfile) (bool, error) // ReadStorage will fetch information about the persistent volume // // TODO // Use VSM as the return type ReadStorage(volProProfile volProfile.VolumeProvisionerProfile) (*v1.Volume, error) // ListStorage will list a collection of VSMs in a given context e.g. namespace // if working in a K8s setup, etc. ListStorage(volProProfile volProfile.VolumeProvisionerProfile) (*v1.VolumeList, error) }
StorageOps exposes various storage related operations that deals with storage placements, scheduling, etc. The low level work is in turn delegated to the respective orchestrator.
Directories ¶
Path | Synopsis |
---|---|
k8s
|
|
v1
Package k8s enables Kubernetes as the orchestration provider that aligns to the interfaces suggested by maya api server's orchprovider package.
|
Package k8s enables Kubernetes as the orchestration provider that aligns to the interfaces suggested by maya api server's orchprovider package. |
nomad
|
|
v1
This file transforms a Nomad scheduler as an orchestration platform for persistent volume placement.
|
This file transforms a Nomad scheduler as an orchestration platform for persistent volume placement. |