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

Proposal: API desired state / current state cleanup #1200

Closed
bgrant0607 opened this issue Sep 5, 2014 · 2 comments
Closed

Proposal: API desired state / current state cleanup #1200

bgrant0607 opened this issue Sep 5, 2014 · 2 comments
Labels
area/api Indicates an issue on api area. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/design Categorizes issue or PR as related to design.

Comments

@bgrant0607
Copy link
Member

Splitting off from #1178.

@smarterclayton For the API overhaul. @dchen1107 may also be interested.

Goals:

  • uniform structure across all API objects
  • clean separation of input and output values

Currently, our API objects contain:

  • (all, even lists which is questionable) JSONBase, which includes Kind, ID, CreationTimestamp, SelfLink, ResourceVersion, and APIVersion
  • (Pod, ReplicationController, Service) Labels
  • (Pod, ReplicationController) DesiredState
  • (Pod only) CurrentState

In JSONBase, only ID is explicitly provided by the client and only ResourceVersion is mutable.

In Pod, DesiredState and CurrentState use the same schema, mixing input and output fields (Manifest, RestartPolicy, Host, HostIP, PodIP, Info).

Service lacks DesiredState and CurrentState.

ReplicationController lacks CurrentState (though that may change with #736).

Proposals:

  1. Nest JSONBase in a named field, such as Metadata, to more coarsely bucket them within the objects.
  2. Move Labels to JSONBase, so that they're in the same position in every object, together with other generic object metadata.
  3. Add CurrentState to all objects that are lacking it.
  4. Use different representations for desired and current state in Pod, appropriately divide the fields between them, and merge ContainerManifest into the new PodDesiredState type.
@smarterclayton
Copy link
Contributor

PR examples incoming for discussion

@bgrant0607
Copy link
Member Author

I think this is pretty much covered by v1beta3 ( #1519 ),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Indicates an issue on api area. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/design Categorizes issue or PR as related to design.
Projects
None yet
Development

No branches or pull requests

2 participants