Skip to content

Commit d890ddf

Browse files
xing-yanglpabon
authored andcommitted
Update dependency to point to kubernetes-1.12.0
This PR updates dependency to point to kubernetes-1.12.0 and external-storage v5.2.0 and external-snapshotter v0.4.1.
1 parent 7e7d6bf commit d890ddf

File tree

384 files changed

+16525
-6227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

384 files changed

+16525
-6227
lines changed

Gopkg.lock

Lines changed: 97 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,29 @@
3333
name = "github.com/golang/glog"
3434

3535
[[constraint]]
36-
branch = "master"
3736
name = "github.com/kubernetes-csi/external-snapshotter"
37+
version = "v0.4.1"
3838

3939
[[constraint]]
4040
name = "github.com/kubernetes-incubator/external-storage"
41-
version = "kubernetes-1.12.0-beta.1"
41+
version = "v5.2.0"
4242

4343
[[constraint]]
4444
name = "google.golang.org/grpc"
4545
version = "1.9.2"
4646

4747
[[constraint]]
4848
name = "k8s.io/apimachinery"
49-
version = "kubernetes-1.12.0-beta.1"
49+
version = "kubernetes-1.12.0"
5050

5151
[[constraint]]
5252
name = "k8s.io/client-go"
53-
version = "kubernetes-1.12.0-beta.1"
53+
version = "kubernetes-1.12.0"
5454

5555
[[constraint]]
5656
name = "k8s.io/api"
57-
version = "kubernetes-1.12.0-beta.1"
57+
version = "kubernetes-1.12.0"
5858

5959
[[constraint]]
6060
name = "k8s.io/csi-api"
61-
version = "kubernetes-1.12.0-beta.1"
61+
version = "kubernetes-1.12.0"

pkg/controller/controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ func (p *csiProvisioner) Provision(options controller.VolumeOptions) (*v1.Persis
347347
if options.PVC.Spec.DataSource.Kind != snapshotKind {
348348
return nil, fmt.Errorf("the PVC source is not the right type. Expected %s, Got %s", snapshotKind, options.PVC.Spec.DataSource.Kind)
349349
}
350-
if options.PVC.Spec.DataSource.APIGroup != snapshotAPIGroup {
351-
return nil, fmt.Errorf("the PVC source does not belong to the right APIGroup. Expected %s, Got %s", snapshotAPIGroup, options.PVC.Spec.DataSource.APIGroup)
350+
if *(options.PVC.Spec.DataSource.APIGroup) != snapshotAPIGroup {
351+
return nil, fmt.Errorf("the PVC source does not belong to the right APIGroup. Expected %s, Got %s", snapshotAPIGroup, *(options.PVC.Spec.DataSource.APIGroup))
352352
}
353353
needSnapshotSupport = true
354354
}

pkg/controller/controller_test.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ func newSnapshot(name, className, boundToContent, snapshotUID, claimName string,
11801180
}
11811181

11821182
// newContent returns a new content with given attributes
1183-
func newContent(name, className, snapshotHandle, volumeUID, volumeName, boundToSnapshotUID, boundToSnapshotName string, size *resource.Quantity, creationTime *int64) *crdv1.VolumeSnapshotContent {
1183+
func newContent(name, className, snapshotHandle, volumeUID, volumeName, boundToSnapshotUID, boundToSnapshotName string, size *int64, creationTime *int64) *crdv1.VolumeSnapshotContent {
11841184
content := crdv1.VolumeSnapshotContent{
11851185
ObjectMeta: metav1.ObjectMeta{
11861186
Name: name,
@@ -1219,6 +1219,8 @@ func newContent(name, className, snapshotHandle, volumeUID, volumeName, boundToS
12191219

12201220
// TestProvisionFromSnapshot tests create volume from snapshot
12211221
func TestProvisionFromSnapshot(t *testing.T) {
1222+
var apiGrp string = "snapshot.storage.k8s.io"
1223+
var unsupportedAPIGrp string = "unsupported.group.io"
12221224
var requestedBytes int64 = 1000
12231225
var snapName string = "test-snapshot"
12241226
var snapClassName string = "test-snapclass"
@@ -1262,7 +1264,7 @@ func TestProvisionFromSnapshot(t *testing.T) {
12621264
DataSource: &v1.TypedLocalObjectReference{
12631265
Name: snapName,
12641266
Kind: "VolumeSnapshot",
1265-
APIGroup: "snapshot.storage.k8s.io",
1267+
APIGroup: &apiGrp,
12661268
},
12671269
},
12681270
},
@@ -1304,7 +1306,7 @@ func TestProvisionFromSnapshot(t *testing.T) {
13041306
DataSource: &v1.TypedLocalObjectReference{
13051307
Name: snapName,
13061308
Kind: "VolumeSnapshot",
1307-
APIGroup: "snapshot.storage.k8s.io",
1309+
APIGroup: &apiGrp,
13081310
},
13091311
},
13101312
},
@@ -1332,7 +1334,7 @@ func TestProvisionFromSnapshot(t *testing.T) {
13321334
DataSource: &v1.TypedLocalObjectReference{
13331335
Name: "",
13341336
Kind: "VolumeSnapshot",
1335-
APIGroup: "snapshot.storage.k8s.io",
1337+
APIGroup: &apiGrp,
13361338
},
13371339
},
13381340
},
@@ -1359,7 +1361,7 @@ func TestProvisionFromSnapshot(t *testing.T) {
13591361
DataSource: &v1.TypedLocalObjectReference{
13601362
Name: "",
13611363
Kind: "UnsupportedKind",
1362-
APIGroup: "snapshot.storage.k8s.io",
1364+
APIGroup: &apiGrp,
13631365
},
13641366
},
13651367
},
@@ -1386,7 +1388,7 @@ func TestProvisionFromSnapshot(t *testing.T) {
13861388
DataSource: &v1.TypedLocalObjectReference{
13871389
Name: snapName,
13881390
Kind: "VolumeSnapshot",
1389-
APIGroup: "unsupported.group.io",
1391+
APIGroup: &unsupportedAPIGrp,
13901392
},
13911393
},
13921394
},
@@ -1413,7 +1415,7 @@ func TestProvisionFromSnapshot(t *testing.T) {
14131415
DataSource: &v1.TypedLocalObjectReference{
14141416
Name: snapName,
14151417
Kind: "VolumeSnapshot",
1416-
APIGroup: "snapshot.storage.k8s.io",
1418+
APIGroup: &apiGrp,
14171419
},
14181420
},
14191421
},
@@ -1442,7 +1444,7 @@ func TestProvisionFromSnapshot(t *testing.T) {
14421444
})
14431445

14441446
client.AddReactor("get", "volumesnapshotcontents", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
1445-
content := newContent("snapcontent-snapuid", snapClassName, "sid", "pv-uid", "volume", "snapuid", snapName, resource.NewQuantity(requestedBytes, resource.BinarySI), &timeNow)
1447+
content := newContent("snapcontent-snapuid", snapClassName, "sid", "pv-uid", "volume", "snapuid", snapName, &requestedBytes, &timeNow)
14461448
return true, content, nil
14471449
})
14481450

vendor/github.com/kubernetes-csi/external-snapshotter/.travis.yml

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)