{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/tectonic-installer/pulls/comments/190533477","pull_request_review_id":122927055,"id":190533477,"diff_hunk":"@@ -151,6 +158,24 @@ func (c *Cluster) ValidateAndLog() error {\n \treturn nil\n }\n \n+// validateTNCS3Bucket does some basic validation to ensure that the TNC bucket\n+// matches the S3 bucket naming rules. Not all rules are checked\n+// because Tectonic controls the generation of S3 bucket names, creating\n+// buckets of the form: <cluster-name>-<tnc>.<domain-name>\n+func (c *Cluster) validateTNCS3Bucket() error {\n+\tif c.Platform != PlatformAWS {\n+\t\treturn nil\n+\t}\n+\tbucket := strings.Join([]string{fmt.Sprintf(\"%s-tnc\", c.Name), c.BaseDomain}, \".\")\n+\tif len(bucket) > 63 {\n+\t\treturn errors.New(\"the S3 bucket name generated from the cluster name and base domain is too long; S3 bucket names must be less than 63 characters; please choose a shorter cluster name or base domain\")\n+\t}\n+\tif !regexp.MustCompile(\"^[a-z0-9][a-z0-9-.]{1,61}[a-z0-9]$\").MatchString(bucket) {","path":"installer/pkg/config/validate.go","position":37,"original_position":37,"commit_id":"44a793d2464cf5779df0ccb9ba138e55b5b14823","original_commit_id":"44a793d2464cf5779df0ccb9ba138e55b5b14823","user":{"login":"squat","id":20484159,"avatar_url":"https://avatars1.githubusercontent.com/u/20484159?v=4","gravatar_id":"","url":"https://api.github.com/users/squat","html_url":"https://github.com/squat","followers_url":"https://api.github.com/users/squat/followers","following_url":"https://api.github.com/users/squat/following{/other_user}","gists_url":"https://api.github.com/users/squat/gists{/gist_id}","starred_url":"https://api.github.com/users/squat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squat/subscriptions","organizations_url":"https://api.github.com/users/squat/orgs","repos_url":"https://api.github.com/users/squat/repos","events_url":"https://api.github.com/users/squat/events{/privacy}","received_events_url":"https://api.github.com/users/squat/received_events","type":"User","site_admin":false},"body":"Well, there are valid domain names that are not valid bucket names. This was optimistic so we could later implement the stricter s3 bucket name rules though right now there is no difference.","created_at":"2018-05-24T10:10:03Z","updated_at":"2018-05-24T10:10:03Z","html_url":"https://github.com/coreos/tectonic-installer/pull/3238#discussion_r190533477","pull_request_url":"https://api.github.com/repos/coreos/tectonic-installer/pulls/3238","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/coreos/tectonic-installer/pulls/comments/190533477"},"html":{"href":"https://github.com/coreos/tectonic-installer/pull/3238#discussion_r190533477"},"pull_request":{"href":"https://api.github.com/repos/coreos/tectonic-installer/pulls/3238"}},"in_reply_to_id":190531468},"pull_request":{"url":"https://api.github.com/repos/coreos/tectonic-installer/pulls/3238","id":188739713,"html_url":"https://github.com/coreos/tectonic-installer/pull/3238","diff_url":"https://github.com/coreos/tectonic-installer/pull/3238.diff","patch_url":"https://github.com/coreos/tectonic-installer/pull/3238.patch","issue_url":"https://api.github.com/repos/coreos/tectonic-installer/issues/3238","number":3238,"state":"open","locked":false,"title":"installer/pkg: validate s3 bucket","user":{"login":"squat","id":20484159,"avatar_url":"https://avatars1.githubusercontent.com/u/20484159?v=4","gravatar_id":"","url":"https://api.github.com/users/squat","html_url":"https://github.com/squat","followers_url":"https://api.github.com/users/squat/followers","following_url":"https://api.github.com/users/squat/following{/other_user}","gists_url":"https://api.github.com/users/squat/gists{/gist_id}","starred_url":"https://api.github.com/users/squat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squat/subscriptions","organizations_url":"https://api.github.com/users/squat/orgs","repos_url":"https://api.github.com/users/squat/repos","events_url":"https://api.github.com/users/squat/events{/privacy}","received_events_url":"https://api.github.com/users/squat/received_events","type":"User","site_admin":false},"body":"This commit adds S3 Bucket name validation and also adds some more structure to platform comparisons.\r\n\r\nFixes: INST-996\r\n\r\ncc @enxebre @alexsomesan","created_at":"2018-05-17T13:37:12Z","updated_at":"2018-05-24T10:10:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"890b4abfa809b8f86234c35e245444752788d592","assignee":null,"assignees":[],"requested_reviewers":[{"login":"squeed","id":551378,"avatar_url":"https://avatars2.githubusercontent.com/u/551378?v=4","gravatar_id":"","url":"https://api.github.com/users/squeed","html_url":"https://github.com/squeed","followers_url":"https://api.github.com/users/squeed/followers","following_url":"https://api.github.com/users/squeed/following{/other_user}","gists_url":"https://api.github.com/users/squeed/gists{/gist_id}","starred_url":"https://api.github.com/users/squeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squeed/subscriptions","organizations_url":"https://api.github.com/users/squeed/orgs","repos_url":"https://api.github.com/users/squeed/repos","events_url":"https://api.github.com/users/squeed/events{/privacy}","received_events_url":"https://api.github.com/users/squeed/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":557217031,"url":"https://api.github.com/repos/coreos/tectonic-installer/labels/platform/aws","name":"platform/aws","color":"f9d0c4","default":false},{"id":666829262,"url":"https://api.github.com/repos/coreos/tectonic-installer/labels/run-smoke-tests","name":"run-smoke-tests","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/coreos/tectonic-installer/pulls/3238/commits","review_comments_url":"https://api.github.com/repos/coreos/tectonic-installer/pulls/3238/comments","review_comment_url":"https://api.github.com/repos/coreos/tectonic-installer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/tectonic-installer/issues/3238/comments","statuses_url":"https://api.github.com/repos/coreos/tectonic-installer/statuses/44a793d2464cf5779df0ccb9ba138e55b5b14823","head":{"label":"squat:s3tnc","ref":"s3tnc","sha":"44a793d2464cf5779df0ccb9ba138e55b5b14823","user":{"login":"squat","id":20484159,"avatar_url":"https://avatars1.githubusercontent.com/u/20484159?v=4","gravatar_id":"","url":"https://api.github.com/users/squat","html_url":"https://github.com/squat","followers_url":"https://api.github.com/users/squat/followers","following_url":"https://api.github.com/users/squat/following{/other_user}","gists_url":"https://api.github.com/users/squat/gists{/gist_id}","starred_url":"https://api.github.com/users/squat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squat/subscriptions","organizations_url":"https://api.github.com/users/squat/orgs","repos_url":"https://api.github.com/users/squat/repos","events_url":"https://api.github.com/users/squat/events{/privacy}","received_events_url":"https://api.github.com/users/squat/received_events","type":"User","site_admin":false},"repo":{"id":86737556,"name":"tectonic-installer","full_name":"squat/tectonic-installer","owner":{"login":"squat","id":20484159,"avatar_url":"https://avatars1.githubusercontent.com/u/20484159?v=4","gravatar_id":"","url":"https://api.github.com/users/squat","html_url":"https://github.com/squat","followers_url":"https://api.github.com/users/squat/followers","following_url":"https://api.github.com/users/squat/following{/other_user}","gists_url":"https://api.github.com/users/squat/gists{/gist_id}","starred_url":"https://api.github.com/users/squat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squat/subscriptions","organizations_url":"https://api.github.com/users/squat/orgs","repos_url":"https://api.github.com/users/squat/repos","events_url":"https://api.github.com/users/squat/events{/privacy}","received_events_url":"https://api.github.com/users/squat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/squat/tectonic-installer","description":"Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more","fork":true,"url":"https://api.github.com/repos/squat/tectonic-installer","forks_url":"https://api.github.com/repos/squat/tectonic-installer/forks","keys_url":"https://api.github.com/repos/squat/tectonic-installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squat/tectonic-installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squat/tectonic-installer/teams","hooks_url":"https://api.github.com/repos/squat/tectonic-installer/hooks","issue_events_url":"https://api.github.com/repos/squat/tectonic-installer/issues/events{/number}","events_url":"https://api.github.com/repos/squat/tectonic-installer/events","assignees_url":"https://api.github.com/repos/squat/tectonic-installer/assignees{/user}","branches_url":"https://api.github.com/repos/squat/tectonic-installer/branches{/branch}","tags_url":"https://api.github.com/repos/squat/tectonic-installer/tags","blobs_url":"https://api.github.com/repos/squat/tectonic-installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squat/tectonic-installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squat/tectonic-installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/squat/tectonic-installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squat/tectonic-installer/statuses/{sha}","languages_url":"https://api.github.com/repos/squat/tectonic-installer/languages","stargazers_url":"https://api.github.com/repos/squat/tectonic-installer/stargazers","contributors_url":"https://api.github.com/repos/squat/tectonic-installer/contributors","subscribers_url":"https://api.github.com/repos/squat/tectonic-installer/subscribers","subscription_url":"https://api.github.com/repos/squat/tectonic-installer/subscription","commits_url":"https://api.github.com/repos/squat/tectonic-installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/squat/tectonic-installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/squat/tectonic-installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/squat/tectonic-installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/squat/tectonic-installer/contents/{+path}","compare_url":"https://api.github.com/repos/squat/tectonic-installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squat/tectonic-installer/merges","archive_url":"https://api.github.com/repos/squat/tectonic-installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squat/tectonic-installer/downloads","issues_url":"https://api.github.com/repos/squat/tectonic-installer/issues{/number}","pulls_url":"https://api.github.com/repos/squat/tectonic-installer/pulls{/number}","milestones_url":"https://api.github.com/repos/squat/tectonic-installer/milestones{/number}","notifications_url":"https://api.github.com/repos/squat/tectonic-installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squat/tectonic-installer/labels{/name}","releases_url":"https://api.github.com/repos/squat/tectonic-installer/releases{/id}","deployments_url":"https://api.github.com/repos/squat/tectonic-installer/deployments","created_at":"2017-03-30T18:51:46Z","updated_at":"2018-03-13T09:57:36Z","pushed_at":"2018-05-24T09:29:08Z","git_url":"git://github.com/squat/tectonic-installer.git","ssh_url":"git@github.com:squat/tectonic-installer.git","clone_url":"https://github.com/squat/tectonic-installer.git","svn_url":"https://github.com/squat/tectonic-installer","homepage":"","size":35674,"stargazers_count":0,"watchers_count":0,"language":"HCL","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":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"96ff6793a9af263236f1654a500b41c804c4ee04","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars3.githubusercontent.com/u/3730757?v=4","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":81620471,"name":"tectonic-installer","full_name":"coreos/tectonic-installer","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars3.githubusercontent.com/u/3730757?v=4","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/tectonic-installer","description":"Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more","fork":false,"url":"https://api.github.com/repos/coreos/tectonic-installer","forks_url":"https://api.github.com/repos/coreos/tectonic-installer/forks","keys_url":"https://api.github.com/repos/coreos/tectonic-installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/tectonic-installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/tectonic-installer/teams","hooks_url":"https://api.github.com/repos/coreos/tectonic-installer/hooks","issue_events_url":"https://api.github.com/repos/coreos/tectonic-installer/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/tectonic-installer/events","assignees_url":"https://api.github.com/repos/coreos/tectonic-installer/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/tectonic-installer/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/tectonic-installer/tags","blobs_url":"https://api.github.com/repos/coreos/tectonic-installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/tectonic-installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/tectonic-installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/tectonic-installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/tectonic-installer/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/tectonic-installer/languages","stargazers_url":"https://api.github.com/repos/coreos/tectonic-installer/stargazers","contributors_url":"https://api.github.com/repos/coreos/tectonic-installer/contributors","subscribers_url":"https://api.github.com/repos/coreos/tectonic-installer/subscribers","subscription_url":"https://api.github.com/repos/coreos/tectonic-installer/subscription","commits_url":"https://api.github.com/repos/coreos/tectonic-installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/tectonic-installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/tectonic-installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/tectonic-installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/tectonic-installer/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/tectonic-installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/tectonic-installer/merges","archive_url":"https://api.github.com/repos/coreos/tectonic-installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/tectonic-installer/downloads","issues_url":"https://api.github.com/repos/coreos/tectonic-installer/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/tectonic-installer/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/tectonic-installer/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/tectonic-installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/tectonic-installer/labels{/name}","releases_url":"https://api.github.com/repos/coreos/tectonic-installer/releases{/id}","deployments_url":"https://api.github.com/repos/coreos/tectonic-installer/deployments","created_at":"2017-02-11T00:52:23Z","updated_at":"2018-05-24T09:27:56Z","pushed_at":"2018-05-24T09:29:09Z","git_url":"git://github.com/coreos/tectonic-installer.git","ssh_url":"git@github.com:coreos/tectonic-installer.git","clone_url":"https://github.com/coreos/tectonic-installer.git","svn_url":"https://github.com/coreos/tectonic-installer","homepage":"","size":36005,"stargazers_count":516,"watchers_count":516,"language":"HCL","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":280,"mirror_url":null,"archived":false,"open_issues_count":174,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":280,"open_issues":174,"watchers":516,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/tectonic-installer/pulls/3238"},"html":{"href":"https://github.com/coreos/tectonic-installer/pull/3238"},"issue":{"href":"https://api.github.com/repos/coreos/tectonic-installer/issues/3238"},"comments":{"href":"https://api.github.com/repos/coreos/tectonic-installer/issues/3238/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/tectonic-installer/pulls/3238/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/tectonic-installer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/tectonic-installer/pulls/3238/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/tectonic-installer/statuses/44a793d2464cf5779df0ccb9ba138e55b5b14823"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"squat"}}