Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

k8s_*: Add support for vaulted kubeconfig and src #193

Merged
merged 1 commit into from
Aug 26, 2020

Conversation

Akasurde
Copy link
Member

SUMMARY

Partially fixes #38

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/action/k8s_info.py

@codecov
Copy link

codecov bot commented Aug 18, 2020

Codecov Report

Merging #193 into main will increase coverage by 0.90%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #193      +/-   ##
==========================================
+ Coverage   41.90%   42.80%   +0.90%     
==========================================
  Files           3        4       +1     
  Lines         556      605      +49     
  Branches      114      121       +7     
==========================================
+ Hits          233      259      +26     
- Misses        279      298      +19     
- Partials       44       48       +4     
Impacted Files Coverage Δ
...ns/community/kubernetes/plugins/action/k8s_info.py 53.06% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d50bb0...a4afc0d. Read the comment docs.

@Akasurde
Copy link
Member Author

Akasurde commented Aug 18, 2020

@sivel Could you please review this? Thanks.

Copy link
Collaborator

@fabianvf fabianvf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm, not super familiar with action plugins though so we should probably get a more informed review

@Akasurde Akasurde requested a review from bcoca August 18, 2020 15:57
@Akasurde Akasurde force-pushed the k8s_info_action branch 3 times, most recently from 72596f5 to fb38caa Compare August 19, 2020 12:20
@Akasurde Akasurde changed the title k8s_info: Add support for vaulted kubeconfig k8s_*: Add support for vaulted kubeconfig and src Aug 19, 2020
result = super(ActionModule, self).run(tmp, task_vars)
del tmp # tmp no longer has any effect

new_module_args = self._task.args.copy()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any possibility this would need to be a deepcopy() since some of the k8s structures can get complex and have depth? (I genuinely don't know)

@fabianvf @geerlingguy thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For k8s_info specifically there aren't nested parameters accepted, but for anything that supports the resource_definition parameter it could be a concern

@fabianvf
Copy link
Collaborator

fabianvf commented Aug 24, 2020

Also addresses #70 I believe

* User can provide vaulted kubeconfig
* User can use src files from roles/files

Partially fixes ansible-collections#38

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seamless handling of ansible vaulted files in K8s modules
3 participants