{"action":"created","comment":{"url":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/comments/149117834","pull_request_review_id":74461804,"id":149117834,"diff_hunk":"@@ -0,0 +1,73 @@\n+package configmap\n+\n+import (\n+\t\"context\"\n+\t\"fmt\"\n+\n+\t\"github.com/giantswarm/microerror\"\n+\tapierrors \"k8s.io/apimachinery/pkg/api/errors\"\n+\tapiv1 \"k8s.io/client-go/pkg/api/v1\"\n+\n+\t\"github.com/giantswarm/kvm-operator/service/key\"\n+)\n+\n+func (r *Resource) ApplyCreateChange(ctx context.Context, obj, createChange interface{}) error {\n+\tcustomObject, err := key.ToCustomObject(obj)\n+\tif err != nil {\n+\t\treturn microerror.Mask(err)\n+\t}\n+\tconfigMapsToCreate, err := toConfigMaps(createChange)\n+\tif err != nil {\n+\t\treturn microerror.Mask(err)\n+\t}\n+\n+\t// Create the config maps in the Kubernetes API.\n+\tif len(configMapsToCreate) != 0 {\n+\t\tr.logger.Log(\"cluster\", key.ClusterID(customObject), \"debug\", \"creating the config maps in the Kubernetes API\")\n+\n+\t\tnamespace := key.ClusterNamespace(customObject)\n+\t\tfor _, configMap := range configMapsToCreate {\n+\t\t\t_, err := r.k8sClient.CoreV1().ConfigMaps(namespace).Create(configMap)\n+\t\t\tif apierrors.IsAlreadyExists(err) {\n+\t\t\t\t// fall through","path":"service/resource/configmap/create.go","position":32,"original_position":32,"commit_id":"f0f93c4e04bbe45de0f58bb67f1e627e234eb24a","original_commit_id":"f0f93c4e04bbe45de0f58bb67f1e627e234eb24a","user":{"login":"xh3b4sd","id":552769,"avatar_url":"https://avatars3.githubusercontent.com/u/552769?v=4","gravatar_id":"","url":"https://api.github.com/users/xh3b4sd","html_url":"https://github.com/xh3b4sd","followers_url":"https://api.github.com/users/xh3b4sd/followers","following_url":"https://api.github.com/users/xh3b4sd/following{/other_user}","gists_url":"https://api.github.com/users/xh3b4sd/gists{/gist_id}","starred_url":"https://api.github.com/users/xh3b4sd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xh3b4sd/subscriptions","organizations_url":"https://api.github.com/users/xh3b4sd/orgs","repos_url":"https://api.github.com/users/xh3b4sd/repos","events_url":"https://api.github.com/users/xh3b4sd/events{/privacy}","received_events_url":"https://api.github.com/users/xh3b4sd/received_events","type":"User","site_admin":false},"body":"Uncertain. This is actually just moving code. I would keep it as it is. I am undecided if this is something we should worry about. If we do not care about this special case we should just remove the extra branch of the condition. ","created_at":"2017-11-06T15:52:38Z","updated_at":"2017-11-06T15:52:38Z","html_url":"https://github.com/giantswarm/kvm-operator/pull/235#discussion_r149117834","pull_request_url":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/235","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/comments/149117834"},"html":{"href":"https://github.com/giantswarm/kvm-operator/pull/235#discussion_r149117834"},"pull_request":{"href":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/235"}},"in_reply_to_id":149115503},"pull_request":{"url":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/235","id":150882693,"html_url":"https://github.com/giantswarm/kvm-operator/pull/235","diff_url":"https://github.com/giantswarm/kvm-operator/pull/235.diff","patch_url":"https://github.com/giantswarm/kvm-operator/pull/235.patch","issue_url":"https://api.github.com/repos/giantswarm/kvm-operator/issues/235","number":235,"state":"open","locked":false,"title":"separated config map resource into multiple files","user":{"login":"xh3b4sd","id":552769,"avatar_url":"https://avatars3.githubusercontent.com/u/552769?v=4","gravatar_id":"","url":"https://api.github.com/users/xh3b4sd","html_url":"https://github.com/xh3b4sd","followers_url":"https://api.github.com/users/xh3b4sd/followers","following_url":"https://api.github.com/users/xh3b4sd/following{/other_user}","gists_url":"https://api.github.com/users/xh3b4sd/gists{/gist_id}","starred_url":"https://api.github.com/users/xh3b4sd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xh3b4sd/subscriptions","organizations_url":"https://api.github.com/users/xh3b4sd/orgs","repos_url":"https://api.github.com/users/xh3b4sd/repos","events_url":"https://api.github.com/users/xh3b4sd/events{/privacy}","received_events_url":"https://api.github.com/users/xh3b4sd/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-06T15:34:44Z","updated_at":"2017-11-06T15:52:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4f71c12f82bff453f673a7d4cda8637f90e2743","assignee":{"login":"xh3b4sd","id":552769,"avatar_url":"https://avatars3.githubusercontent.com/u/552769?v=4","gravatar_id":"","url":"https://api.github.com/users/xh3b4sd","html_url":"https://github.com/xh3b4sd","followers_url":"https://api.github.com/users/xh3b4sd/followers","following_url":"https://api.github.com/users/xh3b4sd/following{/other_user}","gists_url":"https://api.github.com/users/xh3b4sd/gists{/gist_id}","starred_url":"https://api.github.com/users/xh3b4sd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xh3b4sd/subscriptions","organizations_url":"https://api.github.com/users/xh3b4sd/orgs","repos_url":"https://api.github.com/users/xh3b4sd/repos","events_url":"https://api.github.com/users/xh3b4sd/events{/privacy}","received_events_url":"https://api.github.com/users/xh3b4sd/received_events","type":"User","site_admin":false},"assignees":[{"login":"xh3b4sd","id":552769,"avatar_url":"https://avatars3.githubusercontent.com/u/552769?v=4","gravatar_id":"","url":"https://api.github.com/users/xh3b4sd","html_url":"https://github.com/xh3b4sd","followers_url":"https://api.github.com/users/xh3b4sd/followers","following_url":"https://api.github.com/users/xh3b4sd/following{/other_user}","gists_url":"https://api.github.com/users/xh3b4sd/gists{/gist_id}","starred_url":"https://api.github.com/users/xh3b4sd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xh3b4sd/subscriptions","organizations_url":"https://api.github.com/users/xh3b4sd/orgs","repos_url":"https://api.github.com/users/xh3b4sd/repos","events_url":"https://api.github.com/users/xh3b4sd/events{/privacy}","received_events_url":"https://api.github.com/users/xh3b4sd/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"kopiczko","id":4608994,"avatar_url":"https://avatars0.githubusercontent.com/u/4608994?v=4","gravatar_id":"","url":"https://api.github.com/users/kopiczko","html_url":"https://github.com/kopiczko","followers_url":"https://api.github.com/users/kopiczko/followers","following_url":"https://api.github.com/users/kopiczko/following{/other_user}","gists_url":"https://api.github.com/users/kopiczko/gists{/gist_id}","starred_url":"https://api.github.com/users/kopiczko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopiczko/subscriptions","organizations_url":"https://api.github.com/users/kopiczko/orgs","repos_url":"https://api.github.com/users/kopiczko/repos","events_url":"https://api.github.com/users/kopiczko/events{/privacy}","received_events_url":"https://api.github.com/users/kopiczko/received_events","type":"User","site_admin":false},{"login":"MarcelMue","id":9303709,"avatar_url":"https://avatars1.githubusercontent.com/u/9303709?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcelMue","html_url":"https://github.com/MarcelMue","followers_url":"https://api.github.com/users/MarcelMue/followers","following_url":"https://api.github.com/users/MarcelMue/following{/other_user}","gists_url":"https://api.github.com/users/MarcelMue/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcelMue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcelMue/subscriptions","organizations_url":"https://api.github.com/users/MarcelMue/orgs","repos_url":"https://api.github.com/users/MarcelMue/repos","events_url":"https://api.github.com/users/MarcelMue/events{/privacy}","received_events_url":"https://api.github.com/users/MarcelMue/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/235/commits","review_comments_url":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/235/comments","review_comment_url":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/giantswarm/kvm-operator/issues/235/comments","statuses_url":"https://api.github.com/repos/giantswarm/kvm-operator/statuses/f0f93c4e04bbe45de0f58bb67f1e627e234eb24a","head":{"label":"giantswarm:separate","ref":"separate","sha":"f0f93c4e04bbe45de0f58bb67f1e627e234eb24a","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":74021543,"name":"kvm-operator","full_name":"giantswarm/kvm-operator","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/kvm-operator","description":"Handles Kubernetes clusters running on a Kubernetes cluster with workers and masters in KVMs on bare metal","fork":false,"url":"https://api.github.com/repos/giantswarm/kvm-operator","forks_url":"https://api.github.com/repos/giantswarm/kvm-operator/forks","keys_url":"https://api.github.com/repos/giantswarm/kvm-operator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/kvm-operator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/kvm-operator/teams","hooks_url":"https://api.github.com/repos/giantswarm/kvm-operator/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/kvm-operator/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/kvm-operator/events","assignees_url":"https://api.github.com/repos/giantswarm/kvm-operator/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/kvm-operator/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/kvm-operator/tags","blobs_url":"https://api.github.com/repos/giantswarm/kvm-operator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/kvm-operator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/kvm-operator/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/kvm-operator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/kvm-operator/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/kvm-operator/languages","stargazers_url":"https://api.github.com/repos/giantswarm/kvm-operator/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/kvm-operator/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/kvm-operator/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/kvm-operator/subscription","commits_url":"https://api.github.com/repos/giantswarm/kvm-operator/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/kvm-operator/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/kvm-operator/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/kvm-operator/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/kvm-operator/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/kvm-operator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/kvm-operator/merges","archive_url":"https://api.github.com/repos/giantswarm/kvm-operator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/kvm-operator/downloads","issues_url":"https://api.github.com/repos/giantswarm/kvm-operator/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/kvm-operator/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/kvm-operator/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/kvm-operator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/kvm-operator/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/kvm-operator/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/kvm-operator/deployments","created_at":"2016-11-17T11:40:50Z","updated_at":"2017-10-31T06:51:40Z","pushed_at":"2017-11-06T15:34:45Z","git_url":"git://github.com/giantswarm/kvm-operator.git","ssh_url":"git@github.com:giantswarm/kvm-operator.git","clone_url":"https://github.com/giantswarm/kvm-operator.git","svn_url":"https://github.com/giantswarm/kvm-operator","homepage":"https://giantswarm.io","size":22320,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":5,"default_branch":"master"}},"base":{"label":"giantswarm:master","ref":"master","sha":"8824a86151cfab70f514bc04af4591f1b2fc1a73","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":74021543,"name":"kvm-operator","full_name":"giantswarm/kvm-operator","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/kvm-operator","description":"Handles Kubernetes clusters running on a Kubernetes cluster with workers and masters in KVMs on bare metal","fork":false,"url":"https://api.github.com/repos/giantswarm/kvm-operator","forks_url":"https://api.github.com/repos/giantswarm/kvm-operator/forks","keys_url":"https://api.github.com/repos/giantswarm/kvm-operator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/kvm-operator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/kvm-operator/teams","hooks_url":"https://api.github.com/repos/giantswarm/kvm-operator/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/kvm-operator/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/kvm-operator/events","assignees_url":"https://api.github.com/repos/giantswarm/kvm-operator/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/kvm-operator/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/kvm-operator/tags","blobs_url":"https://api.github.com/repos/giantswarm/kvm-operator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/kvm-operator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/kvm-operator/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/kvm-operator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/kvm-operator/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/kvm-operator/languages","stargazers_url":"https://api.github.com/repos/giantswarm/kvm-operator/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/kvm-operator/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/kvm-operator/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/kvm-operator/subscription","commits_url":"https://api.github.com/repos/giantswarm/kvm-operator/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/kvm-operator/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/kvm-operator/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/kvm-operator/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/kvm-operator/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/kvm-operator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/kvm-operator/merges","archive_url":"https://api.github.com/repos/giantswarm/kvm-operator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/kvm-operator/downloads","issues_url":"https://api.github.com/repos/giantswarm/kvm-operator/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/kvm-operator/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/kvm-operator/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/kvm-operator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/kvm-operator/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/kvm-operator/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/kvm-operator/deployments","created_at":"2016-11-17T11:40:50Z","updated_at":"2017-10-31T06:51:40Z","pushed_at":"2017-11-06T15:34:45Z","git_url":"git://github.com/giantswarm/kvm-operator.git","ssh_url":"git@github.com:giantswarm/kvm-operator.git","clone_url":"https://github.com/giantswarm/kvm-operator.git","svn_url":"https://github.com/giantswarm/kvm-operator","homepage":"https://giantswarm.io","size":22320,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/235"},"html":{"href":"https://github.com/giantswarm/kvm-operator/pull/235"},"issue":{"href":"https://api.github.com/repos/giantswarm/kvm-operator/issues/235"},"comments":{"href":"https://api.github.com/repos/giantswarm/kvm-operator/issues/235/comments"},"review_comments":{"href":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/235/comments"},"review_comment":{"href":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/giantswarm/kvm-operator/pulls/235/commits"},"statuses":{"href":"https://api.github.com/repos/giantswarm/kvm-operator/statuses/f0f93c4e04bbe45de0f58bb67f1e627e234eb24a"}},"author_association":"OWNER"}}
{"actor":{"display_login":"xh3b4sd"}}