{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/31650","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/31650/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/31650/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/31650/events","html_url":"https://github.com/ansible/ansible/pull/31650","id":265025313,"node_id":"MDExOlB1bGxSZXF1ZXN0MTQ2MjY5NjM2","number":31650,"title":"Add 'apply' state, statefulset resource to kubernetes module","user":{"login":"jfrabaute","id":100247,"node_id":"MDQ6VXNlcjEwMDI0Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/100247?v=4","gravatar_id":"","url":"https://api.github.com/users/jfrabaute","html_url":"https://github.com/jfrabaute","followers_url":"https://api.github.com/users/jfrabaute/followers","following_url":"https://api.github.com/users/jfrabaute/following{/other_user}","gists_url":"https://api.github.com/users/jfrabaute/gists{/gist_id}","starred_url":"https://api.github.com/users/jfrabaute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfrabaute/subscriptions","organizations_url":"https://api.github.com/users/jfrabaute/orgs","repos_url":"https://api.github.com/users/jfrabaute/repos","events_url":"https://api.github.com/users/jfrabaute/events{/privacy}","received_events_url":"https://api.github.com/users/jfrabaute/received_events","type":"User","site_admin":false},"labels":[{"id":686214011,"node_id":"MDU6TGFiZWw2ODYyMTQwMTE=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.5","name":"affects_2.5","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":231201931,"node_id":"MDU6TGFiZWwyMzEyMDE5MzE=","url":"https://api.github.com/repos/ansible/ansible/labels/needs_rebase","name":"needs_rebase","color":"eb6420","default":false},{"id":61436281,"node_id":"MDU6TGFiZWw2MTQzNjI4MQ==","url":"https://api.github.com/repos/ansible/ansible/labels/needs_revision","name":"needs_revision","color":"eb6450","default":false},{"id":723150340,"node_id":"MDU6TGFiZWw3MjMxNTAzNDA=","url":"https://api.github.com/repos/ansible/ansible/labels/new_contributor","name":"new_contributor","color":"c2e0c6","default":false},{"id":473225334,"node_id":"MDU6TGFiZWw0NzMyMjUzMzQ=","url":"https://api.github.com/repos/ansible/ansible/labels/new_module","name":"new_module","color":"c2e0c6","default":false},{"id":153577825,"node_id":"MDU6TGFiZWwxNTM1Nzc4MjU=","url":"https://api.github.com/repos/ansible/ansible/labels/new_plugin","name":"new_plugin","color":"bfe5bf","default":false},{"id":581543918,"node_id":"MDU6TGFiZWw1ODE1NDM5MTg=","url":"https://api.github.com/repos/ansible/ansible/labels/stale_ci","name":"stale_ci","color":"fef2c0","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-10-12T17:33:39Z","updated_at":"2018-08-16T01:26:03Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/31650","html_url":"https://github.com/ansible/ansible/pull/31650","diff_url":"https://github.com/ansible/ansible/pull/31650.diff","patch_url":"https://github.com/ansible/ansible/pull/31650.patch"},"body":"##### SUMMARY\r\n* Add apply state to kubernetes module\r\n\r\nWhen using ansible for creating and updating cluster\r\nresources, we'd like to have only one task which will\r\neither create or update the resource.\r\nRight now, using 'present' with a resource that already\r\nexists will fail the task. Using 'update' with a resource\r\nthat does not exist yet will fail.\r\n'apply' is similar to 'kubectl apply -f' and will either\r\ncreate or update the resource.\r\n\r\n* Fix required_one_of assignment\r\n\r\nHaving (()) generates the following error:\r\n\r\n\"msg\": \"one of the following is required: f,i,l,e,_,r,e,f,e,r,e,n,c,e\"\r\n\r\n* Add statefulset resource to kubernetes module\r\n##### ISSUE TYPE\r\n - Module Pull Request\r\n - Module Bugfix Pull Request\r\n\r\n##### COMPONENT NAME\r\nkubernetes\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.4.0.0\r\n  config file = None\r\n  configured module search path = [u'/Users/<myname>/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/local/Cellar/ansible/2.4.0.0/libexec/lib/python2.7/site-packages/ansible\r\n  executable location = /usr/local/bin/ansible\r\n  python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/413392503","html_url":"https://github.com/ansible/ansible/pull/31650#issuecomment-413392503","issue_url":"https://api.github.com/repos/ansible/ansible/issues/31650","id":413392503,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzM5MjUwMw==","user":{"login":"asetty","id":9741640,"node_id":"MDQ6VXNlcjk3NDE2NDA=","avatar_url":"https://avatars1.githubusercontent.com/u/9741640?v=4","gravatar_id":"","url":"https://api.github.com/users/asetty","html_url":"https://github.com/asetty","followers_url":"https://api.github.com/users/asetty/followers","following_url":"https://api.github.com/users/asetty/following{/other_user}","gists_url":"https://api.github.com/users/asetty/gists{/gist_id}","starred_url":"https://api.github.com/users/asetty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asetty/subscriptions","organizations_url":"https://api.github.com/users/asetty/orgs","repos_url":"https://api.github.com/users/asetty/repos","events_url":"https://api.github.com/users/asetty/events{/privacy}","received_events_url":"https://api.github.com/users/asetty/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T01:26:03Z","updated_at":"2018-08-16T01:26:03Z","author_association":"NONE","body":"Just realizing that for tasks that use nested or with_items, the client is recreated for each item... Do you know off hand if there's a way to make it s.t. it's only created once? Starting to look at the ansible task executor a bit...\r\n\r\nAlso about the general slowness... Have you had any other ideas than lazy loading? I had an idea that I'd like some feedback about. The responses could be cached in memory during the play execution then there could be an option to the DynamicClient constructor to specify the API instead of requesting it.\r\n\r\nLet me know what you think! I'm thinking that sometime next week I could start working on a PR for lazy loading / some sort of optimization/fix.\r\n"}}
{"actor":{"display_login":"asetty"}}