{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/flannel/pulls/comments/111837452","pull_request_review_id":33107419,"id":111837452,"diff_hunk":"@@ -231,7 +233,31 @@ func (ksm *kubeSubnetManager) AcquireLease(ctx context.Context, network string,\n \t\tn.Annotations[backendDataAnnotation] = string(bd)\n \t\tn.Annotations[backendPublicIPAnnotation] = attrs.PublicIP.String()\n \t\tn.Annotations[subnetKubeManagedAnnotation] = \"true\"\n-\t\tn, err = ksm.client.Core().Nodes().Update(n)\n+\n+\t\tvar oldNode, newNode v1.Node\n+\t\tif err := api.Scheme.Convert(cacheNode, &oldNode, nil); err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\t\tif err := api.Scheme.Convert(n, &newNode, nil); err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\n+\t\toldData, err := json.Marshal(oldNode)\n+\t\tif err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\n+\t\tnewData, err := json.Marshal(newNode)\n+\t\tif err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\n+\t\tpatchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, v1.Node{})\n+\t\tif err != nil {\n+\t\t\treturn nil, fmt.Errorf(\"failed to create patch for node %q: %v\", ksm.nodeName, err)\n+\t\t}\n+\n+\t\t_, err = ksm.client.Core().Nodes().Patch(ksm.nodeName, api.StrategicMergePatchType, patchBytes, \"status\")","path":"subnet/kube/kube.go","position":44,"original_position":44,"commit_id":"bc1fcc608e55be0fc2aecc3997996b2457c68a58","original_commit_id":"bc1fcc608e55be0fc2aecc3997996b2457c68a58","user":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars0.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"body":"Also see changes to rbac file.","created_at":"2017-04-17T22:40:34Z","updated_at":"2017-04-17T22:40:34Z","html_url":"https://github.com/coreos/flannel/pull/681#discussion_r111837452","pull_request_url":"https://api.github.com/repos/coreos/flannel/pulls/681","_links":{"self":{"href":"https://api.github.com/repos/coreos/flannel/pulls/comments/111837452"},"html":{"href":"https://github.com/coreos/flannel/pull/681#discussion_r111837452"},"pull_request":{"href":"https://api.github.com/repos/coreos/flannel/pulls/681"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/flannel/pulls/681","id":115988389,"html_url":"https://github.com/coreos/flannel/pull/681","diff_url":"https://github.com/coreos/flannel/pull/681.diff","patch_url":"https://github.com/coreos/flannel/pull/681.patch","issue_url":"https://api.github.com/repos/coreos/flannel/issues/681","number":681,"state":"open","locked":false,"title":"switch kube subnet manager to PATCH","user":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars0.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"body":"This works too.\r\n\r\n@aaronlevy ","created_at":"2017-04-14T20:55:11Z","updated_at":"2017-04-17T22:40:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ccbab4ca229c009b17c7a37108189ac19df8741b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coreos/flannel/pulls/681/commits","review_comments_url":"https://api.github.com/repos/coreos/flannel/pulls/681/comments","review_comment_url":"https://api.github.com/repos/coreos/flannel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/flannel/issues/681/comments","statuses_url":"https://api.github.com/repos/coreos/flannel/statuses/bc1fcc608e55be0fc2aecc3997996b2457c68a58","head":{"label":"mikedanese:patch","ref":"patch","sha":"bc1fcc608e55be0fc2aecc3997996b2457c68a58","user":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars0.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"repo":{"id":64959321,"name":"flannel","full_name":"mikedanese/flannel","owner":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars0.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikedanese/flannel","description":"flannel is an etcd backed network fabric for containers","fork":true,"url":"https://api.github.com/repos/mikedanese/flannel","forks_url":"https://api.github.com/repos/mikedanese/flannel/forks","keys_url":"https://api.github.com/repos/mikedanese/flannel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikedanese/flannel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikedanese/flannel/teams","hooks_url":"https://api.github.com/repos/mikedanese/flannel/hooks","issue_events_url":"https://api.github.com/repos/mikedanese/flannel/issues/events{/number}","events_url":"https://api.github.com/repos/mikedanese/flannel/events","assignees_url":"https://api.github.com/repos/mikedanese/flannel/assignees{/user}","branches_url":"https://api.github.com/repos/mikedanese/flannel/branches{/branch}","tags_url":"https://api.github.com/repos/mikedanese/flannel/tags","blobs_url":"https://api.github.com/repos/mikedanese/flannel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikedanese/flannel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikedanese/flannel/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikedanese/flannel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikedanese/flannel/statuses/{sha}","languages_url":"https://api.github.com/repos/mikedanese/flannel/languages","stargazers_url":"https://api.github.com/repos/mikedanese/flannel/stargazers","contributors_url":"https://api.github.com/repos/mikedanese/flannel/contributors","subscribers_url":"https://api.github.com/repos/mikedanese/flannel/subscribers","subscription_url":"https://api.github.com/repos/mikedanese/flannel/subscription","commits_url":"https://api.github.com/repos/mikedanese/flannel/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikedanese/flannel/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikedanese/flannel/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikedanese/flannel/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikedanese/flannel/contents/{+path}","compare_url":"https://api.github.com/repos/mikedanese/flannel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikedanese/flannel/merges","archive_url":"https://api.github.com/repos/mikedanese/flannel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikedanese/flannel/downloads","issues_url":"https://api.github.com/repos/mikedanese/flannel/issues{/number}","pulls_url":"https://api.github.com/repos/mikedanese/flannel/pulls{/number}","milestones_url":"https://api.github.com/repos/mikedanese/flannel/milestones{/number}","notifications_url":"https://api.github.com/repos/mikedanese/flannel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikedanese/flannel/labels{/name}","releases_url":"https://api.github.com/repos/mikedanese/flannel/releases{/id}","deployments_url":"https://api.github.com/repos/mikedanese/flannel/deployments","created_at":"2016-08-04T18:49:02Z","updated_at":"2016-08-04T18:49:03Z","pushed_at":"2017-04-14T21:16:30Z","git_url":"git://github.com/mikedanese/flannel.git","ssh_url":"git@github.com:mikedanese/flannel.git","clone_url":"https://github.com/mikedanese/flannel.git","svn_url":"https://github.com/mikedanese/flannel","homepage":"","size":49375,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"142bb9c2d704ec29029dbd8eab1df4b4c52470cb","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars0.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":21704134,"name":"flannel","full_name":"coreos/flannel","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars0.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/flannel","description":"flannel is a network fabric for containers, designed for Kubernetes","fork":false,"url":"https://api.github.com/repos/coreos/flannel","forks_url":"https://api.github.com/repos/coreos/flannel/forks","keys_url":"https://api.github.com/repos/coreos/flannel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/flannel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/flannel/teams","hooks_url":"https://api.github.com/repos/coreos/flannel/hooks","issue_events_url":"https://api.github.com/repos/coreos/flannel/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/flannel/events","assignees_url":"https://api.github.com/repos/coreos/flannel/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/flannel/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/flannel/tags","blobs_url":"https://api.github.com/repos/coreos/flannel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/flannel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/flannel/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/flannel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/flannel/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/flannel/languages","stargazers_url":"https://api.github.com/repos/coreos/flannel/stargazers","contributors_url":"https://api.github.com/repos/coreos/flannel/contributors","subscribers_url":"https://api.github.com/repos/coreos/flannel/subscribers","subscription_url":"https://api.github.com/repos/coreos/flannel/subscription","commits_url":"https://api.github.com/repos/coreos/flannel/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/flannel/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/flannel/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/flannel/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/flannel/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/flannel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/flannel/merges","archive_url":"https://api.github.com/repos/coreos/flannel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/flannel/downloads","issues_url":"https://api.github.com/repos/coreos/flannel/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/flannel/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/flannel/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/flannel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/flannel/labels{/name}","releases_url":"https://api.github.com/repos/coreos/flannel/releases{/id}","deployments_url":"https://api.github.com/repos/coreos/flannel/deployments","created_at":"2014-07-10T17:45:29Z","updated_at":"2017-04-17T17:06:06Z","pushed_at":"2017-04-14T22:17:34Z","git_url":"git://github.com/coreos/flannel.git","ssh_url":"git@github.com:coreos/flannel.git","clone_url":"https://github.com/coreos/flannel.git","svn_url":"https://github.com/coreos/flannel","homepage":"","size":38622,"stargazers_count":2047,"watchers_count":2047,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":450,"mirror_url":null,"open_issues_count":124,"forks":450,"open_issues":124,"watchers":2047,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/flannel/pulls/681"},"html":{"href":"https://github.com/coreos/flannel/pull/681"},"issue":{"href":"https://api.github.com/repos/coreos/flannel/issues/681"},"comments":{"href":"https://api.github.com/repos/coreos/flannel/issues/681/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/flannel/pulls/681/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/flannel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/flannel/pulls/681/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/flannel/statuses/bc1fcc608e55be0fc2aecc3997996b2457c68a58"}}}}
{"actor":{"display_login":"mikedanese"}}