zfssa-5-canary: replace the dependabot branch with one that compiles and works

This commit is contained in:
Paul Monday
2021-09-10 10:33:04 -06:00
parent 8cf929d6b6
commit f865daa43f
13 changed files with 1494 additions and 63 deletions

View File

@@ -8,6 +8,7 @@ package service
import (
"errors"
"fmt"
"context"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
@@ -39,13 +40,16 @@ func InitClusterInterface() error {
// Returns the node name based on the passed in node ID.
//
func GetNodeName(nodeID string) (string, error) {
nodeInfo, err := clientset.CoreV1().Nodes().Get(nodeID, metav1.GetOptions{
TypeMeta: metav1.TypeMeta{
Kind: "",
APIVersion: "",
},
ResourceVersion: "1",
})
nodeInfo, err := clientset.CoreV1().Nodes().Get(
context.TODO(), nodeID,
metav1.GetOptions{
TypeMeta:
metav1.TypeMeta{
Kind: "",
APIVersion: "",
},
ResourceVersion: "1",
})
if err != nil {
return "", err
@@ -57,14 +61,16 @@ func GetNodeName(nodeID string) (string, error) {
// Returns the list of nodes in the form of a slice containing their name.
//
func GetNodeList() ([]string, error) {
nodeList, err := clientset.CoreV1().Nodes().List(metav1.ListOptions{
TypeMeta: metav1.TypeMeta{
Kind: "",
APIVersion: "",
},
ResourceVersion: "1",
})
nodeList, err := clientset.CoreV1().Nodes().List(
context.TODO(),
metav1.ListOptions{
TypeMeta:
metav1.TypeMeta{
Kind: "",
APIVersion: "",
},
ResourceVersion: "1",
})
if err != nil {
return nil, err

View File

@@ -168,6 +168,11 @@ func validateCreateVolumeReq(ctx context.Context, token *zfssarest.Token, req *c
return err
}
func (zd *ZFSSADriver) ControllerGetVolume(ctx context.Context, request *csi.ControllerGetVolumeRequest) (
*csi.ControllerGetVolumeResponse, error) {
return nil, status.Error(codes.Unimplemented, "ControllerGetVolume is not implemented")
}
func (zd *ZFSSADriver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (
*csi.DeleteVolumeResponse, error) {