{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/36694054","id":36694054,"diff_hunk":"@@ -0,0 +1,48 @@\n+/*\n+Copyright 2015 The Kubernetes Authors All rights reserved.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package iptables\n+\n+import (\n+\t\"testing\"\n+)\n+\n+func testsemVerShouldBeGreaterOrEqual(t *testing.T, major, minor, patch, minMajor, minMinor, minPatch int) {","path":"pkg/proxy/iptables/proxier_test.go","position":23,"original_position":23,"commit_id":"4729eef1fae1a20cf7fd8116ec265875ae4049a5","original_commit_id":"4729eef1fae1a20cf7fd8116ec265875ae4049a5","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"body":"The semver stuff could be moved to pkg/util/semver/*","created_at":"2015-08-10T22:47:37Z","updated_at":"2015-08-10T22:47:37Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9210#discussion_r36694054","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9210","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/36694054"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9210#discussion_r36694054"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9210"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9210","id":36870151,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9210","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9210.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9210.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9210","number":9210,"state":"open","locked":false,"title":"Implement Iptables based Proxy","user":{"login":"BenTheElder","id":917931,"avatar_url":"https://avatars.githubusercontent.com/u/917931?v=3","gravatar_id":"","url":"https://api.github.com/users/BenTheElder","html_url":"https://github.com/BenTheElder","followers_url":"https://api.github.com/users/BenTheElder/followers","following_url":"https://api.github.com/users/BenTheElder/following{/other_user}","gists_url":"https://api.github.com/users/BenTheElder/gists{/gist_id}","starred_url":"https://api.github.com/users/BenTheElder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenTheElder/subscriptions","organizations_url":"https://api.github.com/users/BenTheElder/orgs","repos_url":"https://api.github.com/users/BenTheElder/repos","events_url":"https://api.github.com/users/BenTheElder/events{/privacy}","received_events_url":"https://api.github.com/users/BenTheElder/received_events","type":"User","site_admin":false},"body":"This is an implementation of https://github.com/GoogleCloudPlatform/kubernetes/issues/3760.\r\n\r\nIt implements an `iptables-restore` wrapper, a dummy 'loadbalancer' that serves as a `config.EndpointsConfigHandler`, and a purely iptables based version of `Proxier`, as well as a method for determining whether to use the new `ProxierIptables` or the old `Proxier` based on the `iptables` version. `kube-proxy` now autoselects between the two and uses the new `ProxierIptables` + `DummyLoadBalancerIptables` pair when possible.\r\n\r\nTODO:\r\n- [x] Write new `Proxier` and `LoadBalancer` (`ProxierIptables` and `DummyLoadBalancerIptables`)\r\n- [x] Update `kube-proxy` to select between old `Proxier` and `ProxierIptables`\r\n- [x] Basic `iptables` rule generation\r\n- [x] Faster rule generation (switched to using bytes.Buffer[s] for string concatenation)\r\n- [x] Sticky Sessions\r\n- [x] Delete old rule chains\r\n- [x] Testing. We need more tests and this needs to be more thoroughly run through e2e when done. (mostly done now, just need more verification on e2e and the iptables rules)\r\n- [x] Select `iptables` minimum version for switching over from `Proxier` to `ProxierIptables` (I've selected a version now, but we may want to change it, this probably needs some discussion)\r\n- [x] Make rules fully deterministic (namely make the chain generation use hashing instead of a counter).\r\n- [x] Parse `iptables-save` output to extract existing chains and rules\r\n- [x] Use `iptables-save` output to preserve counters   \r\n\r\nFurther TODO:\r\n- [ ] Use `iptables-save` output to minimize excess rule rewriting.\r\n- [ ] Handle the edge case with pod->self from https://github.com/BenTheElder/kubernetes/issues/3","created_at":"2015-06-03T19:44:37Z","updated_at":"2015-08-10T22:47:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7783cc7f194f8095a28f499128cf68e2353f1331","assignee":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9210/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9210/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9210/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/4729eef1fae1a20cf7fd8116ec265875ae4049a5","head":{"label":"BenTheElder:iptables_proxy","ref":"iptables_proxy","sha":"4729eef1fae1a20cf7fd8116ec265875ae4049a5","user":{"login":"BenTheElder","id":917931,"avatar_url":"https://avatars.githubusercontent.com/u/917931?v=3","gravatar_id":"","url":"https://api.github.com/users/BenTheElder","html_url":"https://github.com/BenTheElder","followers_url":"https://api.github.com/users/BenTheElder/followers","following_url":"https://api.github.com/users/BenTheElder/following{/other_user}","gists_url":"https://api.github.com/users/BenTheElder/gists{/gist_id}","starred_url":"https://api.github.com/users/BenTheElder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenTheElder/subscriptions","organizations_url":"https://api.github.com/users/BenTheElder/orgs","repos_url":"https://api.github.com/users/BenTheElder/repos","events_url":"https://api.github.com/users/BenTheElder/events{/privacy}","received_events_url":"https://api.github.com/users/BenTheElder/received_events","type":"User","site_admin":false},"repo":{"id":32881963,"name":"kubernetes","full_name":"BenTheElder/kubernetes","owner":{"login":"BenTheElder","id":917931,"avatar_url":"https://avatars.githubusercontent.com/u/917931?v=3","gravatar_id":"","url":"https://api.github.com/users/BenTheElder","html_url":"https://github.com/BenTheElder","followers_url":"https://api.github.com/users/BenTheElder/followers","following_url":"https://api.github.com/users/BenTheElder/following{/other_user}","gists_url":"https://api.github.com/users/BenTheElder/gists{/gist_id}","starred_url":"https://api.github.com/users/BenTheElder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenTheElder/subscriptions","organizations_url":"https://api.github.com/users/BenTheElder/orgs","repos_url":"https://api.github.com/users/BenTheElder/repos","events_url":"https://api.github.com/users/BenTheElder/events{/privacy}","received_events_url":"https://api.github.com/users/BenTheElder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BenTheElder/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/BenTheElder/kubernetes","forks_url":"https://api.github.com/repos/BenTheElder/kubernetes/forks","keys_url":"https://api.github.com/repos/BenTheElder/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BenTheElder/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BenTheElder/kubernetes/teams","hooks_url":"https://api.github.com/repos/BenTheElder/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/BenTheElder/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/BenTheElder/kubernetes/events","assignees_url":"https://api.github.com/repos/BenTheElder/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/BenTheElder/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/BenTheElder/kubernetes/tags","blobs_url":"https://api.github.com/repos/BenTheElder/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BenTheElder/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BenTheElder/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/BenTheElder/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BenTheElder/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/BenTheElder/kubernetes/languages","stargazers_url":"https://api.github.com/repos/BenTheElder/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/BenTheElder/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/BenTheElder/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/BenTheElder/kubernetes/subscription","commits_url":"https://api.github.com/repos/BenTheElder/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/BenTheElder/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/BenTheElder/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/BenTheElder/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/BenTheElder/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/BenTheElder/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BenTheElder/kubernetes/merges","archive_url":"https://api.github.com/repos/BenTheElder/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BenTheElder/kubernetes/downloads","issues_url":"https://api.github.com/repos/BenTheElder/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/BenTheElder/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/BenTheElder/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/BenTheElder/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BenTheElder/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/BenTheElder/kubernetes/releases{/id}","created_at":"2015-03-25T18:05:51Z","updated_at":"2015-07-11T00:26:18Z","pushed_at":"2015-08-10T21:15:06Z","git_url":"git://github.com/BenTheElder/kubernetes.git","ssh_url":"git@github.com:BenTheElder/kubernetes.git","clone_url":"https://github.com/BenTheElder/kubernetes.git","svn_url":"https://github.com/BenTheElder/kubernetes","homepage":"http://kubernetes.io","size":98561,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"iptables_proxy"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"11fcd3bb3923813f7c8c02fe03bb9b5815c25561","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-08-10T21:46:53Z","pushed_at":"2015-08-10T22:43:56Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":341134,"stargazers_count":9612,"watchers_count":9612,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2286,"mirror_url":null,"open_issues_count":1729,"forks":2286,"open_issues":1729,"watchers":9612,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9210"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9210"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9210"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9210/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9210/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9210/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/4729eef1fae1a20cf7fd8116ec265875ae4049a5"}}}}