ansible-collections / community.kubernetes

Kubernetes Collection for Ansible
https://galaxy.ansible.com/community/kubernetes
GNU General Public License v3.0
265 stars 104 forks source link

[WIP] Add k8s_expose module #239

Closed fabianvf closed 3 years ago

fabianvf commented 4 years ago
SUMMARY

Adds a new module named k8s_expose, which can create a v1.Service object for a variety of resources.

This module will also serve as the base for https://github.com/ansible-collections/community.okd/issues/31

Currently it is set up only to create Services, if we wanted to we could extend it to be able to create ingresses as was discussed here for the kubectl client: https://github.com/kubernetes/kubernetes/issues/43667

They decided against expose for the CLI, but it may make more sense for Ansible. This could be done either now or as a followup. The okd module would then just create routes instead of ingresses, but would otherwise be equivalent.

ISSUE TYPE
COMPONENT NAME

k8s_expose

ADDITIONAL INFORMATION
codecov[bot] commented 4 years ago

Codecov Report

Merging #239 into main will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #239   +/-   ##
=======================================
  Coverage   36.74%   36.74%           
=======================================
  Files           3        3           
  Lines         724      724           
  Branches      144      144           
=======================================
  Hits          266      266           
  Misses        409      409           
  Partials       49       49           

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 0f3fef9...119bf7e. Read the comment docs.

geerlingguy commented 4 years ago

@fabianvf - After the discussion over here (https://github.com/ansible-collections/community.okd/issues/31#issuecomment-700922955), what do you think about the idea of renaming to k8s_ingress?

fabianvf commented 4 years ago

@geerlingguy this one is actually in line with kubectl expose, k8s_ingress would create Ingress resources rather than Services and would be more in line with the proposed kubectl create ingress command

fabianvf commented 3 years ago

This isn't really that useful, k8s_service can fill this need and k8s_ingress is the more interesting one

tima commented 3 years ago

This isn't really that useful, k8s_service can fill this need and k8s_ingress is the more interesting one

@fabianvf Can you clarify this comment? Are you suggesting we need to create a k8s_ingress modules here?

fabianvf commented 3 years ago

@tima need is a strong word, but if we wanted to add a feature that would be useful k8s_ingress could provide a ton of value

github-actions[bot] commented 3 years ago

This repository does not accept pull requests, see the README for details.