Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support kubernetes ingress #27

Closed
yonahd opened this issue Aug 15, 2023 · 3 comments · Fixed by #31
Closed

Support kubernetes ingress #27

yonahd opened this issue Aug 15, 2023 · 3 comments · Fixed by #31
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@yonahd
Copy link
Owner

yonahd commented Aug 15, 2023

Find Kubernetes Ingresses that are not used. -> Not pointing to any services
The command should be ing or ingress

@yonahd yonahd added good first issue Good for newcomers enhancement New feature or request labels Aug 15, 2023
@yonahd yonahd linked a pull request Aug 15, 2023 that will close this issue
@yonahd yonahd removed a link to a pull request Aug 16, 2023
@Yuni-sa
Copy link
Contributor

Yuni-sa commented Aug 22, 2023

@yonahd, I can help with this.
what do you think about iterating over the rules and paths of an ingress and checking if the service (using path.Backend.Service.Name) exists?
makes it easy to find unused ingresses by checking if all of the services do not exist, also if one service exist you can skip the rest of the paths in the ingress.

side note: do we also need to check for resources (path.Backend.Resource)? you only pointed out about services.

@yonahd
Copy link
Owner Author

yonahd commented Aug 23, 2023

@Yuni-sa Sounds good!
If the the backend is a resource it should automatically be marked as used (we need to be safe)
A non prefixed ingress should be accounted for as well

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test-ingress
spec:
  defaultBackend:
    service:
      name: test
      port:
        number: 80

@yonahd
Copy link
Owner Author

yonahd commented Aug 23, 2023

Looking at it this way, it is a pretty large pr.
If you want someone to take this together with you it should be an option

@yonahd yonahd linked a pull request Aug 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants