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 finding ingresses #31

Merged
merged 3 commits into from
Aug 27, 2023
Merged

Support finding ingresses #31

merged 3 commits into from
Aug 27, 2023

Conversation

Yuni-sa
Copy link
Contributor

@Yuni-sa Yuni-sa commented Aug 23, 2023

to solve #27
check for unused ingresses by checking if services exist, can check also for services in defaultBackend, if ingress points to a resource mark it as used.

@yonahd yonahd linked an issue Aug 24, 2023 that may be closed by this pull request
…unction

the condition 'if path.Backend.Service != nil' was causing resources to be skipped
incorrectly.
@Yuni-sa
Copy link
Contributor Author

Yuni-sa commented Aug 24, 2023

after some more testing I caught a bug where resources are skipped like with this manifest:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test-ingress
spec:
  rules:
    - host: example.com
      http:
        paths:
          - path: /app1
            pathType: Prefix
            backend:
              service:
                name: service-that-doesnt-exist
                port:
                  number: 8080
          - path: /resource
            pathType: ImplementationSpecific
            backend:
              resource:
                apiGroup: k8s.example.com
                kind: StorageBucket
                name: assets

Copy link
Owner

@yonahd yonahd left a comment

Choose a reason for hiding this comment

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

LGTM.
Thanks for the contribution!

@yonahd yonahd merged commit c836107 into yonahd:main Aug 27, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support kubernetes ingress
3 participants