Repository navigation
Setup cronjob to collect billing metrics - #189
Conversation
9b7976f to
6e48240
Compare
|
@QuanMPhm The cronjob will run on oac-prod-infra and not oac-prod-workload0. And then even oac-prod-infra cannot read that b2 secret and for that I have a PR here: CCI-MOC/moc-aws#62 I guess the issue description isn't clear - I am targeting the oac-prod-workload0 for billing. |
| clusterId: cac066c0-9e64-4421-928b-93b75c4c4d41 | ||
| clusterType: hypershift | ||
| bucket: oac-prod-workload0-metrics | ||
| s3RemoteKey: b2-key/oac-prod-workload0-rw |
This targets the oac-prod-workload0 cluster.
6e48240 to
d521155
Compare
| # Empty by default, so on most clusters this chart only creates the reader | ||
| # service account and its token. Set it per cluster where collection runs: |
There was a problem hiding this comment.
Does this chart create a service account and token on each cluster? Given that the default value for collectors is empty and all templates will be empty if collectors is empty? It seems like this chart won't do anything on any cluster except oac-prod-infra
There was a problem hiding this comment.
This applicationset will render this chart on every hub cluster.
And this chart will render this on all managed cluster.
With this setup, every cluster will have the service account and a token available to query metrics from. We currently do not use the token from the managed clusters - we may use it in the future if we have classes.
the default value for collectors is empty as you noted, so no cluster by default will get a cronjob. Only oac-prod-infra will get the cronjob as its value files override the empty collectors and that is what we actually want.
@QuanMPhm does this clarify things?
There was a problem hiding this comment.
@QuanMPhm Btw, I appreciate the questions and a thorough review, thank you!
There was a problem hiding this comment.
Apologies. This whole time I was too fixated on the git diff, I didn't realized the moc-metrics-collector chart contained more than just the cronjob and external secret.
I have another question after studying this repo a bit more
This targets the oac-prod-workload0 cluster for billing. The cronjob will only run the hub cluster.