refactoring to latest version
This commit is contained in:
parent
1270951aa6
commit
3c6be3bb28
8 changed files with 58 additions and 1756 deletions
|
@ -1,24 +0,0 @@
|
||||||
image:
|
|
||||||
name: yandex-cloud/k8s-csi-s3:test
|
|
||||||
entrypoint: [""]
|
|
||||||
|
|
||||||
variables:
|
|
||||||
DOCKER_HOST: tcp://docker:2375
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- test
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- make build
|
|
||||||
|
|
||||||
test:
|
|
||||||
stage: test
|
|
||||||
image: docker:stable
|
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
script:
|
|
||||||
- docker run --rm --privileged -v $(pwd):/app --device /dev/fuse yandex-cloud/k8s-csi-s3:test
|
|
|
@ -21,7 +21,8 @@ RUN apk upgrade
|
||||||
# required by: s3fs-fuse-1.91-r1[so:libcrypto.so.3]
|
# required by: s3fs-fuse-1.91-r1[so:libcrypto.so.3]
|
||||||
#RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing s3fs-fuse rclone
|
#RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing s3fs-fuse rclone
|
||||||
|
|
||||||
ADD https://github.com/yandex-cloud/geesefs/releases/latest/download/geesefs-linux-amd64 /usr/bin/geesefs
|
#ADD https://github.com/yandex-cloud/geesefs/releases/latest/download/geesefs-linux-amd64 /usr/bin/geesefs
|
||||||
|
ADD ./geesefs /usr/bin/geesefs
|
||||||
RUN chmod 755 /usr/bin/geesefs
|
RUN chmod 755 /usr/bin/geesefs
|
||||||
|
|
||||||
COPY --from=gobuild /build/s3driver /s3driver
|
COPY --from=gobuild /build/s3driver /s3driver
|
||||||
|
|
45
go.mod
45
go.mod
|
@ -1,29 +1,50 @@
|
||||||
module github.com/yandex-cloud/k8s-csi-s3
|
module github.com/yandex-cloud/k8s-csi-s3
|
||||||
|
|
||||||
go 1.15
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/container-storage-interface/spec v1.8.0
|
github.com/container-storage-interface/spec v1.8.0
|
||||||
github.com/coreos/go-systemd/v22 v22.5.0
|
github.com/coreos/go-systemd/v22 v22.5.0
|
||||||
github.com/godbus/dbus/v5 v5.1.0
|
github.com/godbus/dbus/v5 v5.1.0
|
||||||
github.com/golang/glog v1.1.1
|
github.com/golang/glog v1.1.1
|
||||||
github.com/klauspost/compress v1.16.3 // indirect
|
github.com/kubernetes-csi/csi-lib-utils v0.13.0
|
||||||
github.com/klauspost/cpuid v1.3.1 // indirect
|
|
||||||
github.com/kubernetes-csi/csi-lib-utils v0.13.0 // indirect
|
|
||||||
github.com/kubernetes-csi/csi-test v2.0.0+incompatible
|
github.com/kubernetes-csi/csi-test v2.0.0+incompatible
|
||||||
github.com/kubernetes-csi/drivers v1.0.2
|
|
||||||
github.com/minio/minio-go/v7 v7.0.50
|
github.com/minio/minio-go/v7 v7.0.50
|
||||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
|
||||||
github.com/mitchellh/go-ps v1.0.0
|
github.com/mitchellh/go-ps v1.0.0
|
||||||
github.com/onsi/ginkgo v1.16.4
|
github.com/onsi/ginkgo v1.16.4
|
||||||
github.com/onsi/gomega v1.23.0
|
github.com/onsi/gomega v1.23.0
|
||||||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
|
|
||||||
golang.org/x/crypto v0.7.0 // indirect
|
|
||||||
golang.org/x/net v0.8.0
|
golang.org/x/net v0.8.0
|
||||||
google.golang.org/genproto v0.0.0-20230330200707-38013875ee22 // indirect
|
|
||||||
google.golang.org/grpc v1.54.0
|
google.golang.org/grpc v1.54.0
|
||||||
k8s.io/apimachinery v0.26.3 // indirect
|
k8s.io/mount-utils v0.26.3
|
||||||
k8s.io/klog v1.0.0 // indirect
|
)
|
||||||
k8s.io/kubernetes v1.13.4
|
|
||||||
|
require (
|
||||||
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||||
|
github.com/fsnotify/fsnotify v1.4.9 // indirect
|
||||||
|
github.com/go-logr/logr v1.2.3 // indirect
|
||||||
|
github.com/golang/protobuf v1.5.3 // indirect
|
||||||
|
github.com/google/go-cmp v0.5.9 // indirect
|
||||||
|
github.com/google/uuid v1.3.0 // indirect
|
||||||
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
|
github.com/klauspost/compress v1.16.3 // indirect
|
||||||
|
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
|
||||||
|
github.com/minio/md5-simd v1.1.2 // indirect
|
||||||
|
github.com/minio/sha256-simd v1.0.0 // indirect
|
||||||
|
github.com/moby/sys/mountinfo v0.6.2 // indirect
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
|
github.com/nxadm/tail v1.4.8 // indirect
|
||||||
|
github.com/rs/xid v1.4.0 // indirect
|
||||||
|
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||||
|
golang.org/x/crypto v0.7.0 // indirect
|
||||||
|
golang.org/x/sys v0.6.0 // indirect
|
||||||
|
golang.org/x/text v0.8.0 // indirect
|
||||||
|
google.golang.org/genproto v0.0.0-20230330200707-38013875ee22 // indirect
|
||||||
|
google.golang.org/protobuf v1.30.0 // indirect
|
||||||
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
|
k8s.io/klog/v2 v2.80.1 // indirect
|
||||||
k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 // indirect
|
k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 // indirect
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,14 +23,12 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/yandex-cloud/k8s-csi-s3/pkg/mounter"
|
"github.com/yandex-cloud/k8s-csi-s3/pkg/mounter"
|
||||||
"github.com/yandex-cloud/k8s-csi-s3/pkg/s3"
|
"github.com/yandex-cloud/k8s-csi-s3/pkg/s3"
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
|
|
||||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,3 @@
|
||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package driver
|
package driver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -31,7 +31,7 @@ import (
|
||||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
"k8s.io/kubernetes/pkg/util/mount"
|
"k8s.io/mount-utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NodeServer struct {
|
type NodeServer struct {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
systemd "github.com/coreos/go-systemd/v22/dbus"
|
systemd "github.com/coreos/go-systemd/v22/dbus"
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"github.com/mitchellh/go-ps"
|
"github.com/mitchellh/go-ps"
|
||||||
"k8s.io/kubernetes/pkg/util/mount"
|
"k8s.io/mount-utils"
|
||||||
|
|
||||||
"github.com/yandex-cloud/k8s-csi-s3/pkg/s3"
|
"github.com/yandex-cloud/k8s-csi-s3/pkg/s3"
|
||||||
)
|
)
|
||||||
|
@ -120,11 +120,11 @@ func waitForMount(path string, timeout time.Duration) error {
|
||||||
var elapsed time.Duration
|
var elapsed time.Duration
|
||||||
var interval = 10 * time.Millisecond
|
var interval = 10 * time.Millisecond
|
||||||
for {
|
for {
|
||||||
notMount, err := mount.New("").IsNotMountPoint(path)
|
mount, err := mount.New("").IsMountPoint(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if !notMount {
|
if mount {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
time.Sleep(interval)
|
time.Sleep(interval)
|
||||||
|
|
Loading…
Add table
Reference in a new issue