{"action":"created","comment":{"url":"https://api.github.com/repos/yangl900/acs-engine/pulls/comments/167716413","pull_request_review_id":95976528,"id":167716413,"diff_hunk":"@@ -132,10 +146,61 @@ New-InfraContainer()\n     docker build -t kubletwin/pause .\r\n }\r\n \r\n+function\r\n+Set-VnetPluginMode($mode)\r\n+{\r\n+    # Sets Azure VNET CNI plugin operational mode.\r\n+    $fileName  = [Io.path]::Combine(\"$global:AzureCNIConfDir\", \"10-azure.conflist\")\r\n+    (Get-Content $fileName) | %{$_ -replace \"`\"mode`\":.*\", \"`\"mode`\": `\"$mode`\",\"} | Out-File -encoding ASCII -filepath $fileName\r\n+}\r\n+\r\n+function\r\n+Install-VnetPlugins()\r\n+{\r\n+    # Create CNI directories.\r\n+     mkdir $global:AzureCNIBinDir\r\n+     mkdir $global:AzureCNIConfDir\r\n+\r\n+    # Download Azure VNET CNI plugins.\r\n+    # Mirror from https://github.com/Azure/azure-container-networking/releases\r\n+    $zipfile =  [Io.path]::Combine(\"$global:AzureCNIDir\", \"azure-vnet.zip\")\r\n+    Invoke-WebRequest -Uri $global:VNetCNIPluginsURL -OutFile $zipfile\r\n+    Expand-Archive -path $zipfile -DestinationPath $global:AzureCNIBinDir\r\n+    del $zipfile\r\n+\r\n+    # Windows does not need a separate CNI loopback plugin because the Windows\r\n+    # kernel automatically creates a loopback interface for each network namespace.\r\n+    # Copy CNI network config file and set bridge mode.\r\n+    move $global:AzureCNIBinDir/*.conflist $global:AzureCNIConfDir\r\n+\r\n+    # Enable CNI in kubelet.\r\n+    $global:AzureCNIEnabled = $true\r\n+}\r\n+\r\n+function\r\n+Set-AzureNetworkPolicy()\r\n+{\r\n+    # Azure VNET network policy requires tunnel (hairpin) mode because policy is enforced in the host.\r\n+    Set-VnetPluginMode \"tunnel\"\r\n+}\r\n+\r\n+function\r\n+Set-NetworkConfig\r\n+{\r\n+    Write-Log \"Configuring networking with NetworkPolicy:$global:NetworkPolicy\"\r\n+\r\n+    # Configure network policy.\r\n+    if ($global:NetworkPolicy -eq \"azure\") {\r\n+        Install-VnetPlugins\r\n+        Set-AzureNetworkPolicy\r\n+    }\r\n+}\r\n+\r\n function\r\n Write-KubernetesStartFiles($podCIDR)\r\n {\r\n-    $KubeletArgList = @(\"--hostname-override=`$global:AzureHostname\",\"--pod-infra-container-image=kubletwin/pause\",\"--resolv-conf=\"\"\"\"\"\"\"\"\",\"--kubeconfig=c:\\k\\config\")\r\n+    mkdir $global:VolumePluginDir\r\n+    $KubeletArgList = @(\"--hostname-override=`$global:AzureHostname\",\"--pod-infra-container-image=kubletwin/pause\",\"--resolv-conf=\"\"\"\"\"\"\"\"\",\"--kubeconfig=c:\\k\\config\",\"--cloud-provider=azure\",\"--cloud-config=c:\\k\\azure.json\")\r","path":"parts/k8s/kuberneteswindowssetup.ps1","position":98,"original_position":98,"commit_id":"fff37886fbf621258ae15f1b665a5c049b67ca31","original_commit_id":"fff37886fbf621258ae15f1b665a5c049b67ca31","user":{"login":"wenwu449","id":7390068,"avatar_url":"https://avatars0.githubusercontent.com/u/7390068?v=4","gravatar_id":"","url":"https://api.github.com/users/wenwu449","html_url":"https://github.com/wenwu449","followers_url":"https://api.github.com/users/wenwu449/followers","following_url":"https://api.github.com/users/wenwu449/following{/other_user}","gists_url":"https://api.github.com/users/wenwu449/gists{/gist_id}","starred_url":"https://api.github.com/users/wenwu449/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenwu449/subscriptions","organizations_url":"https://api.github.com/users/wenwu449/orgs","repos_url":"https://api.github.com/users/wenwu449/repos","events_url":"https://api.github.com/users/wenwu449/events{/privacy}","received_events_url":"https://api.github.com/users/wenwu449/received_events","type":"User","site_admin":false},"body":"cloud-config shall not be add back","created_at":"2018-02-12T23:10:51Z","updated_at":"2018-02-12T23:10:51Z","html_url":"https://github.com/yangl900/acs-engine/pull/15#discussion_r167716413","pull_request_url":"https://api.github.com/repos/yangl900/acs-engine/pulls/15","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/yangl900/acs-engine/pulls/comments/167716413"},"html":{"href":"https://github.com/yangl900/acs-engine/pull/15#discussion_r167716413"},"pull_request":{"href":"https://api.github.com/repos/yangl900/acs-engine/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/yangl900/acs-engine/pulls/15","id":168697698,"html_url":"https://github.com/yangl900/acs-engine/pull/15","diff_url":"https://github.com/yangl900/acs-engine/pull/15.diff","patch_url":"https://github.com/yangl900/acs-engine/pull/15.patch","issue_url":"https://api.github.com/repos/yangl900/acs-engine/issues/15","number":15,"state":"open","locked":false,"title":"merge master into migration","user":{"login":"jessfraz","id":1445228,"avatar_url":"https://avatars2.githubusercontent.com/u/1445228?v=4","gravatar_id":"","url":"https://api.github.com/users/jessfraz","html_url":"https://github.com/jessfraz","followers_url":"https://api.github.com/users/jessfraz/followers","following_url":"https://api.github.com/users/jessfraz/following{/other_user}","gists_url":"https://api.github.com/users/jessfraz/gists{/gist_id}","starred_url":"https://api.github.com/users/jessfraz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessfraz/subscriptions","organizations_url":"https://api.github.com/users/jessfraz/orgs","repos_url":"https://api.github.com/users/jessfraz/repos","events_url":"https://api.github.com/users/jessfraz/events{/privacy}","received_events_url":"https://api.github.com/users/jessfraz/received_events","type":"User","site_admin":false},"body":"This merges the master branch into the migration branch and fixed conflicts.","created_at":"2018-02-12T21:51:23Z","updated_at":"2018-02-12T23:10:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c53cf3c9b56e52d9143c0504a4916b2c5c009ee","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yangl900/acs-engine/pulls/15/commits","review_comments_url":"https://api.github.com/repos/yangl900/acs-engine/pulls/15/comments","review_comment_url":"https://api.github.com/repos/yangl900/acs-engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yangl900/acs-engine/issues/15/comments","statuses_url":"https://api.github.com/repos/yangl900/acs-engine/statuses/fff37886fbf621258ae15f1b665a5c049b67ca31","head":{"label":"jessfraz:migration-sync-origin-master","ref":"migration-sync-origin-master","sha":"fff37886fbf621258ae15f1b665a5c049b67ca31","user":{"login":"jessfraz","id":1445228,"avatar_url":"https://avatars2.githubusercontent.com/u/1445228?v=4","gravatar_id":"","url":"https://api.github.com/users/jessfraz","html_url":"https://github.com/jessfraz","followers_url":"https://api.github.com/users/jessfraz/followers","following_url":"https://api.github.com/users/jessfraz/following{/other_user}","gists_url":"https://api.github.com/users/jessfraz/gists{/gist_id}","starred_url":"https://api.github.com/users/jessfraz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessfraz/subscriptions","organizations_url":"https://api.github.com/users/jessfraz/orgs","repos_url":"https://api.github.com/users/jessfraz/repos","events_url":"https://api.github.com/users/jessfraz/events{/privacy}","received_events_url":"https://api.github.com/users/jessfraz/received_events","type":"User","site_admin":false},"repo":{"id":108045464,"name":"acs-engine","full_name":"jessfraz/acs-engine","owner":{"login":"jessfraz","id":1445228,"avatar_url":"https://avatars2.githubusercontent.com/u/1445228?v=4","gravatar_id":"","url":"https://api.github.com/users/jessfraz","html_url":"https://github.com/jessfraz","followers_url":"https://api.github.com/users/jessfraz/followers","following_url":"https://api.github.com/users/jessfraz/following{/other_user}","gists_url":"https://api.github.com/users/jessfraz/gists{/gist_id}","starred_url":"https://api.github.com/users/jessfraz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessfraz/subscriptions","organizations_url":"https://api.github.com/users/jessfraz/orgs","repos_url":"https://api.github.com/users/jessfraz/repos","events_url":"https://api.github.com/users/jessfraz/events{/privacy}","received_events_url":"https://api.github.com/users/jessfraz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jessfraz/acs-engine","description":"Azure Container Service Engine - a place for community to collaborate and build the best open Docker container infrastructure for Azure.","fork":true,"url":"https://api.github.com/repos/jessfraz/acs-engine","forks_url":"https://api.github.com/repos/jessfraz/acs-engine/forks","keys_url":"https://api.github.com/repos/jessfraz/acs-engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jessfraz/acs-engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jessfraz/acs-engine/teams","hooks_url":"https://api.github.com/repos/jessfraz/acs-engine/hooks","issue_events_url":"https://api.github.com/repos/jessfraz/acs-engine/issues/events{/number}","events_url":"https://api.github.com/repos/jessfraz/acs-engine/events","assignees_url":"https://api.github.com/repos/jessfraz/acs-engine/assignees{/user}","branches_url":"https://api.github.com/repos/jessfraz/acs-engine/branches{/branch}","tags_url":"https://api.github.com/repos/jessfraz/acs-engine/tags","blobs_url":"https://api.github.com/repos/jessfraz/acs-engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jessfraz/acs-engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jessfraz/acs-engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/jessfraz/acs-engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jessfraz/acs-engine/statuses/{sha}","languages_url":"https://api.github.com/repos/jessfraz/acs-engine/languages","stargazers_url":"https://api.github.com/repos/jessfraz/acs-engine/stargazers","contributors_url":"https://api.github.com/repos/jessfraz/acs-engine/contributors","subscribers_url":"https://api.github.com/repos/jessfraz/acs-engine/subscribers","subscription_url":"https://api.github.com/repos/jessfraz/acs-engine/subscription","commits_url":"https://api.github.com/repos/jessfraz/acs-engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/jessfraz/acs-engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/jessfraz/acs-engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/jessfraz/acs-engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/jessfraz/acs-engine/contents/{+path}","compare_url":"https://api.github.com/repos/jessfraz/acs-engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jessfraz/acs-engine/merges","archive_url":"https://api.github.com/repos/jessfraz/acs-engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jessfraz/acs-engine/downloads","issues_url":"https://api.github.com/repos/jessfraz/acs-engine/issues{/number}","pulls_url":"https://api.github.com/repos/jessfraz/acs-engine/pulls{/number}","milestones_url":"https://api.github.com/repos/jessfraz/acs-engine/milestones{/number}","notifications_url":"https://api.github.com/repos/jessfraz/acs-engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jessfraz/acs-engine/labels{/name}","releases_url":"https://api.github.com/repos/jessfraz/acs-engine/releases{/id}","deployments_url":"https://api.github.com/repos/jessfraz/acs-engine/deployments","created_at":"2017-10-23T22:05:33Z","updated_at":"2017-10-23T22:05:36Z","pushed_at":"2018-02-12T21:50:06Z","git_url":"git://github.com/jessfraz/acs-engine.git","ssh_url":"git@github.com:jessfraz/acs-engine.git","clone_url":"https://github.com/jessfraz/acs-engine.git","svn_url":"https://github.com/jessfraz/acs-engine","homepage":"","size":64515,"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,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yangl900:migration","ref":"migration","sha":"203efbfd76e1cda15b32cf84d917984ed09ff2a0","user":{"login":"yangl900","id":8466897,"avatar_url":"https://avatars2.githubusercontent.com/u/8466897?v=4","gravatar_id":"","url":"https://api.github.com/users/yangl900","html_url":"https://github.com/yangl900","followers_url":"https://api.github.com/users/yangl900/followers","following_url":"https://api.github.com/users/yangl900/following{/other_user}","gists_url":"https://api.github.com/users/yangl900/gists{/gist_id}","starred_url":"https://api.github.com/users/yangl900/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yangl900/subscriptions","organizations_url":"https://api.github.com/users/yangl900/orgs","repos_url":"https://api.github.com/users/yangl900/repos","events_url":"https://api.github.com/users/yangl900/events{/privacy}","received_events_url":"https://api.github.com/users/yangl900/received_events","type":"User","site_admin":false},"repo":{"id":76006538,"name":"acs-engine","full_name":"yangl900/acs-engine","owner":{"login":"yangl900","id":8466897,"avatar_url":"https://avatars2.githubusercontent.com/u/8466897?v=4","gravatar_id":"","url":"https://api.github.com/users/yangl900","html_url":"https://github.com/yangl900","followers_url":"https://api.github.com/users/yangl900/followers","following_url":"https://api.github.com/users/yangl900/following{/other_user}","gists_url":"https://api.github.com/users/yangl900/gists{/gist_id}","starred_url":"https://api.github.com/users/yangl900/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yangl900/subscriptions","organizations_url":"https://api.github.com/users/yangl900/orgs","repos_url":"https://api.github.com/users/yangl900/repos","events_url":"https://api.github.com/users/yangl900/events{/privacy}","received_events_url":"https://api.github.com/users/yangl900/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yangl900/acs-engine","description":"Azure Container Service Engine - a place for community to collaborate and build the best open Docker container infrastructure for Azure.","fork":true,"url":"https://api.github.com/repos/yangl900/acs-engine","forks_url":"https://api.github.com/repos/yangl900/acs-engine/forks","keys_url":"https://api.github.com/repos/yangl900/acs-engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yangl900/acs-engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yangl900/acs-engine/teams","hooks_url":"https://api.github.com/repos/yangl900/acs-engine/hooks","issue_events_url":"https://api.github.com/repos/yangl900/acs-engine/issues/events{/number}","events_url":"https://api.github.com/repos/yangl900/acs-engine/events","assignees_url":"https://api.github.com/repos/yangl900/acs-engine/assignees{/user}","branches_url":"https://api.github.com/repos/yangl900/acs-engine/branches{/branch}","tags_url":"https://api.github.com/repos/yangl900/acs-engine/tags","blobs_url":"https://api.github.com/repos/yangl900/acs-engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yangl900/acs-engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yangl900/acs-engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/yangl900/acs-engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yangl900/acs-engine/statuses/{sha}","languages_url":"https://api.github.com/repos/yangl900/acs-engine/languages","stargazers_url":"https://api.github.com/repos/yangl900/acs-engine/stargazers","contributors_url":"https://api.github.com/repos/yangl900/acs-engine/contributors","subscribers_url":"https://api.github.com/repos/yangl900/acs-engine/subscribers","subscription_url":"https://api.github.com/repos/yangl900/acs-engine/subscription","commits_url":"https://api.github.com/repos/yangl900/acs-engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/yangl900/acs-engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/yangl900/acs-engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/yangl900/acs-engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/yangl900/acs-engine/contents/{+path}","compare_url":"https://api.github.com/repos/yangl900/acs-engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yangl900/acs-engine/merges","archive_url":"https://api.github.com/repos/yangl900/acs-engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yangl900/acs-engine/downloads","issues_url":"https://api.github.com/repos/yangl900/acs-engine/issues{/number}","pulls_url":"https://api.github.com/repos/yangl900/acs-engine/pulls{/number}","milestones_url":"https://api.github.com/repos/yangl900/acs-engine/milestones{/number}","notifications_url":"https://api.github.com/repos/yangl900/acs-engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yangl900/acs-engine/labels{/name}","releases_url":"https://api.github.com/repos/yangl900/acs-engine/releases{/id}","deployments_url":"https://api.github.com/repos/yangl900/acs-engine/deployments","created_at":"2016-12-09T06:01:30Z","updated_at":"2017-03-02T22:40:59Z","pushed_at":"2018-02-12T21:51:24Z","git_url":"git://github.com/yangl900/acs-engine.git","ssh_url":"git@github.com:yangl900/acs-engine.git","clone_url":"https://github.com/yangl900/acs-engine.git","svn_url":"https://github.com/yangl900/acs-engine","homepage":"","size":65192,"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":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yangl900/acs-engine/pulls/15"},"html":{"href":"https://github.com/yangl900/acs-engine/pull/15"},"issue":{"href":"https://api.github.com/repos/yangl900/acs-engine/issues/15"},"comments":{"href":"https://api.github.com/repos/yangl900/acs-engine/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/yangl900/acs-engine/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/yangl900/acs-engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yangl900/acs-engine/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/yangl900/acs-engine/statuses/fff37886fbf621258ae15f1b665a5c049b67ca31"}},"author_association":"NONE"}}
{"actor":{"display_login":"wenwu449"}}