Skip to content

Commit

Permalink
Removing dell csi dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jigisha620 committed Jul 27, 2022
1 parent 70236a9 commit 47fb5e7
Show file tree
Hide file tree
Showing 63 changed files with 6 additions and 6,785 deletions.
2 changes: 1 addition & 1 deletion charts/aws-ebs-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.9.0
name: aws-ebs-csi-driver
description: A Helm chart for AWS EBS CSI Driver
version: 2.8.34
version: 2.8.35
kubeVersion: ">=1.17.0-0"
# home: https://github.com/kubernetes-sigs/aws-ebs-csi-driver
# sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/aws-ebs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ image:
# repository: public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver
repository: public.ecr.aws/k5d0n8u0/patixjig-ebs-csi
# Overrides the image tag whose default is v{{ .Chart.AppVersion }}
tag: "c41f00a037a4bb2aff526d0bea88411d84b8183d-linux-amd64-amazon"
tag: "70236a9093d8d9bcbc21cf115dbcee84f6de9904-linux-amd64-amazon"
pullPolicy: IfNotPresent

# -- Custom labels to add into metadata
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
securityContext:
privileged: true
# image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver
image: public.ecr.aws/k5d0n8u0/patixjig-ebs-csi:c41f00a037a4bb2aff526d0bea88411d84b8183d-linux-amd64-amazon
image: public.ecr.aws/k5d0n8u0/patixjig-ebs-csi:70236a9093d8d9bcbc21cf115dbcee84f6de9904-linux-amd64-amazon
imagePullPolicy: IfNotPresent
args:
- node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bases:
images:
- name: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-ebs-csi-driver
# newName: public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver
newName: public.ecr.aws/k5d0n8u0/patixjig-ebs-csi:c41f00a037a4bb2aff526d0bea88411d84b8183d-linux-amd64-amazon
newName: public.ecr.aws/k5d0n8u0/patixjig-ebs-csi:70236a9093d8d9bcbc21cf115dbcee84f6de9904-linux-amd64-amazon
- name: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/csi-provisioner
newName: public.ecr.aws/eks-distro/kubernetes-csi/external-provisioner
newTag: v3.1.0-eks-1-20-15
Expand Down
7 changes: 0 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ require (
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.19.0
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.8.0
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b
google.golang.org/grpc v1.47.0
Expand All @@ -26,11 +25,6 @@ require (
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
)

require (
github.com/antonfisher/nested-logrus-formatter v1.0.3 // indirect
sigs.k8s.io/controller-runtime v0.6.0 // indirect
)

require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -39,7 +33,6 @@ require (
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cyphar/filepath-securejoin v0.2.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dell/csi-baremetal v1.0.0
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/elazarl/goproxy v0.0.0-20181111060418-2ce16c963a8a // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
Expand Down
372 changes: 0 additions & 372 deletions go.sum

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions pkg/driver/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ package driver
import (
"os"
"path/filepath"
"strings"

blk "github.com/dell/csi-baremetal/pkg/base/linuxutils/lsblk"
"github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/mounter"
"github.com/sirupsen/logrus"
mountutils "k8s.io/mount-utils"
)

Expand Down Expand Up @@ -76,7 +73,6 @@ func newNodeMounter() (Mounter, error) {
type DeviceIdentifier interface {
Lstat(name string) (os.FileInfo, error)
EvalSymlinks(path string) (string, error)
FindSnowVolume() (string, []blk.BlockDevice, error)
}

type nodeDeviceIdentifier struct{}
Expand All @@ -92,21 +88,3 @@ func (i *nodeDeviceIdentifier) Lstat(name string) (os.FileInfo, error) {
func (i *nodeDeviceIdentifier) EvalSymlinks(path string) (string, error) {
return filepath.EvalSymlinks(path)
}

// func (i *nodeDeviceIdentifier) FindSnowVolume() (deviceName string, err error) {
func (i *nodeDeviceIdentifier) FindSnowVolume() (deviceName string, blockDevices []blk.BlockDevice, err error) {
block := blk.NewLSBLK(logrus.New())
blockDevices, err = block.GetBlockDevices("")
if err != nil {
// return "", fmt.Errorf("could not get block devices for snow: %v", err)
return "", blockDevices, err
}
for _, device := range blockDevices {
if (strings.HasPrefix(device.Name, "/dev/v")) && (len(device.MountPoint) == 0) {
deviceName = device.Name
} else {
deviceName = ""
}
}
return deviceName, blockDevices, err
}
9 changes: 1 addition & 8 deletions pkg/driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"
"os"
"path/filepath"
"strings"

csi "github.com/container-storage-interface/spec/lib/go/csi"
"github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud"
Expand Down Expand Up @@ -169,13 +168,7 @@ func (d *nodeService) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol
}
}

var source string
var err error
if d.metadata.GetRegion() == "snow" {
source = "/dev/vd" + strings.TrimPrefix(devicePath, "/dev/xvdb") + partition
} else {
source, err = d.findDevicePath(devicePath, volumeID, partition)
}
source, err := d.findDevicePath(devicePath, volumeID, partition)

if err != nil {
return nil, status.Errorf(codes.Internal, "Failed to find device path %s. %v", devicePath, err)
Expand Down
14 changes: 1 addition & 13 deletions pkg/driver/node_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,8 @@ func (d *nodeService) findDevicePath(devicePath, volumeID, partition string) (st
klog.V(5).Infof("[Debug] error searching for nvme path %q: %v", nvmeName, err)
}

klog.V(5).Infof("[Debug] Falling back to snow volume lookup for: %q", devicePath)

// snowDevicePath, err := d.deviceIdentifier.FindSnowVolume()
// if err == nil {
// klog.V(5).Infof("[Debug] successfully resolved devicePath=%q to %q", devicePath, snowDevicePath)
// canonicalDevicePath = snowDevicePath
// } else {
// klog.V(5).Infof("[Debug] error searching for snow path: %v", err)
// }
if d.metadata.GetRegion() == "snow" {
klog.V(5).Infof("[Debug] Falling back to snow volume lookup for: %q", devicePath)
canonicalDevicePath = "/dev/vd" + strings.TrimPrefix(devicePath, "/dev/xvdb")
}

Expand All @@ -123,10 +115,6 @@ func errNoDevicePathFound(devicePath, volumeID string) error {
return fmt.Errorf("no device path for device %q volume %q found", devicePath, volumeID)
}

//func errNoDevicePathFound(devicePath string, volumeID string, bdev []blk.BlockDevice) error {
// return fmt.Errorf("no device path for device %q volume %q found error %v", devicePath, volumeID, bdev)
//}

// findNvmeVolume looks for the nvme volume with the specified name
// It follows the symlink (if it exists) and returns the absolute path to the device
func findNvmeVolume(deviceIdentifier DeviceIdentifier, findName string) (device string, err error) {
Expand Down
15 changes: 0 additions & 15 deletions vendor/github.com/antonfisher/nested-logrus-formatter/.gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions vendor/github.com/antonfisher/nested-logrus-formatter/.travis.yml

This file was deleted.

21 changes: 0 additions & 21 deletions vendor/github.com/antonfisher/nested-logrus-formatter/LICENSE

This file was deleted.

15 changes: 0 additions & 15 deletions vendor/github.com/antonfisher/nested-logrus-formatter/Makefile

This file was deleted.

54 changes: 0 additions & 54 deletions vendor/github.com/antonfisher/nested-logrus-formatter/README.md

This file was deleted.

Loading

0 comments on commit 47fb5e7

Please sign in to comment.