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

Doc: Missing information or clarification might be needed for kubernetes. #328

Closed
ArKam opened this issue Jun 27, 2024 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@ArKam
Copy link

ArKam commented Jun 27, 2024

I’m currently planning to use sablier as a traefik plugin within a kubernetes cluster but I didn’t find a clear explanation if installing our own instance of the sablier repository is required?

I’ve followed the traefik documentation to add a plugin to it and this documentation involve to give traefik the plugin github URL and the release version we want to use.

But neither traefik or sablier (To my knowledge, sorry if I’m wrong) does clarify if we need to make it run on kubernetes as an app deployed or if traefik indeed use the information given on the yaml configuration file to retrieve it on its own and make it run on its own?

I’m telling me that I’m suppose to run sablier as a deployment and tell traefik how to find it but I’m really clueless on this topic right now and traveling out of home so I can’t really « Just try and find out ».

Sorry if I’m wrong.

@ArKam ArKam added the bug Something isn't working label Jun 27, 2024
@ArKam
Copy link
Author

ArKam commented Jun 27, 2024

TBN: The real confusing part for me is the fact that traefik doc state that plugins doesn’t need to be compiled as they’re on the fly integrated using their yaegi engine right from the plugin url (Which make sense to me so far) in here

However, this statement kinda collide with sablier documentation about it in here as it provide a CRD exemple that call for the sablier url using the localhost address and a specific port but if traefik is indeed running sablier by integrating it right from the github URL how can it be binded to the specified port and address of the documentation ??

@acouvreur
Copy link
Owner

acouvreur commented Jun 27, 2024

You can take a look at the following guide:
https://acouvreur.github.io/sablier/#/guides/code-server-traefik-kubernetes

But yes, traefik plugin only tells you how ton install the plugin. But the plugin itself handles the call for you on every call to the actual Sablier API.

You need to have Sablier running on its own and available to Traefik.


There's also an ongoing pull request to add an helm chart to Sablier: #274

@ArKam
Copy link
Author

ArKam commented Jun 28, 2024

aaaaah Perfect! It was indeed the missing, ok understand how it works now!

thank you very much and merci pour ce super outil ;-)

@acouvreur
Copy link
Owner

Merci a toi :)

How do you think I could improve the understanding that Sablier needs to be deployed on its own ?

Should it be part of the plugin description ?

@facorazza
Copy link

Merci a toi :)

How do you think I could improve the understanding that Sablier needs to be deployed on its own ?

Should it be part of the plugin description ?

I believe it should be mentioned here: https://acouvreur.github.io/sablier/#/providers/kubernetes.

In order to use the docker provider you can configure the provider.name property.

This should probably be fixed as well.

@gorositopablo
Copy link

@ArKam not sure if you could implement it without issues finally, but it worth mention this comment #62 (comment) to workaround using the blocking strategy.

It works great for me and without that service type ExternalName it would not have been possible for me to use the blocking strategy (ideal for APIs).

So, if it were up to me, I would add it to the documentation as well.

---
apiVersion: v1
kind: Service
metadata:
  name: yourapp-svc
  namespace: demo-ns
spec:
  type: ClusterIP
  selector:
    app: yourapp
  ports:
    - port: 80
      targetPort: 80
---
# https://github.com/acouvreur/sablier/issues/62
apiVersion: v1
kind: Service
metadata:
  name: yourapp-svc-proxy
  namespace: demo-ns
spec:
  type: ExternalName
  externalName: yourapp-svc.demo-ns.svc.cluster.local
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: yourapp-client
  namespace: demo-ns
spec:
  entryPoints:
    - websecure
  routes:
    - kind: Rule
      match: >-
        Host(`example.com`) &&
        PathPrefix(`/yourapp`)
      middlewares:
        - name: yourapp-sablier
      services:
        - kind: Service
          name: yourapp-svc-proxy
          port: 80
          namespace: demo-ns

@ArKam
Copy link
Author

ArKam commented Aug 6, 2024

I’ll have a look at how did I deployed it since it just worked following the appropriate documentation and understanding a bit more how traefik plugins does indeed works.

The only remaining issue is on RPi aarch64 the armv7 image was segfaulting last time I tried it.

@ArKam ArKam closed this as completed Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants