{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/25881625","id":25881625,"diff_hunk":"@@ -18,19 +18,32 @@ package util\n \n import (\n \t\"regexp\"\n-\t\"strings\"\n )\n \n-// IsDNSLabel tests for a string that conforms to the definition of a label in\n-// DNS (RFC 1123).\n-func IsDNSLabel(value string) bool {\n-\treturn IsDNS1123Label(value)\n+const LabelValueFmt string = \"[-A-Za-z0-9_.]*\"\n+\n+var labelValueRegexp = regexp.MustCompile(\"^\" + LabelValueFmt + \"$\")\n+\n+const LabelValueMaxLength int = 63\n+\n+func IsValidLabelValue(value string) bool {\n+\treturn (len(value) <= LabelValueMaxLength && labelValueRegexp.MatchString(value))\n }\n \n-// IsDNSSubdomain tests for a string that conforms to the definition of a\n-// subdomain in DNS (RFC 1123).\n-func IsDNSSubdomain(value string) bool {\n-\treturn IsDNS1123Subdomain(value)\n+// Annotation values are opaque.\n+func IsValidAnnotationValue(value string) bool {\n+\treturn true\n+}\n+\n+const kubeToken string = \"[A-Za-z0-9]\"","path":"pkg/util/validation.go","position":30,"original_position":30,"commit_id":"15f6d1f8d8081ff7d8e2cd0753a048e88c522e5b","original_commit_id":"15f6d1f8d8081ff7d8e2cd0753a048e88c522e5b","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":"just nits:\r\n\r\n\"token\" implies a word, but this is a char.\r\n\r\nSuggest \"qualNameChar\" for what you call kubeToken, \"qualNameInnerChar\" for extendedKubeToken","created_at":"2015-03-05T17:14:17Z","updated_at":"2015-03-05T17:14:17Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4898#discussion_r25881625","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4898","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/25881625"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4898#discussion_r25881625"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4898"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4898","id":30179518,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4898","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4898.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4898.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/4898","number":4898,"state":"open","locked":false,"title":"Loosen label and annotation validation and related tests","user":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-27T16:30:14Z","updated_at":"2015-03-05T17:14:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f374167168a604b769e369721f2b330002451717","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/4898/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4898/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/4898/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/15f6d1f8d8081ff7d8e2cd0753a048e88c522e5b","head":{"label":"gmarek:client2","ref":"client2","sha":"15f6d1f8d8081ff7d8e2cd0753a048e88c522e5b","user":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"repo":{"id":30216777,"name":"kubernetes","full_name":"gmarek/kubernetes","owner":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gmarek/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/gmarek/kubernetes","forks_url":"https://api.github.com/repos/gmarek/kubernetes/forks","keys_url":"https://api.github.com/repos/gmarek/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gmarek/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gmarek/kubernetes/teams","hooks_url":"https://api.github.com/repos/gmarek/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/gmarek/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/gmarek/kubernetes/events","assignees_url":"https://api.github.com/repos/gmarek/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/gmarek/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/gmarek/kubernetes/tags","blobs_url":"https://api.github.com/repos/gmarek/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gmarek/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gmarek/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/gmarek/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gmarek/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/gmarek/kubernetes/languages","stargazers_url":"https://api.github.com/repos/gmarek/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/gmarek/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/gmarek/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/gmarek/kubernetes/subscription","commits_url":"https://api.github.com/repos/gmarek/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/gmarek/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/gmarek/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/gmarek/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/gmarek/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/gmarek/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gmarek/kubernetes/merges","archive_url":"https://api.github.com/repos/gmarek/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gmarek/kubernetes/downloads","issues_url":"https://api.github.com/repos/gmarek/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/gmarek/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/gmarek/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/gmarek/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gmarek/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/gmarek/kubernetes/releases{/id}","created_at":"2015-02-03T00:37:49Z","updated_at":"2015-02-22T15:22:23Z","pushed_at":"2015-03-05T16:27:03Z","git_url":"git://github.com/gmarek/kubernetes.git","ssh_url":"git@github.com:gmarek/kubernetes.git","clone_url":"https://github.com/gmarek/kubernetes.git","svn_url":"https://github.com/gmarek/kubernetes","homepage":"http://kubernetes.io","size":32599,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"6c5b390160856cd8334043344ef6e08568b0a5c9","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","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-03-05T17:01:20Z","pushed_at":"2015-03-05T17:01:20Z","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":91970,"stargazers_count":6452,"watchers_count":6452,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1149,"mirror_url":null,"open_issues_count":789,"forks":1149,"open_issues":789,"watchers":6452,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4898"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4898"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/4898"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/4898/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4898/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4898/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/15f6d1f8d8081ff7d8e2cd0753a048e88c522e5b"}}}}