Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetKubeClient = func(configPath string) (kubernetes.Clientset, error) { var clientset *kubernetes.Clientset if configPath == "" { return *clientset, errors.New("config not passed and is not found in ~/.kube. ") } config, err := clientcmd.BuildConfigFromFlags("", configPath) if err != nil { return *clientset, pkgerrors.Wrap(err, "setConfig: Build config from flags raised an error") } clientset, err = kubernetes.NewForConfig(config) if err != nil { return *clientset, err } return *clientset, nil }
GetKubeClient loads the Kubernetes configuation values stored into the local configuration file
View Source
var LoadedPlugins = map[string]*plugin.Plugin{}
LoadedPlugins stores references to the stored plugins
Functions ¶
This section is empty.
Types ¶
type GenericKubeResourceData ¶
type GenericKubeResourceData struct {
YamlFilePath string
Namespace string
InternalVNFID string
// Add additional Kubernetes plugins below kinds
DeploymentData *appsV1.Deployment
ServiceData *coreV1.Service
}
GenericKubeResourceData is a struct which stores all supported Kubernetes plugin types
type KubeResourceClient ¶
type KubeResourceClient interface {
CreateResource(GenericKubeResourceData, *kubernetes.Clientset) (string, error)
ListResources(string, string) (*[]string, error)
DeleteResource(string, string, *kubernetes.Clientset) error
GetResource(string, string, *kubernetes.Clientset) (string, error)
}
KubeResourceClient has the signature methods to create Kubernetes reources
Click to show internal directories.
Click to hide internal directories.