Skip to content

SizeLimit violates k8s API convention #50121

@kyessenov

Description

@kyessenov

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature

What happened:
kubernetes/community#306 added field SizeLimit in PR 85f030c. The field is marked as optional yet has the non-pointer type resource.Quantity. This is against the API convention that requires optional fields to be pointers.

As a consequence, k8s client-go library does not omit this field in serialization, breaking k8s 1.6 compatibility for this API.

What you expected to happen:
client-go 1.7 works with k8s 1.6 in pass-through object processing pipeline.

How to reproduce it (as minimally and precisely as possible):
See https://github.com/kubernetes/client-go/issues/257#issuecomment-319552550

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): 1.7
  • Cloud provider or hardware configuration**: GKE
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

cc @caesarxuchao

Metadata

Metadata

Assignees

Labels

kind/api-changeCategorizes issue or PR as related to adding, removing, or otherwise changing an APIkind/bugCategorizes issue or PR as related to a bug.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.sig/storageCategorizes an issue or PR as relevant to SIG Storage.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions