-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Pointing to authenticating proxies/ingress controllers #80
Comments
Hey @dhess , that is correct, in the new version, you can point directly to the service rather than the ingress. In the traefik example, you can point it at the traefik's service and it will work the same. Does pointing to the service not work as expected? I am not sure how VM implements their auth, but at some level it would have to pass through a K8s service belonging to VMAuth to which you could point this operator to. Regarding #28, you can still do that by using the subjects:
- kind: Service
name: guacamole
spec:
fqdn: guacamole.domain
noTlsVerify: false
target: https://guacamole.local # <- use this field here to point to VMAuth If not, this would be a feature request to support Ingress, which is not that bad, but would not be of much use when you can point to a service/FQDN. |
VMAuth is mostly working with the Cloudflare tunnel (pointing to the service, rather than the ingress), but it does expose the VMAuth proxy's It's not clear to me whether the ingress would have the same behavior as the service, as I haven't been able to test it because I don't know how to point the tunnel at it. However, based on the documentation, I get the impression that it wouldn't, as you're supposed to be able to route https://docs.victoriametrics.com/operator/auth.html Other endpoints that the VMAuth proxy lacks, such as |
Could you let me know which service do you point the operator to? What ingress controller do you use and how does it currently block access to /metrics? Also, setting the target as shown in the example above to expose what you want in different domains, would that be an option? |
I'm not using an ingress controller in the cluster, as I haven't needed one thanks to
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAuth
metadata:
name: main-router
spec:
podMetadata:
labels:
component: vmauth
userSelector: {}
userNamespaceSelector: {}
replicaCount: 2
resources:
requests:
cpu: "250m"
memory: "350Mi"
limits:
cpu: "500m"
memory: "850Mi"
ingress:
class_name: nginx (Not that the VictoriaMetrics Operator automatically appends Here's the apiVersion: networking.cfargotunnel.com/v1alpha1
kind: TunnelBinding
metadata:
name: vm-tunnelbinding
subjects:
- kind: Service
name: vmauth-main-router
spec:
fqdn: x.y.z
tunnelRef:
kind: Tunnel
name: monitoring-tunnel I guess you're suggesting that I change the name of the ingress that the VM operator creates, and point the tunnel binding at that? I suppose that might be possible in one of the |
Oh, looks like victoriaMetrics/your cluster has an nginx ingress controller. You could try pointing the operator to the nginx's service which should then go through Nginx, which should do everything you expect it to. If you do not have an ingress controller at all, does the setup without the Cloudflare operator work as expected? Are you able to locally connect to the endpoints you need while not being able to connect to /metrics? If not, I am guessing VictoriaMetrics assumes that you have an ingress controller and generates an ingress with certain config which does what you need it to do. But without an actual ingress controller to enforce it, it would not work. |
The ingress is set up by the VictoriaMetrics operator, and there is no other ingress controller in the cluster, so there's no corresponding service for it, either. The I haven't tried without the Cloudflare operator, but I'll try to find some time to do that. Thanks for your help! |
Ahh, in that case, as I mentioned, VM expects you to bring your own ingress to have those features. Currently, the ingress is created, but not being served by anyone, which means even if the operator supports ingress, it would not work. So, if you install an ingress controller to serve the ingress, and point the operator to the ingress' service, it should all work out. Let me know if that does not happen. |
Hi, thanks for this fantastic operator!
In this comment, in response to a question about how to point a Cloudflare tunnel at an authenticating proxy/ingress controller, you referred to the
cfargotunnel/target
annotation (#28):However, unless I'm mistaken, that feature was removed when you simplified the operator's design in #63. If that feature has been replaced by something equivalent in the new design, I must be missing it, and it's not clear to me how we're meant to point the Cloudflare tunnel at an ingress controller anymore.
In my particular case, I'm trying to use
vmauth
from the VictoriaMetrics Operator to add some bearer token-authentication to an exposed VictoriaMetrics service:https://docs.victoriametrics.com/operator/auth.html
But I can only figure out how to connect the Cloudflare tunnel directly to the
VMAuth
service, and not its ingress.The text was updated successfully, but these errors were encountered: