{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/kube-aws/pulls/comments/104817838","pull_request_review_id":25671232,"id":104817838,"diff_hunk":"@@ -64,13 +64,19 @@ func (c ProvidedConfig) StackConfig(opts StackTemplateOptions) (*StackConfig, er\n \t\treturn nil, fmt.Errorf(\"failed to generate config : %v\", err)\n \t}\n \n-\tcompactAssets, err := cfg.ReadOrCreateCompactTLSAssets(opts.TLSAssetsDir, cfg.KMSConfig{\n-\t\tRegion:         stackConfig.ComputedConfig.Region,\n-\t\tKMSKeyARN:      c.KMSKeyARN,\n-\t\tEncryptService: c.providedEncryptService,\n-\t})\n+\tif stackConfig.ComputedConfig.IsChinaRegion {","path":"core/nodepool/config/config.go","position":22,"original_position":22,"commit_id":"bea15ed8bd82e376d4a8b57b6a2c4d70976b0e62","original_commit_id":"bea15ed8bd82e376d4a8b57b6a2c4d70976b0e62","user":{"login":"mumoshu","id":22009,"avatar_url":"https://avatars3.githubusercontent.com/u/22009?v=3","gravatar_id":"","url":"https://api.github.com/users/mumoshu","html_url":"https://github.com/mumoshu","followers_url":"https://api.github.com/users/mumoshu/followers","following_url":"https://api.github.com/users/mumoshu/following{/other_user}","gists_url":"https://api.github.com/users/mumoshu/gists{/gist_id}","starred_url":"https://api.github.com/users/mumoshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mumoshu/subscriptions","organizations_url":"https://api.github.com/users/mumoshu/orgs","repos_url":"https://api.github.com/users/mumoshu/repos","events_url":"https://api.github.com/users/mumoshu/events{/privacy}","received_events_url":"https://api.github.com/users/mumoshu/received_events","type":"User","site_admin":false},"body":"If `IsChinaRegion` is almost meant for `not TLSAssetsEncryptionEnabled` in the context of this PR,\r\ncan we introduce new func like:\r\n\r\n```golang\r\n(c *Cluster) TLSAssetsEncryptionEnabled() bool {\r\n    return !c.IsChinaRegion\r\n}\r\n```\r\n\r\nand refer to it from here and various locations including templates?\r\n","created_at":"2017-03-08T00:35:51Z","updated_at":"2017-03-08T00:35:51Z","html_url":"https://github.com/coreos/kube-aws/pull/390#discussion_r104817838","pull_request_url":"https://api.github.com/repos/coreos/kube-aws/pulls/390","_links":{"self":{"href":"https://api.github.com/repos/coreos/kube-aws/pulls/comments/104817838"},"html":{"href":"https://github.com/coreos/kube-aws/pull/390#discussion_r104817838"},"pull_request":{"href":"https://api.github.com/repos/coreos/kube-aws/pulls/390"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/kube-aws/pulls/390","id":109480969,"html_url":"https://github.com/coreos/kube-aws/pull/390","diff_url":"https://github.com/coreos/kube-aws/pull/390.diff","patch_url":"https://github.com/coreos/kube-aws/pull/390.patch","issue_url":"https://api.github.com/repos/coreos/kube-aws/issues/390","number":390,"state":"open","locked":false,"title":"[WIP] AWS China region support","user":{"login":"camilb","id":2655869,"avatar_url":"https://avatars2.githubusercontent.com/u/2655869?v=3","gravatar_id":"","url":"https://api.github.com/users/camilb","html_url":"https://github.com/camilb","followers_url":"https://api.github.com/users/camilb/followers","following_url":"https://api.github.com/users/camilb/following{/other_user}","gists_url":"https://api.github.com/users/camilb/gists{/gist_id}","starred_url":"https://api.github.com/users/camilb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camilb/subscriptions","organizations_url":"https://api.github.com/users/camilb/orgs","repos_url":"https://api.github.com/users/camilb/repos","events_url":"https://api.github.com/users/camilb/events{/privacy}","received_events_url":"https://api.github.com/users/camilb/received_events","type":"User","site_admin":false},"body":"Hi @mumoshu, my colleague @mpucholblasco and I were working to adapt `kube-aws` for AWS China region and we need community feedback.\r\n\r\nThere were several problems we encountered and  tried to fix:\r\n* there is no KMS support in `cn-north-1`region. We preferred to disable this entirely for this region only.We think later using https://github.com/mozilla/sops to encrypt the certificates fields.\r\n* China region has a different S3 endpoint. For now we are passing a flag \"--s3-region=cn-north-1\" when starting the cluster but we are working to get the region automatically from `cluster.yaml`\r\n* there are different ARNs. We automatically detect and change them for `cn-north-1`\r\n* most of the docker or rkt images are not pulled from dockerhub or quay and gcr.io is completely blocked in China. On large images, like hyperkube, you get many timeouts from quay. \r\nWe added an option to specify your own images, hosted on a registry in China. \r\nWe are using Alibaba Cloud registry, which is very fast. We also added an option for rkt to pull images from docker repos.\r\nA special case is with `amd64-pause` image that kubernetes is using it and can not change its name or download it. In this case we added a simple service that pulls the image from our registry in China and tag it as `gcr.io/google_containers/pause-amd64:3.0`\r\n\r\n\r\n* CoreOS AMIs in `cn-north-1` are outdated, so we're using a simple method to clone a AMI from Singapore region.\r\n#ap-south-1\r\nmkfs.ext4 /dev/xvdb\r\nmkdir /ami\r\nmount /dev/xvdb /ami\r\ncd /ami\r\ndd if=/dev/xvda of=root.img bs=1M\r\nscp -i core.pem /ami/root.img core@cn-north-1_ip_address:/home/core\r\n#cn-north-1\r\ndd if=/home/core/root.img of=/dev/xvdb bs=1M oflag=direct\r\nmkdir -p /ami\r\nmount /dev/xvdb9 /ami\r\nrm /ami/home/core/.ssh/authorized_keys\r\nrm /ami/home/core/.ssh/authorized_keys.d/*\r\numount /ami\r\nCreate a snapshot of the volume.\r\nCreate an AMI from the snapshot.\r\n\r\nAfter all of these changes we can successfully deploy kubernetes with `kube-aws` in `cn-north-1` as fast as for other regions and without errors or additional configurations.\r\n\r\nWe are waiting for suggestions from the community before clean the commits and rebase.\r\n ","created_at":"2017-03-07T13:39:33Z","updated_at":"2017-03-08T00:35:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coreos/kube-aws/pulls/390/commits","review_comments_url":"https://api.github.com/repos/coreos/kube-aws/pulls/390/comments","review_comment_url":"https://api.github.com/repos/coreos/kube-aws/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/kube-aws/issues/390/comments","statuses_url":"https://api.github.com/repos/coreos/kube-aws/statuses/bea15ed8bd82e376d4a8b57b6a2c4d70976b0e62","head":{"label":"mpucholblasco:kube-china","ref":"kube-china","sha":"bea15ed8bd82e376d4a8b57b6a2c4d70976b0e62","user":{"login":"mpucholblasco","id":908071,"avatar_url":"https://avatars3.githubusercontent.com/u/908071?v=3","gravatar_id":"","url":"https://api.github.com/users/mpucholblasco","html_url":"https://github.com/mpucholblasco","followers_url":"https://api.github.com/users/mpucholblasco/followers","following_url":"https://api.github.com/users/mpucholblasco/following{/other_user}","gists_url":"https://api.github.com/users/mpucholblasco/gists{/gist_id}","starred_url":"https://api.github.com/users/mpucholblasco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpucholblasco/subscriptions","organizations_url":"https://api.github.com/users/mpucholblasco/orgs","repos_url":"https://api.github.com/users/mpucholblasco/repos","events_url":"https://api.github.com/users/mpucholblasco/events{/privacy}","received_events_url":"https://api.github.com/users/mpucholblasco/received_events","type":"User","site_admin":false},"repo":{"id":82697005,"name":"kube-aws","full_name":"mpucholblasco/kube-aws","owner":{"login":"mpucholblasco","id":908071,"avatar_url":"https://avatars3.githubusercontent.com/u/908071?v=3","gravatar_id":"","url":"https://api.github.com/users/mpucholblasco","html_url":"https://github.com/mpucholblasco","followers_url":"https://api.github.com/users/mpucholblasco/followers","following_url":"https://api.github.com/users/mpucholblasco/following{/other_user}","gists_url":"https://api.github.com/users/mpucholblasco/gists{/gist_id}","starred_url":"https://api.github.com/users/mpucholblasco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpucholblasco/subscriptions","organizations_url":"https://api.github.com/users/mpucholblasco/orgs","repos_url":"https://api.github.com/users/mpucholblasco/repos","events_url":"https://api.github.com/users/mpucholblasco/events{/privacy}","received_events_url":"https://api.github.com/users/mpucholblasco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mpucholblasco/kube-aws","description":"CoreOS Kubernetes on AWS","fork":true,"url":"https://api.github.com/repos/mpucholblasco/kube-aws","forks_url":"https://api.github.com/repos/mpucholblasco/kube-aws/forks","keys_url":"https://api.github.com/repos/mpucholblasco/kube-aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mpucholblasco/kube-aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mpucholblasco/kube-aws/teams","hooks_url":"https://api.github.com/repos/mpucholblasco/kube-aws/hooks","issue_events_url":"https://api.github.com/repos/mpucholblasco/kube-aws/issues/events{/number}","events_url":"https://api.github.com/repos/mpucholblasco/kube-aws/events","assignees_url":"https://api.github.com/repos/mpucholblasco/kube-aws/assignees{/user}","branches_url":"https://api.github.com/repos/mpucholblasco/kube-aws/branches{/branch}","tags_url":"https://api.github.com/repos/mpucholblasco/kube-aws/tags","blobs_url":"https://api.github.com/repos/mpucholblasco/kube-aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mpucholblasco/kube-aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mpucholblasco/kube-aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/mpucholblasco/kube-aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mpucholblasco/kube-aws/statuses/{sha}","languages_url":"https://api.github.com/repos/mpucholblasco/kube-aws/languages","stargazers_url":"https://api.github.com/repos/mpucholblasco/kube-aws/stargazers","contributors_url":"https://api.github.com/repos/mpucholblasco/kube-aws/contributors","subscribers_url":"https://api.github.com/repos/mpucholblasco/kube-aws/subscribers","subscription_url":"https://api.github.com/repos/mpucholblasco/kube-aws/subscription","commits_url":"https://api.github.com/repos/mpucholblasco/kube-aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/mpucholblasco/kube-aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/mpucholblasco/kube-aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/mpucholblasco/kube-aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/mpucholblasco/kube-aws/contents/{+path}","compare_url":"https://api.github.com/repos/mpucholblasco/kube-aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mpucholblasco/kube-aws/merges","archive_url":"https://api.github.com/repos/mpucholblasco/kube-aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mpucholblasco/kube-aws/downloads","issues_url":"https://api.github.com/repos/mpucholblasco/kube-aws/issues{/number}","pulls_url":"https://api.github.com/repos/mpucholblasco/kube-aws/pulls{/number}","milestones_url":"https://api.github.com/repos/mpucholblasco/kube-aws/milestones{/number}","notifications_url":"https://api.github.com/repos/mpucholblasco/kube-aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mpucholblasco/kube-aws/labels{/name}","releases_url":"https://api.github.com/repos/mpucholblasco/kube-aws/releases{/id}","deployments_url":"https://api.github.com/repos/mpucholblasco/kube-aws/deployments","created_at":"2017-02-21T15:41:38Z","updated_at":"2017-02-21T15:41:40Z","pushed_at":"2017-03-06T11:17:24Z","git_url":"git://github.com/mpucholblasco/kube-aws.git","ssh_url":"git@github.com:mpucholblasco/kube-aws.git","clone_url":"https://github.com/mpucholblasco/kube-aws.git","svn_url":"https://github.com/mpucholblasco/kube-aws","homepage":null,"size":19812,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"09366deebc35f602e6d87ea69d7cb5e56d113a5f","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":70860688,"name":"kube-aws","full_name":"coreos/kube-aws","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/kube-aws","description":"Kubernetes on AWS with Container Linux","fork":false,"url":"https://api.github.com/repos/coreos/kube-aws","forks_url":"https://api.github.com/repos/coreos/kube-aws/forks","keys_url":"https://api.github.com/repos/coreos/kube-aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/kube-aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/kube-aws/teams","hooks_url":"https://api.github.com/repos/coreos/kube-aws/hooks","issue_events_url":"https://api.github.com/repos/coreos/kube-aws/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/kube-aws/events","assignees_url":"https://api.github.com/repos/coreos/kube-aws/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/kube-aws/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/kube-aws/tags","blobs_url":"https://api.github.com/repos/coreos/kube-aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/kube-aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/kube-aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/kube-aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/kube-aws/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/kube-aws/languages","stargazers_url":"https://api.github.com/repos/coreos/kube-aws/stargazers","contributors_url":"https://api.github.com/repos/coreos/kube-aws/contributors","subscribers_url":"https://api.github.com/repos/coreos/kube-aws/subscribers","subscription_url":"https://api.github.com/repos/coreos/kube-aws/subscription","commits_url":"https://api.github.com/repos/coreos/kube-aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/kube-aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/kube-aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/kube-aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/kube-aws/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/kube-aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/kube-aws/merges","archive_url":"https://api.github.com/repos/coreos/kube-aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/kube-aws/downloads","issues_url":"https://api.github.com/repos/coreos/kube-aws/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/kube-aws/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/kube-aws/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/kube-aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/kube-aws/labels{/name}","releases_url":"https://api.github.com/repos/coreos/kube-aws/releases{/id}","deployments_url":"https://api.github.com/repos/coreos/kube-aws/deployments","created_at":"2016-10-14T00:57:33Z","updated_at":"2017-03-07T19:54:47Z","pushed_at":"2017-03-08T00:02:44Z","git_url":"git://github.com/coreos/kube-aws.git","ssh_url":"git@github.com:coreos/kube-aws.git","clone_url":"https://github.com/coreos/kube-aws.git","svn_url":"https://github.com/coreos/kube-aws","homepage":"","size":19689,"stargazers_count":243,"watchers_count":243,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":76,"mirror_url":null,"open_issues_count":72,"forks":76,"open_issues":72,"watchers":243,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/kube-aws/pulls/390"},"html":{"href":"https://github.com/coreos/kube-aws/pull/390"},"issue":{"href":"https://api.github.com/repos/coreos/kube-aws/issues/390"},"comments":{"href":"https://api.github.com/repos/coreos/kube-aws/issues/390/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/kube-aws/pulls/390/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/kube-aws/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/kube-aws/pulls/390/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/kube-aws/statuses/bea15ed8bd82e376d4a8b57b6a2c4d70976b0e62"}}}}
{"actor":{"display_login":"mumoshu"}}