ricoberger / script_exporter

Prometheus exporter to execute scripts and collect metrics from the output or the exit status.
MIT License
354 stars 82 forks source link

Request Service Account support in helm chart #97

Closed cydergoth closed 1 year ago

cydergoth commented 1 year ago

Very useful project, thanks! We have one small issue with EKS service accounts

In order to access some of the resources we need to report metrics on, the script-exporter instance needs to use an EKS workload identity provided via the AWS IAM integration with the EKS k8s service account. In order to leverage that in the pod we need to be able to assign a service account to the pod. This requires a small change to the deployment template to take a service account name and bind it to the pod.

See:

After setting a service account on the pod, the AWS CLI may be run inside the pod with the appropriate permissions to scrape the data we need to report metrics for.

ricoberger commented 1 year ago

Hi @cydergoth it is now possible to provide the name of a ServiceAccount in the Helm chart (version 0.7.0) via the newly added serviceAccount.name value (see #98).

cydergoth commented 1 year ago

Thats awesome! Thank you!