Skip to content

Commit

Permalink
fix: service account for scraping metrics (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsctl authored Aug 21, 2024
1 parent ff4f80d commit 9b16c36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions charts/kamaji-etcd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,14 @@ Here the values you can override:
| serviceAccount.name | string | `""` | Define the ServiceAccount name to use during the setup and provision of the etcd backing storage (default: "") |
| serviceMonitor.annotations | object | `{}` | Assign additional Annotations |
| serviceMonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus |
| serviceMonitor.endpoint | object | `{"interval":"15s","metricRelabelings":[],"relabelings":[],"scrapeTimeout":""}` | ServiceAccount for scraping metrics from etcd serviceAccount: # -- ServiceAccount name name: prometheus # -- ServiceAccount namespace namespace: monitoring-system |
| serviceMonitor.endpoint.interval | string | `"15s"` | Set the scrape interval for the endpoint of the serviceMonitor |
| serviceMonitor.endpoint.metricRelabelings | list | `[]` | Set metricRelabelings for the endpoint of the serviceMonitor |
| serviceMonitor.endpoint.relabelings | list | `[]` | Set relabelings for the endpoint of the serviceMonitor |
| serviceMonitor.endpoint.scrapeTimeout | string | `""` | Set the scrape timeout for the endpoint of the serviceMonitor |
| serviceMonitor.labels | object | `{}` | Assign additional labels according to Prometheus' serviceMonitorSelector matching labels |
| serviceMonitor.matchLabels | object | `{}` | Change matching labels |
| serviceMonitor.namespace | string | `""` | Install the ServiceMonitor into a different Namespace, as the monitoring stack one (default: the release one) |
| serviceMonitor.serviceAccount.name | string | `"etcd"` | ServiceAccount for Metrics RBAC |
| serviceMonitor.serviceAccount.namespace | string | `"etcd-system"` | ServiceAccount Namespace for Metrics RBAC |
| serviceMonitor.targetLabels | list | `[]` | Set targetLabels for the serviceMonitor |
| snapshotCount | string | `"10000"` | Number of committed transactions to trigger a snapshot to disk. |
| tolerations | list | `[]` | Kubernetes node taints that the etcd pods would tolerate |
Expand Down
2 changes: 1 addition & 1 deletion charts/kamaji-etcd/templates/etcd_metrics_rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ roleRef:
name: {{ include "etcd.fullname" . }}-metrics-role
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceMonitor.serviceAccount.name }}
name: {{ .Values.serviceMonitor.serviceAccount.name | default (include "etcd.serviceAccountName" .) }}
namespace: {{ .Values.serviceMonitor.serviceAccount.namespace | default .Release.Namespace }}
{{- end }}
11 changes: 6 additions & 5 deletions charts/kamaji-etcd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,12 @@ serviceMonitor:
matchLabels: {}
# -- Set targetLabels for the serviceMonitor
targetLabels: []
serviceAccount:
# -- ServiceAccount for Metrics RBAC
name: etcd
# -- ServiceAccount Namespace for Metrics RBAC
namespace: etcd-system
# -- ServiceAccount for scraping metrics from etcd
# serviceAccount:
# # -- ServiceAccount name
# name: prometheus
# # -- ServiceAccount namespace
# namespace: monitoring-system
endpoint:
# -- Set the scrape interval for the endpoint of the serviceMonitor
interval: "15s"
Expand Down

0 comments on commit 9b16c36

Please sign in to comment.