forked from actions/actions-runner-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose workflow job metrics via new actions-metrics-server (actions#2057
) * Add workflow job metrics to Github webhook server * Fix handling of workflow_job.Conclusion * Make the prometheus metrics exporter for the workflow jobs a dedicated application * chart: Add support for deploying actions-metrics-server * A few improvements to make it easy to cover in E2E * chart: Add missing actionsmetrics.service.yaml * chart: Do not modify actionsMetricsServer.replicaCount * chart: Add documentation for actionsMetrics and actionsMetricsServer Co-authored-by: Colin Heathman <cheathman@benchsci.com>
- Loading branch information
1 parent
0285da1
commit 300e93c
Showing
16 changed files
with
1,019 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
charts/actions-runner-controller/templates/_actions_metrics_server_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "actions-runner-controller-actions-metrics-server.name" -}} | ||
{{- default .Chart.Name .Values.actionsMetricsServer.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{- define "actions-runner-controller-actions-metrics-server.instance" -}} | ||
{{- printf "%s-%s" .Release.Name "actions-metrics-server" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "actions-runner-controller-actions-metrics-server.fullname" -}} | ||
{{- if .Values.actionsMetricsServer.fullnameOverride }} | ||
{{- .Values.actionsMetricsServer.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.actionsMetricsServer.nameOverride }} | ||
{{- $instance := include "actions-runner-controller-actions-metrics-server.instance" . }} | ||
{{- if contains $name $instance }} | ||
{{- $instance | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s-%s" .Release.Name $name "actions-metrics-server" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "actions-runner-controller-actions-metrics-server.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "actions-runner-controller-actions-metrics-server.name" . }} | ||
app.kubernetes.io/instance: {{ include "actions-runner-controller-actions-metrics-server.instance" . }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "actions-runner-controller-actions-metrics-server.serviceAccountName" -}} | ||
{{- if .Values.actionsMetricsServer.serviceAccount.create }} | ||
{{- default (include "actions-runner-controller-actions-metrics-server.fullname" .) .Values.actionsMetricsServer.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.actionsMetricsServer.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "actions-runner-controller-actions-metrics-server.secretName" -}} | ||
{{- default (include "actions-runner-controller-actions-metrics-server.fullname" .) .Values.actionsMetricsServer.secret.name }} | ||
{{- end }} | ||
|
||
{{- define "actions-runner-controller-actions-metrics-server.roleName" -}} | ||
{{- include "actions-runner-controller-actions-metrics-server.fullname" . }} | ||
{{- end }} | ||
|
||
{{- define "actions-runner-controller-actions-metrics-server.serviceMonitorName" -}} | ||
{{- include "actions-runner-controller-actions-metrics-server.fullname" . | trunc 47 }}-service-monitor | ||
{{- end }} |
Oops, something went wrong.