{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/35886","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/35886/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/35886/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/35886/events","html_url":"https://github.com/kubernetes/kubernetes/pull/35886","id":186199810,"number":35886,"title":"Fixes token_found bug in addon manager","user":{"login":"MrHohn","id":8681801,"avatar_url":"https://avatars.githubusercontent.com/u/8681801?v=3","gravatar_id":"","url":"https://api.github.com/users/MrHohn","html_url":"https://github.com/MrHohn","followers_url":"https://api.github.com/users/MrHohn/followers","following_url":"https://api.github.com/users/MrHohn/following{/other_user}","gists_url":"https://api.github.com/users/MrHohn/gists{/gist_id}","starred_url":"https://api.github.com/users/MrHohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrHohn/subscriptions","organizations_url":"https://api.github.com/users/MrHohn/orgs","repos_url":"https://api.github.com/users/MrHohn/repos","events_url":"https://api.github.com/users/MrHohn/events{/privacy}","received_events_url":"https://api.github.com/users/MrHohn/received_events","type":"User","site_admin":false},"labels":[{"id":176978828,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf","default":false},{"id":349530192,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-label-needed","name":"release-note-label-needed","color":"db5a64","default":false},{"id":253450793,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XS","name":"size/XS","color":"009900","default":false}],"state":"open","locked":false,"assignee":{"login":"eparis","id":8093535,"avatar_url":"https://avatars.githubusercontent.com/u/8093535?v=3","gravatar_id":"","url":"https://api.github.com/users/eparis","html_url":"https://github.com/eparis","followers_url":"https://api.github.com/users/eparis/followers","following_url":"https://api.github.com/users/eparis/following{/other_user}","gists_url":"https://api.github.com/users/eparis/gists{/gist_id}","starred_url":"https://api.github.com/users/eparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparis/subscriptions","organizations_url":"https://api.github.com/users/eparis/orgs","repos_url":"https://api.github.com/users/eparis/repos","events_url":"https://api.github.com/users/eparis/events{/privacy}","received_events_url":"https://api.github.com/users/eparis/received_events","type":"User","site_admin":false},"assignees":[{"login":"eparis","id":8093535,"avatar_url":"https://avatars.githubusercontent.com/u/8093535?v=3","gravatar_id":"","url":"https://api.github.com/users/eparis","html_url":"https://github.com/eparis","followers_url":"https://api.github.com/users/eparis/followers","following_url":"https://api.github.com/users/eparis/following{/other_user}","gists_url":"https://api.github.com/users/eparis/gists{/gist_id}","starred_url":"https://api.github.com/users/eparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparis/subscriptions","organizations_url":"https://api.github.com/users/eparis/orgs","repos_url":"https://api.github.com/users/eparis/repos","events_url":"https://api.github.com/users/eparis/events{/privacy}","received_events_url":"https://api.github.com/users/eparis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-10-31T04:16:37Z","updated_at":"2016-10-31T23:54:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/35886","html_url":"https://github.com/kubernetes/kubernetes/pull/35886","diff_url":"https://github.com/kubernetes/kubernetes/pull/35886.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/35886.patch"},"body":"From #35832.\r\n\r\nAbove PR exposed addon manager's logs on Jenkins, found below error on the gce e2e test artifacts:\r\n```\r\nError from server: serviceaccounts \"default\" not found\r\nerror executing template \"{{with index .secrets 0}}{{.name}}{{end}}\": template: output:1:7: executing \"output\" at <index .secrets 0>: error calling index: index of untyped nil\r\n== default service account in the kube-system namespace has token Error executing template: template: output:1:7: executing \"output\" at <index .secrets 0>: error calling index: index of untyped nil. Printing more information for debugging the template:\r\n\ttemplate was:\r\n\t\t{{with index .secrets 0}}{{.name}}{{end}}\r\n\traw data was:\r\n\t\t{\"kind\":\"ServiceAccount\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"default\",\"namespace\":\"kube-system\",\"selfLink\":\"/api/v1/namespaces/kube-system/serviceaccounts/default\",\"uid\":\"de3f2f85-9d6a-11e6-9df3-42010af00002\",\"resourceVersion\":\"48\",\"creationTimestamp\":\"2016-10-29T00:01:40Z\"}}\r\n\tobject given to template engine was:\r\n\t\tmap[apiVersion:v1 metadata:map[selfLink:/api/v1/namespaces/kube-system/serviceaccounts/default uid:de3f2f85-9d6a-11e6-9df3-42010af00002 resourceVersion:48 creationTimestamp:2016-10-29T00:01:40Z name:default namespace:kube-system] kind:ServiceAccount] ==\r\n```\r\n\r\nSeems like the script failed to retrieve service token at the first time and mistakenly used the error message as the token content. Fixes by replacing `|| true` with if condition.\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/35886)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/257453989","html_url":"https://github.com/kubernetes/kubernetes/pull/35886#issuecomment-257453989","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/35886","id":257453989,"user":{"login":"MrHohn","id":8681801,"avatar_url":"https://avatars.githubusercontent.com/u/8681801?v=3","gravatar_id":"","url":"https://api.github.com/users/MrHohn","html_url":"https://github.com/MrHohn","followers_url":"https://api.github.com/users/MrHohn/followers","following_url":"https://api.github.com/users/MrHohn/following{/other_user}","gists_url":"https://api.github.com/users/MrHohn/gists{/gist_id}","starred_url":"https://api.github.com/users/MrHohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrHohn/subscriptions","organizations_url":"https://api.github.com/users/MrHohn/orgs","repos_url":"https://api.github.com/users/MrHohn/repos","events_url":"https://api.github.com/users/MrHohn/events{/privacy}","received_events_url":"https://api.github.com/users/MrHohn/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T23:54:13Z","updated_at":"2016-10-31T23:54:13Z","body":"@mikedanese "}}
{"actor":{"display_login":"MrHohn"}}