{"action":"created","comment":{"url":"https://api.github.com/repos/operator-framework/operator-registry/pulls/comments/226396219","pull_request_review_id":166209650,"id":226396219,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjM5NjIxOQ==","diff_hunk":"@@ -0,0 +1,162 @@\n+package sqlite\n+\n+import (\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\t\"strings\"\n+\n+\t\"github.com/ghodss/yaml\"\n+\t\"github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1\"\n+\t\"github.com/operator-framework/operator-registry/pkg/registry\"\n+\t\"github.com/sirupsen/logrus\"\n+\t\"k8s.io/api/core/v1\"\n+\t\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1\"\n+\t\"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured\"\n+\t\"k8s.io/apimachinery/pkg/runtime\"\n+)\n+\n+const (\n+\tConfigMapCRDName     = \"customResourceDefinitions\"\n+\tConfigMapCSVName     = \"clusterServiceVersions\"\n+\tConfigMapPackageName = \"packages\"\n+)\n+\n+// ConfigMapLoader loads a configmap of resources into the database\n+// entries under \"customResourceDefinitions\" will be parsed as CRDs\n+// entries under \"clusterServiceVersions\"  will be parsed as CSVs\n+// entries under \"packages\" will be parsed as Packages\n+type ConfigMapLoader struct {\n+\tstore     registry.Load\n+\tconfigMap v1.ConfigMap\n+\tcrds      map[registry.APIKey]*unstructured.Unstructured\n+}\n+\n+var _ SQLPopulator = &ConfigMapLoader{}\n+\n+func NewSQLLoaderForConfigMap(store registry.Load, configMap v1.ConfigMap) *ConfigMapLoader {","path":"pkg/sqlite/configmap.go","position":36,"original_position":36,"commit_id":"57d83644b39779c9f25c55c16b6eb3b9053d7f90","original_commit_id":"57d83644b39779c9f25c55c16b6eb3b9053d7f90","user":{"login":"alecmerdler","id":11700385,"node_id":"MDQ6VXNlcjExNzAwMzg1","avatar_url":"https://avatars2.githubusercontent.com/u/11700385?v=4","gravatar_id":"","url":"https://api.github.com/users/alecmerdler","html_url":"https://github.com/alecmerdler","followers_url":"https://api.github.com/users/alecmerdler/followers","following_url":"https://api.github.com/users/alecmerdler/following{/other_user}","gists_url":"https://api.github.com/users/alecmerdler/gists{/gist_id}","starred_url":"https://api.github.com/users/alecmerdler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alecmerdler/subscriptions","organizations_url":"https://api.github.com/users/alecmerdler/orgs","repos_url":"https://api.github.com/users/alecmerdler/repos","events_url":"https://api.github.com/users/alecmerdler/events{/privacy}","received_events_url":"https://api.github.com/users/alecmerdler/received_events","type":"User","site_admin":false},"body":"Wouldn't it be better to remove the intermediate `ConfigMap` and just consume a directory of manifests? Since the `ConfigMap` will probably be too large to `kubectl create` anyway?","created_at":"2018-10-18T17:28:00Z","updated_at":"2018-10-18T17:28:00Z","html_url":"https://github.com/operator-framework/operator-registry/pull/3#discussion_r226396219","pull_request_url":"https://api.github.com/repos/operator-framework/operator-registry/pulls/3","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/operator-framework/operator-registry/pulls/comments/226396219"},"html":{"href":"https://github.com/operator-framework/operator-registry/pull/3#discussion_r226396219"},"pull_request":{"href":"https://api.github.com/repos/operator-framework/operator-registry/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/operator-framework/operator-registry/pulls/3","id":224035081,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MDM1MDgx","html_url":"https://github.com/operator-framework/operator-registry/pull/3","diff_url":"https://github.com/operator-framework/operator-registry/pull/3.diff","patch_url":"https://github.com/operator-framework/operator-registry/pull/3.patch","issue_url":"https://api.github.com/repos/operator-framework/operator-registry/issues/3","number":3,"state":"open","locked":false,"title":"feat(configmap): add configmap loader","user":{"login":"ecordell","id":58055,"node_id":"MDQ6VXNlcjU4MDU1","avatar_url":"https://avatars3.githubusercontent.com/u/58055?v=4","gravatar_id":"","url":"https://api.github.com/users/ecordell","html_url":"https://github.com/ecordell","followers_url":"https://api.github.com/users/ecordell/followers","following_url":"https://api.github.com/users/ecordell/following{/other_user}","gists_url":"https://api.github.com/users/ecordell/gists{/gist_id}","starred_url":"https://api.github.com/users/ecordell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecordell/subscriptions","organizations_url":"https://api.github.com/users/ecordell/orgs","repos_url":"https://api.github.com/users/ecordell/repos","events_url":"https://api.github.com/users/ecordell/events{/privacy}","received_events_url":"https://api.github.com/users/ecordell/received_events","type":"User","site_admin":false},"body":"This is to support the older catalog format, which stores data in a configmap.\r\n\r\nOLM will use this to interact with configmaps and catalog images using the same interface.","created_at":"2018-10-18T17:19:57Z","updated_at":"2018-10-18T17:28:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d2333c559ea1faba0682543856ae327da98c4c7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"njhale","id":4175918,"node_id":"MDQ6VXNlcjQxNzU5MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/4175918?v=4","gravatar_id":"","url":"https://api.github.com/users/njhale","html_url":"https://github.com/njhale","followers_url":"https://api.github.com/users/njhale/followers","following_url":"https://api.github.com/users/njhale/following{/other_user}","gists_url":"https://api.github.com/users/njhale/gists{/gist_id}","starred_url":"https://api.github.com/users/njhale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njhale/subscriptions","organizations_url":"https://api.github.com/users/njhale/orgs","repos_url":"https://api.github.com/users/njhale/repos","events_url":"https://api.github.com/users/njhale/events{/privacy}","received_events_url":"https://api.github.com/users/njhale/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/operator-framework/operator-registry/pulls/3/commits","review_comments_url":"https://api.github.com/repos/operator-framework/operator-registry/pulls/3/comments","review_comment_url":"https://api.github.com/repos/operator-framework/operator-registry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/operator-framework/operator-registry/issues/3/comments","statuses_url":"https://api.github.com/repos/operator-framework/operator-registry/statuses/57d83644b39779c9f25c55c16b6eb3b9053d7f90","head":{"label":"ecordell:configmap","ref":"configmap","sha":"57d83644b39779c9f25c55c16b6eb3b9053d7f90","user":{"login":"ecordell","id":58055,"node_id":"MDQ6VXNlcjU4MDU1","avatar_url":"https://avatars3.githubusercontent.com/u/58055?v=4","gravatar_id":"","url":"https://api.github.com/users/ecordell","html_url":"https://github.com/ecordell","followers_url":"https://api.github.com/users/ecordell/followers","following_url":"https://api.github.com/users/ecordell/following{/other_user}","gists_url":"https://api.github.com/users/ecordell/gists{/gist_id}","starred_url":"https://api.github.com/users/ecordell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecordell/subscriptions","organizations_url":"https://api.github.com/users/ecordell/orgs","repos_url":"https://api.github.com/users/ecordell/repos","events_url":"https://api.github.com/users/ecordell/events{/privacy}","received_events_url":"https://api.github.com/users/ecordell/received_events","type":"User","site_admin":false},"repo":{"id":152314996,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIzMTQ5OTY=","name":"operator-registry","full_name":"ecordell/operator-registry","private":false,"owner":{"login":"ecordell","id":58055,"node_id":"MDQ6VXNlcjU4MDU1","avatar_url":"https://avatars3.githubusercontent.com/u/58055?v=4","gravatar_id":"","url":"https://api.github.com/users/ecordell","html_url":"https://github.com/ecordell","followers_url":"https://api.github.com/users/ecordell/followers","following_url":"https://api.github.com/users/ecordell/following{/other_user}","gists_url":"https://api.github.com/users/ecordell/gists{/gist_id}","starred_url":"https://api.github.com/users/ecordell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecordell/subscriptions","organizations_url":"https://api.github.com/users/ecordell/orgs","repos_url":"https://api.github.com/users/ecordell/repos","events_url":"https://api.github.com/users/ecordell/events{/privacy}","received_events_url":"https://api.github.com/users/ecordell/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ecordell/operator-registry","description":"WIP registry for operators","fork":true,"url":"https://api.github.com/repos/ecordell/operator-registry","forks_url":"https://api.github.com/repos/ecordell/operator-registry/forks","keys_url":"https://api.github.com/repos/ecordell/operator-registry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ecordell/operator-registry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ecordell/operator-registry/teams","hooks_url":"https://api.github.com/repos/ecordell/operator-registry/hooks","issue_events_url":"https://api.github.com/repos/ecordell/operator-registry/issues/events{/number}","events_url":"https://api.github.com/repos/ecordell/operator-registry/events","assignees_url":"https://api.github.com/repos/ecordell/operator-registry/assignees{/user}","branches_url":"https://api.github.com/repos/ecordell/operator-registry/branches{/branch}","tags_url":"https://api.github.com/repos/ecordell/operator-registry/tags","blobs_url":"https://api.github.com/repos/ecordell/operator-registry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ecordell/operator-registry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ecordell/operator-registry/git/refs{/sha}","trees_url":"https://api.github.com/repos/ecordell/operator-registry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ecordell/operator-registry/statuses/{sha}","languages_url":"https://api.github.com/repos/ecordell/operator-registry/languages","stargazers_url":"https://api.github.com/repos/ecordell/operator-registry/stargazers","contributors_url":"https://api.github.com/repos/ecordell/operator-registry/contributors","subscribers_url":"https://api.github.com/repos/ecordell/operator-registry/subscribers","subscription_url":"https://api.github.com/repos/ecordell/operator-registry/subscription","commits_url":"https://api.github.com/repos/ecordell/operator-registry/commits{/sha}","git_commits_url":"https://api.github.com/repos/ecordell/operator-registry/git/commits{/sha}","comments_url":"https://api.github.com/repos/ecordell/operator-registry/comments{/number}","issue_comment_url":"https://api.github.com/repos/ecordell/operator-registry/issues/comments{/number}","contents_url":"https://api.github.com/repos/ecordell/operator-registry/contents/{+path}","compare_url":"https://api.github.com/repos/ecordell/operator-registry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ecordell/operator-registry/merges","archive_url":"https://api.github.com/repos/ecordell/operator-registry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ecordell/operator-registry/downloads","issues_url":"https://api.github.com/repos/ecordell/operator-registry/issues{/number}","pulls_url":"https://api.github.com/repos/ecordell/operator-registry/pulls{/number}","milestones_url":"https://api.github.com/repos/ecordell/operator-registry/milestones{/number}","notifications_url":"https://api.github.com/repos/ecordell/operator-registry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ecordell/operator-registry/labels{/name}","releases_url":"https://api.github.com/repos/ecordell/operator-registry/releases{/id}","deployments_url":"https://api.github.com/repos/ecordell/operator-registry/deployments","created_at":"2018-10-09T20:15:08Z","updated_at":"2018-10-09T20:15:10Z","pushed_at":"2018-10-18T17:18:48Z","git_url":"git://github.com/ecordell/operator-registry.git","ssh_url":"git@github.com:ecordell/operator-registry.git","clone_url":"https://github.com/ecordell/operator-registry.git","svn_url":"https://github.com/ecordell/operator-registry","homepage":null,"size":20550,"stargazers_count":0,"watchers_count":0,"language":null,"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":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"operator-framework:master","ref":"master","sha":"06f1c06ac03372aa94253fdf6f8fdbb59dfa3a5c","user":{"login":"operator-framework","id":38202270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MjAyMjcw","avatar_url":"https://avatars0.githubusercontent.com/u/38202270?v=4","gravatar_id":"","url":"https://api.github.com/users/operator-framework","html_url":"https://github.com/operator-framework","followers_url":"https://api.github.com/users/operator-framework/followers","following_url":"https://api.github.com/users/operator-framework/following{/other_user}","gists_url":"https://api.github.com/users/operator-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/operator-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/operator-framework/subscriptions","organizations_url":"https://api.github.com/users/operator-framework/orgs","repos_url":"https://api.github.com/users/operator-framework/repos","events_url":"https://api.github.com/users/operator-framework/events{/privacy}","received_events_url":"https://api.github.com/users/operator-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":152314982,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIzMTQ5ODI=","name":"operator-registry","full_name":"operator-framework/operator-registry","private":false,"owner":{"login":"operator-framework","id":38202270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MjAyMjcw","avatar_url":"https://avatars0.githubusercontent.com/u/38202270?v=4","gravatar_id":"","url":"https://api.github.com/users/operator-framework","html_url":"https://github.com/operator-framework","followers_url":"https://api.github.com/users/operator-framework/followers","following_url":"https://api.github.com/users/operator-framework/following{/other_user}","gists_url":"https://api.github.com/users/operator-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/operator-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/operator-framework/subscriptions","organizations_url":"https://api.github.com/users/operator-framework/orgs","repos_url":"https://api.github.com/users/operator-framework/repos","events_url":"https://api.github.com/users/operator-framework/events{/privacy}","received_events_url":"https://api.github.com/users/operator-framework/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/operator-framework/operator-registry","description":"WIP registry for operators","fork":false,"url":"https://api.github.com/repos/operator-framework/operator-registry","forks_url":"https://api.github.com/repos/operator-framework/operator-registry/forks","keys_url":"https://api.github.com/repos/operator-framework/operator-registry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/operator-framework/operator-registry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/operator-framework/operator-registry/teams","hooks_url":"https://api.github.com/repos/operator-framework/operator-registry/hooks","issue_events_url":"https://api.github.com/repos/operator-framework/operator-registry/issues/events{/number}","events_url":"https://api.github.com/repos/operator-framework/operator-registry/events","assignees_url":"https://api.github.com/repos/operator-framework/operator-registry/assignees{/user}","branches_url":"https://api.github.com/repos/operator-framework/operator-registry/branches{/branch}","tags_url":"https://api.github.com/repos/operator-framework/operator-registry/tags","blobs_url":"https://api.github.com/repos/operator-framework/operator-registry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/operator-framework/operator-registry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/operator-framework/operator-registry/git/refs{/sha}","trees_url":"https://api.github.com/repos/operator-framework/operator-registry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/operator-framework/operator-registry/statuses/{sha}","languages_url":"https://api.github.com/repos/operator-framework/operator-registry/languages","stargazers_url":"https://api.github.com/repos/operator-framework/operator-registry/stargazers","contributors_url":"https://api.github.com/repos/operator-framework/operator-registry/contributors","subscribers_url":"https://api.github.com/repos/operator-framework/operator-registry/subscribers","subscription_url":"https://api.github.com/repos/operator-framework/operator-registry/subscription","commits_url":"https://api.github.com/repos/operator-framework/operator-registry/commits{/sha}","git_commits_url":"https://api.github.com/repos/operator-framework/operator-registry/git/commits{/sha}","comments_url":"https://api.github.com/repos/operator-framework/operator-registry/comments{/number}","issue_comment_url":"https://api.github.com/repos/operator-framework/operator-registry/issues/comments{/number}","contents_url":"https://api.github.com/repos/operator-framework/operator-registry/contents/{+path}","compare_url":"https://api.github.com/repos/operator-framework/operator-registry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/operator-framework/operator-registry/merges","archive_url":"https://api.github.com/repos/operator-framework/operator-registry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/operator-framework/operator-registry/downloads","issues_url":"https://api.github.com/repos/operator-framework/operator-registry/issues{/number}","pulls_url":"https://api.github.com/repos/operator-framework/operator-registry/pulls{/number}","milestones_url":"https://api.github.com/repos/operator-framework/operator-registry/milestones{/number}","notifications_url":"https://api.github.com/repos/operator-framework/operator-registry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/operator-framework/operator-registry/labels{/name}","releases_url":"https://api.github.com/repos/operator-framework/operator-registry/releases{/id}","deployments_url":"https://api.github.com/repos/operator-framework/operator-registry/deployments","created_at":"2018-10-09T20:14:58Z","updated_at":"2018-10-12T20:03:32Z","pushed_at":"2018-10-18T17:19:58Z","git_url":"git://github.com/operator-framework/operator-registry.git","ssh_url":"git@github.com:operator-framework/operator-registry.git","clone_url":"https://github.com/operator-framework/operator-registry.git","svn_url":"https://github.com/operator-framework/operator-registry","homepage":null,"size":20548,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"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","node_id":"MDc6TGljZW5zZTI="},"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/operator-framework/operator-registry/pulls/3"},"html":{"href":"https://github.com/operator-framework/operator-registry/pull/3"},"issue":{"href":"https://api.github.com/repos/operator-framework/operator-registry/issues/3"},"comments":{"href":"https://api.github.com/repos/operator-framework/operator-registry/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/operator-framework/operator-registry/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/operator-framework/operator-registry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/operator-framework/operator-registry/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/operator-framework/operator-registry/statuses/57d83644b39779c9f25c55c16b6eb3b9053d7f90"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alecmerdler"}}