-
Notifications
You must be signed in to change notification settings - Fork 3
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
Broken: Get repository stats #21
Comments
Yes, I can take a look at it today 👍 |
I'm following through on this now, it looks as though we need a GITHUB_TOKEN with Has it always been so? That seems excessive, from the description of
We need all that just to read the stats from the repo? Holy hell Why are we doing this?
Can anyone see if we have really provisioned a secret here with |
I'm assuming that we did have one, probably it was created with the permission of the core maintainers, with an expiry date. I'm happy to design a process that can keep this token refreshed, but as it is I can copy all this to my own fork and test with a different repo, (just so we have someone that's fully aware of what this repo scope token does and having tested in a scope other than the production setting) but if it's just an expired token, then it will just need to be replaced, and someone else aware that we are doing this I guess. |
It seems like we could automate this, updating the github secret with repo scope. We could run a periodic workflow (hourly? every 4h/12h?) on the stats repo, where we'll store a Github App private key as a secret, that has permission to create GITHUB_TOKEN with repo scope for the fluxcd/flux2 and fluxcd/flagger repos. That job will store the new GITHUB_TOKEN – or maybe there is a way to handle this without managing secrets, and only using ambient / delegated credentials. I'll admit, I'm looking for an excuse to use the tf-controller here, (I will probably do it both ways, but only one will go into the permanent situation for fluxcd/stats.) I will work out on my own personal repos how to do a cross-repo delegation of "write secrets" permission for GitHub Actions, so the fluxcd/flux2 . I am pretty sure we don't need Kubernetes or tf-controller in the workflow to accomplish this (it could just run the github-app-secret app and terraform in an hourly job, with no Kubernetes and just using terraform CLI.) I was looking for an excuse to use tf-controller, but if there's no permanent Flux cluster I can run this workflow on, it might be better to keep it fully GHA. Then again, we could be spinning up a k8s cluster for tf-controller to run a job on, to completion, and make that another separate pattern that we use for demos and examples. Any thoughts before I go ahead and implement such a process? (Does this sound like a good idea at all?) |
Reference also: We have done some work on this problem already, in the fluxcd-community umbrella |
Got 'em
|
The text was updated successfully, but these errors were encountered: