{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/comments/146379318","pull_request_review_id":71313071,"id":146379318,"diff_hunk":"@@ -0,0 +1,160 @@\n+package machines\n+\n+import (\n+\tcorev1 \"k8s.io/api/core/v1\"\n+\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n+\t\"k8s.io/kubernetes/pkg/api\"\n+)\n+\n+// Machine represents a single Node that should exist (whether it does or\n+// not yet). In this model, there is no grouping of nodes to scale with a\n+// numeric field. Each Machine exists independently, and grouping can only\n+// be inferred via label selectors.\n+//\n+// In order for a new Node to be created, one can generically create a new\n+// Machine object, possibly copying the spec from an existing Machine\n+// or a template. To scale down the cluster, delete specific instances of\n+// Machines and the underlying Nodes will be unregistered/deprovisioned.\n+// Separate provider-specific controllers will watch Machine objects they can\n+// act on (like a GCE cloud controller watching for only Machines destined for\n+// GCE) and take the appropriate actions.\n+//\n+// Any updates to the MachineSpec will be actuated to change the Node in\n+// place or replace the Node with one conforming to the spec. In this model,\n+// the fact that a controller is able to upgrade a node via in-place upgrades\n+// or via a cloud replacement is an implementation detail without API controls.\n+//\n+// It is recommended, but not required, that provider-specific controllers add\n+// finalizers to Machine objects so that they can be triggered on deletion to\n+// release the necessary external resources, reporting any errors encountered.\n+type Machine struct {\n+\tmetav1.TypeMeta\n+\tmetav1.ObjectMeta\n+\n+\tSpec   MachineSpec\n+\tStatus MachineStatus\n+}\n+\n+type MachineSpec struct {\n+\t// This ObjectMeta will autopopulate the Node created. Use this to\n+\t// indicate what labels, annotations, name prefix, etc., should be used\n+\t// when creating the Node.\n+\t// +optional\n+\tmetav1.ObjectMeta\n+\n+\t// Provider-specific serialized configuration to use during node\n+\t// creation. It is recommended that providers maintain their own\n+\t// versioned API types that should be serialized/deserialized from this\n+\t// field, akin to component config.\n+\t// +optional\n+\tProviderConfig string\n+\n+\t// A list consisting of \"Master\" and/or \"Node\".\n+\t//\n+\t//                 +-----------------------+------------------------+\n+\t//                 | Master present        | Master absent          |\n+\t// +---------------+-----------------------+------------------------|\n+\t// | Node present: | Install control plane | Join the cluster as    |\n+\t// |               | and be schedulable    | just a node            |\n+\t// |---------------+-----------------------+------------------------|\n+\t// | Node absent:  | Install control plane | Invalid configuration  |\n+\t// |               | and be unscheduleable |                        |\n+\t// +---------------+-----------------------+------------------------+\n+\tRoles []string\n+\n+\t// Versions of key software to use.\n+\t// +optional\n+\tVersions MachineVersionInfo\n+\n+\t// To populate in the associated Node for dynamic kubelet config. This\n+\t// field already exists in Node, so any updates to it in the Machine\n+\t// spec will be automatially copied to the linked NodeRef from the\n+\t// status. The rest of dynamic kubelet config support should then work\n+\t// as-is.\n+\t// +optional\n+\tConfigSource *corev1.NodeConfigSource\n+}\n+\n+type MachineStatus struct {\n+\t// If the corresponding Node exists, this will point to its object.\n+\t// +optional\n+\tNodeRef *api.ObjectReference\n+\n+\t// When was this status last observed\n+\t// +optional\n+\tLastUpdated metav1.Time\n+\n+\t// Indicates whether or not the Machine is fully reconciled. When a\n+\t// controller observes that the spec has changed and no longer matches\n+\t// reality, it should update Ready to false before reconciling the\n+\t// state, and then set back to true when the state matches the spec.\n+\tReady bool\n+\n+\t// If set, indicates that there is a problem reconciling state, and\n+\t// will be set to a token value suitable for machine interpretation.\n+\t// +optional\n+\tErrorReason *MachineStatusError\n+\n+\t// +optional\n+\t// If set, indicates that there is a problem reconciling state, and\n+\t// will be set to a human readable string to indicate the problem.\n+\tErrorMessage *string\n+}\n+\n+type MachineStatusError string\n+\n+const (\n+\t// Represents that the combination of configuration in the MachineSpec\n+\t// is not supported by this cluster. This is not a transient error, but\n+\t// indicates a state that must be fixed before progress can be made.\n+\t//\n+\t// Example: the ProviderConfig specifies an instance type that doesn't exist,\n+\tInvalidConfigurationMachineError MachineStatusError = \"InvalidConfiguration\"\n+\n+\t// This indicates that the MachineSpec has been updated in a way that\n+\t// is not supported for reconciliation on this cluster. The spec may be\n+\t// completely valid from a configuration standpoint, but the controller\n+\t// does not support changing the real world state to match the new\n+\t// spec.\n+\t//\n+\t// Example: the responsible controller is not capable of changing the\n+\t// container runtime from docker to rkt.\n+\tUnsupportedChangeMachineError MachineStatusError = \"UnsupportedChange\"\n+\n+\t// This generally refers to exceeding one's quota in a cloud provider,\n+\t// or running out of physical machines in an on-premise environment.\n+\tInsufficientResourcesMachineError MachineStatusError = \"InsufficientResources\"\n+\n+\t// There was an error while trying to create a Node to match this\n+\t// Machine. This may indicate a transient problem that will be fixed\n+\t// automatically with time, such as a service outage, or a terminal\n+\t// error during creation that doesn't match a more specific\n+\t// MachineStatusError value.\n+\t//\n+\t// Example: timeout trying to connect to GCE.\n+\tCreateMachineError MachineStatusError = \"CreateError\"\n+\n+\t// An error was encountered while trying to delete the Node that this\n+\t// Machine represents. This could be a transient or terminal error, but\n+\t// will only be observable if the provider's Machine controller has\n+\t// added a finalizer to the object to more gracefully handle deletions.\n+\t//\n+\t// Example: cannot resolve EC2 IP address.\n+\tDeleteMachineError MachineStatusError = \"DeleteError\"\n+)\n+\n+type MachineVersionInfo struct {\n+\t// Semantic version of kubelet to run\n+\tKubelet string\n+\n+\t// Name/version of container runtime\n+\tContainerRuntime ContainerRuntimeInfo\n+}\n+\n+type ContainerRuntimeInfo struct {\n+\t// docker, rkt, containerd, ...\n+\tName string\n+\n+\t// Semantic version of the container runtime to use\n+\tVersion string","path":"cluster-api/machines-api/types.go","position":159,"original_position":159,"commit_id":"03026680effd14433ae7ed6045cc820496392d7d","original_commit_id":"03026680effd14433ae7ed6045cc820496392d7d","user":{"login":"pipejakob","id":1605981,"avatar_url":"https://avatars2.githubusercontent.com/u/1605981?v=4","gravatar_id":"","url":"https://api.github.com/users/pipejakob","html_url":"https://github.com/pipejakob","followers_url":"https://api.github.com/users/pipejakob/followers","following_url":"https://api.github.com/users/pipejakob/following{/other_user}","gists_url":"https://api.github.com/users/pipejakob/gists{/gist_id}","starred_url":"https://api.github.com/users/pipejakob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipejakob/subscriptions","organizations_url":"https://api.github.com/users/pipejakob/orgs","repos_url":"https://api.github.com/users/pipejakob/repos","events_url":"https://api.github.com/users/pipejakob/events{/privacy}","received_events_url":"https://api.github.com/users/pipejakob/received_events","type":"User","site_admin":false},"body":"Ah, good point. I think it's a good idea to make these optional at cluster creation time, but do you think they should stay optional afterwards?","created_at":"2017-10-23T20:09:25Z","updated_at":"2017-10-23T20:09:25Z","html_url":"https://github.com/kubernetes/kube-deploy/pull/298#discussion_r146379318","pull_request_url":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/298","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/comments/146379318"},"html":{"href":"https://github.com/kubernetes/kube-deploy/pull/298#discussion_r146379318"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/298"}},"in_reply_to_id":146096637},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/298","id":147480905,"html_url":"https://github.com/kubernetes/kube-deploy/pull/298","diff_url":"https://github.com/kubernetes/kube-deploy/pull/298.diff","patch_url":"https://github.com/kubernetes/kube-deploy/pull/298.patch","issue_url":"https://api.github.com/repos/kubernetes/kube-deploy/issues/298","number":298,"state":"open","locked":false,"title":"Minimalistic Machines API proposal.","user":{"login":"pipejakob","id":1605981,"avatar_url":"https://avatars2.githubusercontent.com/u/1605981?v=4","gravatar_id":"","url":"https://api.github.com/users/pipejakob","html_url":"https://github.com/pipejakob","followers_url":"https://api.github.com/users/pipejakob/followers","following_url":"https://api.github.com/users/pipejakob/following{/other_user}","gists_url":"https://api.github.com/users/pipejakob/gists{/gist_id}","starred_url":"https://api.github.com/users/pipejakob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipejakob/subscriptions","organizations_url":"https://api.github.com/users/pipejakob/orgs","repos_url":"https://api.github.com/users/pipejakob/repos","events_url":"https://api.github.com/users/pipejakob/events{/privacy}","received_events_url":"https://api.github.com/users/pipejakob/received_events","type":"User","site_admin":false},"body":"This is a proposal to add a new API for managing Nodes in a declarative way: Machines.\r\n\r\nIt is part of the overall Cluster API effort.","created_at":"2017-10-19T07:06:32Z","updated_at":"2017-10-23T20:09:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"174e7da60f3d29e64c6c347644898c80968d3726","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/298/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/298/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kube-deploy/issues/298/comments","statuses_url":"https://api.github.com/repos/kubernetes/kube-deploy/statuses/03026680effd14433ae7ed6045cc820496392d7d","head":{"label":"pipejakob:machines_proposal","ref":"machines_proposal","sha":"03026680effd14433ae7ed6045cc820496392d7d","user":{"login":"pipejakob","id":1605981,"avatar_url":"https://avatars2.githubusercontent.com/u/1605981?v=4","gravatar_id":"","url":"https://api.github.com/users/pipejakob","html_url":"https://github.com/pipejakob","followers_url":"https://api.github.com/users/pipejakob/followers","following_url":"https://api.github.com/users/pipejakob/following{/other_user}","gists_url":"https://api.github.com/users/pipejakob/gists{/gist_id}","starred_url":"https://api.github.com/users/pipejakob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipejakob/subscriptions","organizations_url":"https://api.github.com/users/pipejakob/orgs","repos_url":"https://api.github.com/users/pipejakob/repos","events_url":"https://api.github.com/users/pipejakob/events{/privacy}","received_events_url":"https://api.github.com/users/pipejakob/received_events","type":"User","site_admin":false},"repo":{"id":107507933,"name":"kube-deploy","full_name":"pipejakob/kube-deploy","owner":{"login":"pipejakob","id":1605981,"avatar_url":"https://avatars2.githubusercontent.com/u/1605981?v=4","gravatar_id":"","url":"https://api.github.com/users/pipejakob","html_url":"https://github.com/pipejakob","followers_url":"https://api.github.com/users/pipejakob/followers","following_url":"https://api.github.com/users/pipejakob/following{/other_user}","gists_url":"https://api.github.com/users/pipejakob/gists{/gist_id}","starred_url":"https://api.github.com/users/pipejakob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipejakob/subscriptions","organizations_url":"https://api.github.com/users/pipejakob/orgs","repos_url":"https://api.github.com/users/pipejakob/repos","events_url":"https://api.github.com/users/pipejakob/events{/privacy}","received_events_url":"https://api.github.com/users/pipejakob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pipejakob/kube-deploy","description":"A place for cluster deployment automation","fork":true,"url":"https://api.github.com/repos/pipejakob/kube-deploy","forks_url":"https://api.github.com/repos/pipejakob/kube-deploy/forks","keys_url":"https://api.github.com/repos/pipejakob/kube-deploy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pipejakob/kube-deploy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pipejakob/kube-deploy/teams","hooks_url":"https://api.github.com/repos/pipejakob/kube-deploy/hooks","issue_events_url":"https://api.github.com/repos/pipejakob/kube-deploy/issues/events{/number}","events_url":"https://api.github.com/repos/pipejakob/kube-deploy/events","assignees_url":"https://api.github.com/repos/pipejakob/kube-deploy/assignees{/user}","branches_url":"https://api.github.com/repos/pipejakob/kube-deploy/branches{/branch}","tags_url":"https://api.github.com/repos/pipejakob/kube-deploy/tags","blobs_url":"https://api.github.com/repos/pipejakob/kube-deploy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pipejakob/kube-deploy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pipejakob/kube-deploy/git/refs{/sha}","trees_url":"https://api.github.com/repos/pipejakob/kube-deploy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pipejakob/kube-deploy/statuses/{sha}","languages_url":"https://api.github.com/repos/pipejakob/kube-deploy/languages","stargazers_url":"https://api.github.com/repos/pipejakob/kube-deploy/stargazers","contributors_url":"https://api.github.com/repos/pipejakob/kube-deploy/contributors","subscribers_url":"https://api.github.com/repos/pipejakob/kube-deploy/subscribers","subscription_url":"https://api.github.com/repos/pipejakob/kube-deploy/subscription","commits_url":"https://api.github.com/repos/pipejakob/kube-deploy/commits{/sha}","git_commits_url":"https://api.github.com/repos/pipejakob/kube-deploy/git/commits{/sha}","comments_url":"https://api.github.com/repos/pipejakob/kube-deploy/comments{/number}","issue_comment_url":"https://api.github.com/repos/pipejakob/kube-deploy/issues/comments{/number}","contents_url":"https://api.github.com/repos/pipejakob/kube-deploy/contents/{+path}","compare_url":"https://api.github.com/repos/pipejakob/kube-deploy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pipejakob/kube-deploy/merges","archive_url":"https://api.github.com/repos/pipejakob/kube-deploy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pipejakob/kube-deploy/downloads","issues_url":"https://api.github.com/repos/pipejakob/kube-deploy/issues{/number}","pulls_url":"https://api.github.com/repos/pipejakob/kube-deploy/pulls{/number}","milestones_url":"https://api.github.com/repos/pipejakob/kube-deploy/milestones{/number}","notifications_url":"https://api.github.com/repos/pipejakob/kube-deploy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pipejakob/kube-deploy/labels{/name}","releases_url":"https://api.github.com/repos/pipejakob/kube-deploy/releases{/id}","deployments_url":"https://api.github.com/repos/pipejakob/kube-deploy/deployments","created_at":"2017-10-19T06:40:44Z","updated_at":"2017-10-19T06:40:46Z","pushed_at":"2017-10-23T19:04:42Z","git_url":"git://github.com/pipejakob/kube-deploy.git","ssh_url":"git@github.com:pipejakob/kube-deploy.git","clone_url":"https://github.com/pipejakob/kube-deploy.git","svn_url":"https://github.com/pipejakob/kube-deploy","homepage":null,"size":42168,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"82a3c5d740dfb9e8b413ea53c6f45ec20b344c35","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":54912542,"name":"kube-deploy","full_name":"kubernetes/kube-deploy","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kube-deploy","description":"A place for cluster deployment automation","fork":false,"url":"https://api.github.com/repos/kubernetes/kube-deploy","forks_url":"https://api.github.com/repos/kubernetes/kube-deploy/forks","keys_url":"https://api.github.com/repos/kubernetes/kube-deploy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kube-deploy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kube-deploy/teams","hooks_url":"https://api.github.com/repos/kubernetes/kube-deploy/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kube-deploy/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kube-deploy/events","assignees_url":"https://api.github.com/repos/kubernetes/kube-deploy/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kube-deploy/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kube-deploy/tags","blobs_url":"https://api.github.com/repos/kubernetes/kube-deploy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kube-deploy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kube-deploy/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kube-deploy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kube-deploy/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kube-deploy/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kube-deploy/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kube-deploy/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kube-deploy/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kube-deploy/subscription","commits_url":"https://api.github.com/repos/kubernetes/kube-deploy/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kube-deploy/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kube-deploy/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kube-deploy/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kube-deploy/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kube-deploy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kube-deploy/merges","archive_url":"https://api.github.com/repos/kubernetes/kube-deploy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kube-deploy/downloads","issues_url":"https://api.github.com/repos/kubernetes/kube-deploy/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kube-deploy/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kube-deploy/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kube-deploy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kube-deploy/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kube-deploy/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kube-deploy/deployments","created_at":"2016-03-28T18:05:52Z","updated_at":"2017-10-18T21:14:22Z","pushed_at":"2017-10-23T04:49:35Z","git_url":"git://github.com/kubernetes/kube-deploy.git","ssh_url":"git@github.com:kubernetes/kube-deploy.git","clone_url":"https://github.com/kubernetes/kube-deploy.git","svn_url":"https://github.com/kubernetes/kube-deploy","homepage":null,"size":42270,"stargazers_count":326,"watchers_count":326,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":145,"mirror_url":null,"archived":false,"open_issues_count":83,"forks":145,"open_issues":83,"watchers":326,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/298"},"html":{"href":"https://github.com/kubernetes/kube-deploy/pull/298"},"issue":{"href":"https://api.github.com/repos/kubernetes/kube-deploy/issues/298"},"comments":{"href":"https://api.github.com/repos/kubernetes/kube-deploy/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/298/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kube-deploy/pulls/298/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kube-deploy/statuses/03026680effd14433ae7ed6045cc820496392d7d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"pipejakob"}}