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

Helm Chart Finalization #633

Open
5 of 6 tasks
acelinkio opened this issue Oct 2, 2024 · 7 comments
Open
5 of 6 tasks

Helm Chart Finalization #633

acelinkio opened this issue Oct 2, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@acelinkio
Copy link
Collaborator

acelinkio commented Oct 2, 2024

Feature description

Follow up from #560 MR. Here is a checklist of items to improve the helm chart further and prepare it for prime time!

  • Add CI workflows to test chart
  • Add CI workflows to publish chart to a Helm/OCI repository
  • Add common ingress controller annotations for rewrite needed on ingress (Will add docs if Add prefix every route to kyoo_back #653 is not added before then)
  • Add installation documentation (chart needs to be published)
  • Uniformly quote environment variables throughout the chart
  • Improve values.yaml comments/documentation
@acelinkio acelinkio added the enhancement New feature or request label Oct 2, 2024
@acelinkio
Copy link
Collaborator Author

Having some troubles with common ingress controller annotations for rewrite as there is no standard implementations across controllers.

nginx-ingress: Most common ingress controller

haproxy: 2nd most common

nginx inc:

traefik:

caddy:

The next api replacing ingresses, GatewayAPI, handles rewrites in a standardized way

spec:
  rules:
  - matches:
    - path:
        type: PathPrefix
        value: /api
    backendRefs:
    - name: kyoo-back
      port: 5000
    filters:
      - type: URLRewrite
        urlRewrite:
          path:
            type: ReplacePrefixMatch
            replacePrefixMatch: /
  - matches:
    - path:
        type: PathPrefix
        value: /
    backendRefs:
    - name: kyoo-front
      port: 8901

Honestly did not realize how painful it is to handle rewrites. @onedr0p / @joryirving / @bo0tzz any thoughts on how to approach templating ingresses that support rewrite rules?

@bo0tzz
Copy link

bo0tzz commented Oct 24, 2024

I'm not a fan of rewrites for these sort of reasons tbh. How feasible is it to just get rid of the need on an app level, eg by having kyoo-back listen directly on /api @zoriya?

@zoriya
Copy link
Owner

zoriya commented Oct 24, 2024

I could add a env var to prefix every routes if needed yes

@acelinkio
Copy link
Collaborator Author

acelinkio commented Oct 26, 2024

I could add a env var to prefix every routes if needed yes

I think that is that is the solution. Until that feature is added, can add in docs the above links on how to manage the rewrite rules. Created for tracking #653.

@qjoly
Copy link

qjoly commented Dec 12, 2024

New Kyoo user here 👋, I discovered yesterday how installation works on Kubernetes. I proposed a small PR for the Helm chart and discovered this ingress problem while testing it.

I have the same conclusions as you (kyoo_back which doesn't require rewrite rules would just be gold.

  • Using the Gateway API is the long term solution, I think we should support it (but it's not the priority, knowing that 99% of Kubernetes users are still on ingress)
  • We could try to support several ingress-controller syntaxes (I saw your research about traefik/haproxy/nginx, very interesting!), but we risk vendor-locking (or even maintenance difficulties, I use Istio on my side, but it's not common, so should we really support it ? Who decide which ingress we will have to maintain ?), this is a complex problem.

Until #653 is implemented (and the release of GatewayAPI for most commons Ingress controller), we could just add another component inside the cluster. This would be an equivalent to the Traefik in the docker setup. I suggest using HAProxy, which is IMO the easiest (and most flexible) middleware to configure, but it's open to debate (see #708)

@acelinkio
Copy link
Collaborator Author

Adding that ingress complexity in the helm chart means eventually removing it and breaking those that rely upon it. I think just offering a basic ingress definition would be better than trying to address every edge case. Most helm charts do not address these ingress complexities.

I plan on adding some documentation to highlight ingress and provide users a way to address it. Users can use the extraObject to include any additional manifests that they want.

I'll reply to your #708 MR later today. Wish you would have started a discussion before suggesting a large amount of changes.

@qjoly
Copy link

qjoly commented Dec 12, 2024

Users can use the extraObject to include any additional manifests that they want.

In my opinion, the extraObject is an anti-pattern or should only be used in situations where the chart cannot handle all cases, the ingress subject should not be managed here (or only for edge cases, like with my Istio)

Sorry for not discussing this here before proposing the changes. Depending on your review, I can split in two merge requests to separate the two topics (value management and 'route' component)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants