Documentation ¶
Overview ¶
Package k8s enables Kubernetes as the orchestration provider that aligns to the interfaces suggested by maya api server's orchprovider package.
This file registers Kubernetes as an orchestration provider plugin in maya api server. This orchestration is for persistent volume provisioners which also are registered in maya api server.
Index ¶
- func NewK8sOrchestrator(label v1.NameLabel, name v1.OrchProviderRegistry) (orchprovider.OrchestratorInterface, error)
- func SetControllerClusterIPs(svc k8sApiV1.Service, annotations map[string]string)
- func SetControllerIPs(cp k8sApiV1.Pod, annotations map[string]string)
- func SetControllerStatuses(cp k8sApiV1.Pod, annotations map[string]string)
- func SetIQN(vsm string, annotations map[string]string)
- func SetISCSITargetPortals(svc k8sApiV1.Service, annotations map[string]string)
- func SetReplicaCount(rd k8sApisExtnsBeta1.Deployment, annotations map[string]string)
- func SetReplicaIPs(rp k8sApiV1.Pod, annotations map[string]string)
- func SetReplicaStatuses(rp k8sApiV1.Pod, annotations map[string]string)
- func SetReplicaVolSize(rd k8sApisExtnsBeta1.Deployment, annotations map[string]string)
- func SetServiceStatuses(svc k8sApiV1.Service, annotations map[string]string)
- type K8sClient
- type K8sUtilGetter
- type K8sUtilInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewK8sOrchestrator ¶
func NewK8sOrchestrator(label v1.NameLabel, name v1.OrchProviderRegistry) (orchprovider.OrchestratorInterface, error)
NewK8sOrchestrator provides a new instance of K8sOrchestrator.
func SetControllerClusterIPs ¶
func SetControllerStatuses ¶
func SetISCSITargetPortals ¶
func SetReplicaCount ¶
func SetReplicaCount(rd k8sApisExtnsBeta1.Deployment, annotations map[string]string)
func SetReplicaVolSize ¶
func SetReplicaVolSize(rd k8sApisExtnsBeta1.Deployment, annotations map[string]string)
TODO Get it from Pod
Types ¶
type K8sClient ¶
type K8sClient interface { // InCluster indicates whether the operation is within cluster or in a // different cluster InCluster() (bool, error) // NS provides the namespace where operations will be executed NS() (string, error) // TODO // Rename to PodOps // // Pods provides all the CRUD operations associated w.r.t a POD Pods() (k8sCoreV1.PodInterface, error) // TODO // Rename to ServiceOps // // Services provides all the CRUD operations associated w.r.t a Service Services() (k8sCoreV1.ServiceInterface, error) // DeploymentOps provides all the CRUD operations associated w.r.t a Deployment DeploymentOps() (k8sExtnsV1Beta1.DeploymentInterface, error) }
K8sClient is an abstraction to operate on various k8s entities.
NOTE:
This abstraction makes use of K8s's client-go package.
type K8sUtilGetter ¶
type K8sUtilGetter interface {
GetK8sUtil(volProfile.VolumeProvisionerProfile) K8sUtilInterface
}
K8sUtilGetter is an abstraction to fetch instances of K8sUtilInterface
type K8sUtilInterface ¶
type K8sUtilInterface interface { // Name of K8s utility Name() string // K8sClient fetches an instance of K8sClients. Will return // false if the util does not support providing K8sClients instance. K8sClient() (K8sClient, bool) }
K8sUtilInterface is an abstraction over communicating with K8s APIs
Click to show internal directories.
Click to hide internal directories.