Skip to content

Commit

Permalink
fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
CrocBomber committed Jun 5, 2023
1 parent 2268828 commit 0fc44de
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions deploy/kubernetes/overlays/stable/k_bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ spec:
key: access_key
name: aws-secret
optional: true
image: dhub.c2.croc.ru/kaas/aws-ebs-csi-driver:v1.1.1-CROC4
image: registry.cloud.croc.ru/kaas/aws-ebs-csi-driver:v1.1.1-CROC4
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
Expand Down Expand Up @@ -410,7 +410,7 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
image: dhub.c2.croc.ru/kaas/csi-provisioner:v2.1.1
image: registry.cloud.croc.ru/kaas/csi-provisioner:v2.1.1
name: csi-provisioner
volumeMounts:
- mountPath: /var/lib/csi/sockets/pluginproxy/
Expand All @@ -422,7 +422,7 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
image: dhub.c2.croc.ru/kaas/csi-attacher:v3.1.0
image: registry.cloud.croc.ru/kaas/csi-attacher:v3.1.0
name: csi-attacher
volumeMounts:
- mountPath: /var/lib/csi/sockets/pluginproxy/
Expand All @@ -433,7 +433,7 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
image: dhub.c2.croc.ru/kaas/csi-snapshotter:v3.0.3
image: registry.cloud.croc.ru/kaas/csi-snapshotter:v3.0.3
name: csi-snapshotter
volumeMounts:
- mountPath: /var/lib/csi/sockets/pluginproxy/
Expand All @@ -444,15 +444,15 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
image: dhub.c2.croc.ru/kaas/csi-resizer:v1.0.0
image: registry.cloud.croc.ru/kaas/csi-resizer:v1.0.0
imagePullPolicy: Always
name: csi-resizer
volumeMounts:
- mountPath: /var/lib/csi/sockets/pluginproxy/
name: socket-dir
- args:
- --csi-address=/csi/csi.sock
image: dhub.c2.croc.ru/kaas/livenessprobe:v2.2.0
image: registry.cloud.croc.ru/kaas/livenessprobe:v2.2.0
name: liveness-probe
volumeMounts:
- mountPath: /csi
Expand Down Expand Up @@ -527,7 +527,7 @@ spec:
fieldPath: spec.nodeName
- name: AWS_REGION
value: croc
image: dhub.c2.croc.ru/kaas/aws-ebs-csi-driver:v1.1.1-CROC4
image: registry.cloud.croc.ru/kaas/aws-ebs-csi-driver:v1.1.1-CROC4
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -560,7 +560,7 @@ spec:
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/ebs.csi.aws.com/csi.sock
image: dhub.c2.croc.ru/kaas/csi-node-driver-registrar:v2.1.0
image: registry.cloud.croc.ru/kaas/csi-node-driver-registrar:v2.1.0
name: node-driver-registrar
volumeMounts:
- mountPath: /csi
Expand All @@ -569,7 +569,7 @@ spec:
name: registration-dir
- args:
- --csi-address=/csi/csi.sock
image: dhub.c2.croc.ru/kaas/livenessprobe:v2.2.0
image: registry.cloud.croc.ru/kaas/livenessprobe:v2.2.0
name: liveness-probe
volumeMounts:
- mountPath: /csi
Expand Down
6 changes: 3 additions & 3 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
```sh
# uname -r
5.6.13-100.fc30.x86_64
# cat /etc/os-release
# cat /etc/os-release
NAME=Fedora
VERSION="30 (Thirty)"
ID=fedora
Expand Down Expand Up @@ -48,6 +48,6 @@ kustomize build ./deployment/kubernetes/stable/ > ./deployment/kubernetes/stable
- находясь в руте репы выполнить:
```docker build -t aws-ebs-csi-driver```
- после успешной сборки протегировать имадж:
```docker tag aws-ebs-csi-driver dhub.c2.croc.ru/kaas/aws-ebs-csi-driver:<version>```
```docker tag aws-ebs-csi-driver registry.cloud.croc.ru/kaas/aws-ebs-csi-driver:<version>```
- запушить имадж в регистри (необходимы врайт права в регистри неймспейсе):
```docker push dhub.c2.croc.ru/kaas/aws-ebs-csi-driver:<version>```
```docker push registry.cloud.croc.ru/kaas/aws-ebs-csi-driver:<version>```
13 changes: 6 additions & 7 deletions pkg/cloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ func NewCloud(region string, awsSdkDebugLog bool, userAgentExtra string) (Cloud,
return newEC2Cloud(region, awsSdkDebugLog, userAgentExtra)
}


func newEC2Cloud(region string, awsSdkDebugLog bool, userAgentExtra string) (Cloud, error) {

var awsConfig *aws.Config
Expand Down Expand Up @@ -1422,7 +1421,7 @@ func (c *cloud) ResizeDisk(ctx context.Context, volumeID string, newSizeBytes in
return c.checkDesiredSize(ctx, volumeID, newSizeGiB)
}

// ResizeDiskC2 resizes an EBS volume in C2 cloud.
// ResizeDiskC2 resizes an EBS volume in C2 cloud.
// It returns the volume size after this call or an error if the size couldn't be determined.
//
// ResizeDiskC2 is an adaptation of ResizeDisk function for C2 cloud. Differences:
Expand All @@ -1443,7 +1442,7 @@ func (c *cloud) ResizeDiskC2(ctx context.Context, volumeID string, newSizeBytes
newSizeGiB := util.RoundUpGiB(newSizeBytes)
oldSizeGiB := aws.Int64Value(volume.Size)

// According to CSI spec: if a volume corresponding to the specified volume ID is already larger than
// According to CSI spec: if a volume corresponding to the specified volume ID is already larger than
// or equal to the target capacity, the plugin should reply without errors.
if oldSizeGiB >= newSizeGiB {
klog.V(5).Infof("[Debug] Volume %q current size (%d GiB) is greater or equal to the new size (%d GiB)", volumeID, oldSizeGiB, newSizeGiB)
Expand All @@ -1452,7 +1451,7 @@ func (c *cloud) ResizeDiskC2(ctx context.Context, volumeID string, newSizeBytes
newSizeGiB = oldSizeGiB
klog.V(4).Infof("Requested size value changed to current size value (%d GiB)", newSizeGiB)
}

modifyVolumeReq := &ec2.ModifyVolumeInput{
VolumeId: aws.String(volumeID),
Size: aws.Int64(newSizeGiB),
Expand All @@ -1470,14 +1469,14 @@ func (c *cloud) ResizeDiskC2(ctx context.Context, volumeID string, newSizeBytes
Steps: volumeModificationWaitSteps,
}

var actualSizeGiB int64
var actualSizeGiB int64
waitErr := wait.ExponentialBackoff(backoff, func() (bool, error) {

volume, err := c.getVolume(ctx, describeVolumesReq)
if err != nil {
return true, err
}

oldSizeGiB := aws.Int64Value(volume.Size)
if oldSizeGiB >= newSizeGiB {
actualSizeGiB = oldSizeGiB
Expand Down
1 change: 1 addition & 0 deletions pkg/cloud/cloud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,7 @@ func TestWaitForAttachmentState(t *testing.T) {
alreadyAssigned: false,
expectError: true,
},
// disabled, for Croc cloud purposes
// {
// name: "failure: unexpected device",
// volumeID: "vol-test-1234",
Expand Down
2 changes: 1 addition & 1 deletion pkg/resizefs/resizefs_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package resizefs

import (
"github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/mounter"
"github.com/c2devel/aws-ebs-csi-driver/pkg/mounter"
"k8s.io/klog/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/resizefs/resizefs_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package resizefs
import (
"errors"
"github.com/golang/mock/gomock"
"github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/mounter"
"github.com/c2devel/aws-ebs-csi-driver/pkg/mounter"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

const (
VolumeSnapshotClassKind = "VolumeSnapshotClass"
SnapshotAPIVersion = "snapshot.storage.k8s.io/v1beta1"
SnapshotAPIVersion = "snapshot.storage.k8s.io/v1"
)

type PVTestDriver interface {
Expand Down

0 comments on commit 0fc44de

Please sign in to comment.