Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSI v1 leftovers #71217

Merged
merged 3 commits into from
Nov 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/swagger-spec/storage.k8s.io_v1.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/swagger-spec/storage.k8s.io_v1beta1.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/api-reference/storage.k8s.io/v1/definitions.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/api-reference/storage.k8s.io/v1beta1/definitions.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/storage/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ type VolumeError struct {
Time metav1.Time

// String detailing the error encountered during Attach or Detach operation.
// This string maybe logged, so it should not contain sensitive
// This string may be logged, so it should not contain sensitive
// information.
// +optional
Message string
Expand Down
2 changes: 2 additions & 0 deletions pkg/registry/storage/volumeattachment/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ type StatusREST struct {
store *genericregistry.Store
}

var _ = rest.Patcher(&StatusREST{})

// New creates a new VolumeAttachment resource
func (r *StatusREST) New() runtime.Object {
return &storageapi.VolumeAttachment{}
Expand Down
11 changes: 10 additions & 1 deletion pkg/registry/storage/volumeattachment/strategy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,18 @@ func TestVolumeAttachmentStatusStrategy(t *testing.T) {
t.Errorf("unexpected objects differerence after modifying status: %v", diff.ObjectDiff(statusVolumeAttachment, expectedVolumeAttachment))
}

// modifying spec should be dropped
// spec and metadata modifications should be dropped
newVolumeAttachment := volumeAttachment.DeepCopy()
newVolumeAttachment.Spec.NodeName = "valid-node-2"
newVolumeAttachment.Labels = map[string]string{"foo": "bar"}
newVolumeAttachment.Annotations = map[string]string{"foo": "baz"}
newVolumeAttachment.OwnerReferences = []metav1.OwnerReference{
{
APIVersion: "v1",
Kind: "Pod",
Name: "Foo",
},
}

StatusStrategy.PrepareForUpdate(ctx, newVolumeAttachment, volumeAttachment)
if !apiequality.Semantic.DeepEqual(newVolumeAttachment, volumeAttachment) {
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/api/storage/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion staging/src/k8s.io/api/storage/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ type VolumeError struct {
Time metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"`

// String detailing the error encountered during Attach or Detach operation.
// This string maybe logged, so it should not contain sensitive
// This string may be logged, so it should not contain sensitive
// information.
// +optional
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion staging/src/k8s.io/api/storage/v1beta1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion staging/src/k8s.io/api/storage/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ type VolumeError struct {
Time metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"`

// String detailing the error encountered during Attach or Detach operation.
// This string maybe logged, so it should not contain sensitive
// This string may be logged, so it should not contain sensitive
// information.
// +optional
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.