This message was deleted.
# atlantis-community
s
This message was deleted.
c
We want to scrape it with prometheus, but we don't really want to try to make IAP work, and I don't know if something like
source_service_account
will work with that.
b
Hmm do you mean to make it part of the non IAP protected backend if you’re using IAP? Which is now only exposing /events ?
I’m all for exposing /metrics somehow 👍🏼
What kind of solution would you prefer?
c
Yeah. I guess I'm not super worried about /metrics being exposed to the world, but I don't know if other folks feel like that's the best plan for achieving that goal. I just want to be able to scrape it with prometheus without having to jump through a lot of hoops.
I'm trying to think of a better solution that would give more options...I guess it could be a switch, so if people didn't want to expose it to the world they could turn it off, but I don't know how many people would actually care.
b
Where does prom run now?
c
Right now, it's in our k8s cluster.
b
Couldn’t we give the SA associated with prom just an IAM binding so that it could reach the IAP backend?
I would have to test this tbh
But left or right lets make it work for you!
c
Does IAP work that way?
I wasn't sure if IAP would do that for a service account.
That was my first idea, but it doesn't have a workload identity ATM so we'd have to add that, and if it was the only thing 🤷‍♀️
b
I’m not entirely sure but I would have to double check it
Ah ok, if there’s no workload identity yet then it’s going to be tough
c
I mean, we can certainly add one if it's the only way.
b
Even for SaaS solutions that want to scrape /metrics we would need a solution
So exposing it over the non IAP protected backend is an option
I need to double check what it all exposes and whether it’s safe to do so
c
That's a good point too.
b
Could you raise an issue for this :)?
c
I sure can!
b
Awesome, thank you — I’ll ensure it gets addressed right after I get back from HashiConf 👍🏼
c
No problem! Thank you.
It looks like to auth via IAP with a service account it's not exactly a smooth process, unfortunately: https://cloud.google.com/iap/docs/authentication-howto#obtaining_an_oidc_token_in_all_other_cases
b
Just saw that indeed… we still need a solution anyway
c
Yup.
b
I can imagine we just add an ‘expose_metrics_publicly’ variable to make this work easy
👍 1