{"action":"created","comment":{"url":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/comments/217108509","pull_request_review_id":154744568,"id":217108509,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzEwODUwOQ==","diff_hunk":"@@ -0,0 +1,78 @@\n+## Ansible Operator Proposal\n+\n+### Background\n+\n+Not everyone is a golang developer, and therefore gaining adoption for the operator-sdk is capped by the number of golang developers. Also, tooling for kubernetes in other languages is lacking support for things such as informers,  caches, and listers.  \n+\n+Operators purpose is to codify the operations of an application on kubernetes. [Ansible](https://www.ansible.com/) is already an industry standard tool for automation and is a good fit for the kind of work that kubernetes operators need to do. Adding the ability for users of the SDK to choose which between ansible and golang to follow will increase the number of potential users, and will grant existing users even more behavior. \n+\n+### Goals\n+\n+The goal of the Ansible Operator will be to create a fully functional framework for Ansible developers to create operators. It will also expose a library for golang users to use ansible in their operator if they so choose. These two goals in conjunction will allow users to select the best technology for their project or skillset. \n+\n+### New Operator Type\n+\n+This proposal creates a new type of operator called `ansible`.  The new type is used to tell the tooling to act on that type of operator. \n+\n+### Package Structure\n+Packages will be added to the operator-sdk. These packages are designed to be usable by the end user if they choose to and should have a well documented public API. The proposed packages are:\n+* /operator-sdk/pkg/ansible/controller\n+  * Will contain the ansible operator controller.\n+  * Will contain a exposed reconciler. But the default `Add` method will use this reconciler.\n+* /operator-sdk/pkg/ansible/runner\n+  * Contains the runner types and interfaces\n+  * Implementation is behind an internal package (/operator-sdk/pkg/ansible/runner/internal)\n+  * New Methods are exposed and are the main way a user interacts with the package\n+  * Runner interface for running ansible from the operator.\n+  * NewForWatchers - the method that returns a map of GVK to Runner types based on the watchers file.\n+  * NewPlaybookRunner - the method that returns a new Runner for a playbook.\n+  * NewRoleRunner - the method that returns a new Runner for a role.\n+  * This contains the events API code and public methods. Implementation should probably be in the internal package. The events API is used for recieving events from ansible runner.\n+\n+* /operator-sdk/pkg/ansible/proxy\n+  * This is a reverse proxy for the kubernetes API that is used for owner reference injection.\n+* /operator-sdk/pkg/ansible/proxy/kubeconfig\n+  * Code needed to generate the kubeconfig for the proxy.\n+* /operator-sdk/pkg/ansible/events\n+  * Package for event handlers from ansible runner events.\n+  * Default has only the event logger.\n+\n+\n+### Commands\n+We are adding and updating existing commands to accommodate the ansible operator.  Changes to the `cmd` package as well as changes to the generator are needed.\n+\n+`operator-sdk new <project-name> --type ansible --kind <kind> --api-version <group/version>`  This will be a new generation command under the hood. We will:\n+* Create a new ansible role in the roles directory\n+* Create a new watchers file. The role and GVK are defaulted based on input to the command.\n+* A CRD is generated. This CRD does not have any validations defined.\n+* A dockerfile is created using the watchers file and the ansible role with the base image being the ansible operator base image.\n+\n+The resulting structure should be\n+```\n+|- Dockerfile\n+|\n+|- roles\n+\\ | - <kind>\n+|  \\ | - generated ansible role\n+|\n+| - watchers.yaml","path":"doc/proposals/ansible-operator.md","position":58,"original_position":58,"commit_id":"4912b86d9e678c4b0ca1ace6c5cb6fc3bda72151","original_commit_id":"4912b86d9e678c4b0ca1ace6c5cb6fc3bda72151","user":{"login":"shawn-hurley","id":1891063,"node_id":"MDQ6VXNlcjE4OTEwNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1891063?v=4","gravatar_id":"","url":"https://api.github.com/users/shawn-hurley","html_url":"https://github.com/shawn-hurley","followers_url":"https://api.github.com/users/shawn-hurley/followers","following_url":"https://api.github.com/users/shawn-hurley/following{/other_user}","gists_url":"https://api.github.com/users/shawn-hurley/gists{/gist_id}","starred_url":"https://api.github.com/users/shawn-hurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawn-hurley/subscriptions","organizations_url":"https://api.github.com/users/shawn-hurley/orgs","repos_url":"https://api.github.com/users/shawn-hurley/repos","events_url":"https://api.github.com/users/shawn-hurley/events{/privacy}","received_events_url":"https://api.github.com/users/shawn-hurley/received_events","type":"User","site_admin":false},"body":"yes, oops 🤦‍♂️ ","created_at":"2018-09-12T16:47:34Z","updated_at":"2018-09-12T16:47:34Z","html_url":"https://github.com/operator-framework/operator-sdk/pull/430#discussion_r217108509","pull_request_url":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/430","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/comments/217108509"},"html":{"href":"https://github.com/operator-framework/operator-sdk/pull/430#discussion_r217108509"},"pull_request":{"href":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/430"}},"in_reply_to_id":217098859},"pull_request":{"url":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/430","id":211086510,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMDg2NTEw","html_url":"https://github.com/operator-framework/operator-sdk/pull/430","diff_url":"https://github.com/operator-framework/operator-sdk/pull/430.diff","patch_url":"https://github.com/operator-framework/operator-sdk/pull/430.patch","issue_url":"https://api.github.com/repos/operator-framework/operator-sdk/issues/430","number":430,"state":"closed","locked":false,"title":"doc/proposal: Ansible Operator proposal","user":{"login":"shawn-hurley","id":1891063,"node_id":"MDQ6VXNlcjE4OTEwNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1891063?v=4","gravatar_id":"","url":"https://api.github.com/users/shawn-hurley","html_url":"https://github.com/shawn-hurley","followers_url":"https://api.github.com/users/shawn-hurley/followers","following_url":"https://api.github.com/users/shawn-hurley/following{/other_user}","gists_url":"https://api.github.com/users/shawn-hurley/gists{/gist_id}","starred_url":"https://api.github.com/users/shawn-hurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawn-hurley/subscriptions","organizations_url":"https://api.github.com/users/shawn-hurley/orgs","repos_url":"https://api.github.com/users/shawn-hurley/repos","events_url":"https://api.github.com/users/shawn-hurley/events{/privacy}","received_events_url":"https://api.github.com/users/shawn-hurley/received_events","type":"User","site_admin":false},"body":"* Describes how the library packages of ansible operator\r\nwill be layed out\r\n* New commands to manage ansible operators.","created_at":"2018-08-27T11:53:21Z","updated_at":"2018-09-12T16:47:34Z","closed_at":"2018-09-11T22:49:11Z","merged_at":"2018-09-11T22:49:11Z","merge_commit_sha":"a2f2edd459073ecb6965b759f4f34aba9ba1fde3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/430/commits","review_comments_url":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/430/comments","review_comment_url":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/operator-framework/operator-sdk/issues/430/comments","statuses_url":"https://api.github.com/repos/operator-framework/operator-sdk/statuses/4912b86d9e678c4b0ca1ace6c5cb6fc3bda72151","head":{"label":"shawn-hurley:proposal/ansible-operator","ref":"proposal/ansible-operator","sha":"4912b86d9e678c4b0ca1ace6c5cb6fc3bda72151","user":{"login":"shawn-hurley","id":1891063,"node_id":"MDQ6VXNlcjE4OTEwNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1891063?v=4","gravatar_id":"","url":"https://api.github.com/users/shawn-hurley","html_url":"https://github.com/shawn-hurley","followers_url":"https://api.github.com/users/shawn-hurley/followers","following_url":"https://api.github.com/users/shawn-hurley/following{/other_user}","gists_url":"https://api.github.com/users/shawn-hurley/gists{/gist_id}","starred_url":"https://api.github.com/users/shawn-hurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawn-hurley/subscriptions","organizations_url":"https://api.github.com/users/shawn-hurley/orgs","repos_url":"https://api.github.com/users/shawn-hurley/repos","events_url":"https://api.github.com/users/shawn-hurley/events{/privacy}","received_events_url":"https://api.github.com/users/shawn-hurley/received_events","type":"User","site_admin":false},"repo":{"id":133418669,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM0MTg2Njk=","name":"operator-sdk","full_name":"shawn-hurley/operator-sdk","owner":{"login":"shawn-hurley","id":1891063,"node_id":"MDQ6VXNlcjE4OTEwNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1891063?v=4","gravatar_id":"","url":"https://api.github.com/users/shawn-hurley","html_url":"https://github.com/shawn-hurley","followers_url":"https://api.github.com/users/shawn-hurley/followers","following_url":"https://api.github.com/users/shawn-hurley/following{/other_user}","gists_url":"https://api.github.com/users/shawn-hurley/gists{/gist_id}","starred_url":"https://api.github.com/users/shawn-hurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawn-hurley/subscriptions","organizations_url":"https://api.github.com/users/shawn-hurley/orgs","repos_url":"https://api.github.com/users/shawn-hurley/repos","events_url":"https://api.github.com/users/shawn-hurley/events{/privacy}","received_events_url":"https://api.github.com/users/shawn-hurley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shawn-hurley/operator-sdk","description":"SDK for building Kubernetes applications. Provides high level APIs, useful abstractions, and project scaffolding.","fork":true,"url":"https://api.github.com/repos/shawn-hurley/operator-sdk","forks_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/forks","keys_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/teams","hooks_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/hooks","issue_events_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/events","assignees_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/tags","blobs_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/languages","stargazers_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/stargazers","contributors_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/contributors","subscribers_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/subscribers","subscription_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/subscription","commits_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/merges","archive_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/downloads","issues_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/labels{/name}","releases_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/shawn-hurley/operator-sdk/deployments","created_at":"2018-05-14T20:38:45Z","updated_at":"2018-05-23T13:46:20Z","pushed_at":"2018-09-11T20:31:00Z","git_url":"git://github.com/shawn-hurley/operator-sdk.git","ssh_url":"git@github.com:shawn-hurley/operator-sdk.git","clone_url":"https://github.com/shawn-hurley/operator-sdk.git","svn_url":"https://github.com/shawn-hurley/operator-sdk","homepage":"https://coreos.com/operators","size":1077,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"b3413a692ccfc922aa3eb0c6c79714e12e67f72f","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":120650407,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA2NTA0MDc=","name":"operator-sdk","full_name":"operator-framework/operator-sdk","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},"private":false,"html_url":"https://github.com/operator-framework/operator-sdk","description":"SDK for building Kubernetes applications. Provides high level APIs, useful abstractions, and project scaffolding.","fork":false,"url":"https://api.github.com/repos/operator-framework/operator-sdk","forks_url":"https://api.github.com/repos/operator-framework/operator-sdk/forks","keys_url":"https://api.github.com/repos/operator-framework/operator-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/operator-framework/operator-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/operator-framework/operator-sdk/teams","hooks_url":"https://api.github.com/repos/operator-framework/operator-sdk/hooks","issue_events_url":"https://api.github.com/repos/operator-framework/operator-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/operator-framework/operator-sdk/events","assignees_url":"https://api.github.com/repos/operator-framework/operator-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/operator-framework/operator-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/operator-framework/operator-sdk/tags","blobs_url":"https://api.github.com/repos/operator-framework/operator-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/operator-framework/operator-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/operator-framework/operator-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/operator-framework/operator-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/operator-framework/operator-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/operator-framework/operator-sdk/languages","stargazers_url":"https://api.github.com/repos/operator-framework/operator-sdk/stargazers","contributors_url":"https://api.github.com/repos/operator-framework/operator-sdk/contributors","subscribers_url":"https://api.github.com/repos/operator-framework/operator-sdk/subscribers","subscription_url":"https://api.github.com/repos/operator-framework/operator-sdk/subscription","commits_url":"https://api.github.com/repos/operator-framework/operator-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/operator-framework/operator-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/operator-framework/operator-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/operator-framework/operator-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/operator-framework/operator-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/operator-framework/operator-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/operator-framework/operator-sdk/merges","archive_url":"https://api.github.com/repos/operator-framework/operator-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/operator-framework/operator-sdk/downloads","issues_url":"https://api.github.com/repos/operator-framework/operator-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/operator-framework/operator-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/operator-framework/operator-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/operator-framework/operator-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/operator-framework/operator-sdk/labels{/name}","releases_url":"https://api.github.com/repos/operator-framework/operator-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/operator-framework/operator-sdk/deployments","created_at":"2018-02-07T17:53:51Z","updated_at":"2018-09-11T22:49:15Z","pushed_at":"2018-09-11T22:49:12Z","git_url":"git://github.com/operator-framework/operator-sdk.git","ssh_url":"git@github.com:operator-framework/operator-sdk.git","clone_url":"https://github.com/operator-framework/operator-sdk.git","svn_url":"https://github.com/operator-framework/operator-sdk","homepage":"https://coreos.com/operators","size":1017,"stargazers_count":778,"watchers_count":778,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":133,"mirror_url":null,"archived":false,"open_issues_count":85,"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":133,"open_issues":85,"watchers":778,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/430"},"html":{"href":"https://github.com/operator-framework/operator-sdk/pull/430"},"issue":{"href":"https://api.github.com/repos/operator-framework/operator-sdk/issues/430"},"comments":{"href":"https://api.github.com/repos/operator-framework/operator-sdk/issues/430/comments"},"review_comments":{"href":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/430/comments"},"review_comment":{"href":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/operator-framework/operator-sdk/pulls/430/commits"},"statuses":{"href":"https://api.github.com/repos/operator-framework/operator-sdk/statuses/4912b86d9e678c4b0ca1ace6c5cb6fc3bda72151"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"shawn-hurley"}}