add interval and timeout configuration for the actions-runner-controler serviceMonitors (#2654)
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
		
							parent
							
								
									9f33ae1507
								
							
						
					
					
						commit
						06cbd632b8
					
				|  | @ -42,7 +42,9 @@ All additional docs are kept in the `docs/` folder, this README is solely for do | ||||||
| | `image.actionsRunnerImagePullSecrets`                    | Optional image pull secrets to be included in the runner pod's ImagePullSecrets                                                           |                                                                                                 | | | `image.actionsRunnerImagePullSecrets`                    | Optional image pull secrets to be included in the runner pod's ImagePullSecrets                                                           |                                                                                                 | | ||||||
| | `image.dindSidecarRepositoryAndTag`                      | The "repository/image" of the dind sidecar container                                                                                      | docker:dind                                                                                     | | | `image.dindSidecarRepositoryAndTag`                      | The "repository/image" of the dind sidecar container                                                                                      | docker:dind                                                                                     | | ||||||
| | `image.pullPolicy`                                       | The pull policy of the controller image                                                                                                   | IfNotPresent                                                                                    | | | `image.pullPolicy`                                       | The pull policy of the controller image                                                                                                   | IfNotPresent                                                                                    | | ||||||
| | `metrics.serviceMonitor`                                 | Deploy serviceMonitor kind for for use with prometheus-operator CRDs                                                                      | false                                                                                           | | | `metrics.serviceMonitor.enable`                                 | Deploy serviceMonitor kind for for use with prometheus-operator CRDs                                                                      | false                                                                                           | | ||||||
|  | | `metrics.serviceMonitor.interval`                                 | Configure the interval that Prometheus should scrap the controller's metrics                                                                      | 1m                                                                                           | | ||||||
|  | | `metrics.serviceMonitor.timeout`                                 | Configure the timeout the timeout of Prometheus scrapping.                                                                      | 30s                                                                                           | | ||||||
| | `metrics.serviceAnnotations`                             | Set annotations for the provisioned metrics service resource                                                                              |                                                                                                 | | | `metrics.serviceAnnotations`                             | Set annotations for the provisioned metrics service resource                                                                              |                                                                                                 | | ||||||
| | `metrics.port`                                           | Set port of metrics service                                                                                                               | 8443                                                                                            | | | `metrics.port`                                           | Set port of metrics service                                                                                                               | 8443                                                                                            | | ||||||
| | `metrics.proxy.enabled`                                  | Deploy kube-rbac-proxy container in controller pod                                                                                        | true                                                                                            | | | `metrics.proxy.enabled`                                  | Deploy kube-rbac-proxy container in controller pod                                                                                        | true                                                                                            | | ||||||
|  | @ -149,7 +151,9 @@ All additional docs are kept in the `docs/` folder, this README is solely for do | ||||||
| | `actionsMetricsServer.ingress.hosts`                      | Set hosts configuration for ingress                                                                                                       | `[{"host": "chart-example.local", "paths": []}]`                                                | | | `actionsMetricsServer.ingress.hosts`                      | Set hosts configuration for ingress                                                                                                       | `[{"host": "chart-example.local", "paths": []}]`                                                | | ||||||
| | `actionsMetricsServer.ingress.tls`                        | Set tls configuration for ingress                                                                                                         |                                                                                                 | | | `actionsMetricsServer.ingress.tls`                        | Set tls configuration for ingress                                                                                                         |                                                                                                 | | ||||||
| | `actionsMetricsServer.ingress.ingressClassName`           | Set ingress class name                                                                                                                    |                                                                                                 | | | `actionsMetricsServer.ingress.ingressClassName`           | Set ingress class name                                                                                                                    |                                                                                                 | | ||||||
| | `actionsMetrics.serviceMonitor`                           | Deploy serviceMonitor kind for for use with prometheus-operator CRDs                                                                      | false                                                                                           | | | `actionsMetrics.serviceMonitor.enable`                           | Deploy serviceMonitor kind for for use with prometheus-operator CRDs                                                                      | false                                                                                           | | ||||||
|  | | `actionsMetrics.serviceMonitor.interval`                                 | Configure the interval that Prometheus should scrap the controller's metrics                                                                      | 1m                                                                                           | | ||||||
|  | | `actionsMetrics.serviceMonitor.timeout`                                 | Configure the timeout the timeout of Prometheus scrapping.                                                                      | 30s                                                                                           | | ||||||
| | `actionsMetrics.serviceAnnotations`                       | Set annotations for the provisioned actions metrics service resource                                                                              |                                                                                                 | | | `actionsMetrics.serviceAnnotations`                       | Set annotations for the provisioned actions metrics service resource                                                                              |                                                                                                 | | ||||||
| | `actionsMetrics.port`                                     | Set port of actions metrics service                                                                                                               | 8443                                                                                            | | | `actionsMetrics.port`                                     | Set port of actions metrics service                                                                                                               | 8443                                                                                            | | ||||||
| | `actionsMetrics.proxy.enabled`                            | Deploy kube-rbac-proxy container in controller pod                                                                                        | true                                                                                            | | | `actionsMetrics.proxy.enabled`                            | Deploy kube-rbac-proxy container in controller pod                                                                                        | true                                                                                            | | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ spec: | ||||||
|     {{ range $_, $port := .Values.actionsMetricsServer.service.ports -}} |     {{ range $_, $port := .Values.actionsMetricsServer.service.ports -}} | ||||||
|     - {{ $port | toYaml | nindent 6 }} |     - {{ $port | toYaml | nindent 6 }} | ||||||
|     {{- end }} |     {{- end }} | ||||||
|     {{- if .Values.actionsMetrics.serviceMonitor }} |     {{- if .Values.actionsMetrics.serviceMonitor.enable }} | ||||||
|     - name: metrics-port |     - name: metrics-port | ||||||
|       port: {{ .Values.actionsMetrics.port }} |       port: {{ .Values.actionsMetrics.port }} | ||||||
|       targetPort: metrics-port |       targetPort: metrics-port | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| {{- if and .Values.actionsMetricsServer.enabled .Values.actionsMetrics.serviceMonitor }} | {{- if and .Values.actionsMetricsServer.enabled .Values.actionsMetrics.serviceMonitor.enable }} | ||||||
| apiVersion: monitoring.coreos.com/v1 | apiVersion: monitoring.coreos.com/v1 | ||||||
| kind: ServiceMonitor | kind: ServiceMonitor | ||||||
| metadata: | metadata: | ||||||
|  | @ -19,6 +19,8 @@ spec: | ||||||
|       tlsConfig: |       tlsConfig: | ||||||
|         insecureSkipVerify: true |         insecureSkipVerify: true | ||||||
|       {{- end }} |       {{- end }} | ||||||
|  |       interval: {{ .Values.actionsMetrics.serviceMonitor.interval }} | ||||||
|  |       scrapeTimeout: {{ .Values.actionsMetrics.serviceMonitor.timeout }} | ||||||
|   selector: |   selector: | ||||||
|     matchLabels: |     matchLabels: | ||||||
|       {{- include "actions-runner-controller-actions-metrics-server.selectorLabels" . | nindent 6 }} |       {{- include "actions-runner-controller-actions-metrics-server.selectorLabels" . | nindent 6 }} | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| {{- if .Values.metrics.serviceMonitor }} | {{- if .Values.metrics.serviceMonitor.enable }} | ||||||
| apiVersion: monitoring.coreos.com/v1 | apiVersion: monitoring.coreos.com/v1 | ||||||
| kind: ServiceMonitor | kind: ServiceMonitor | ||||||
| metadata: | metadata: | ||||||
|  | @ -19,6 +19,8 @@ spec: | ||||||
|       tlsConfig: |       tlsConfig: | ||||||
|         insecureSkipVerify: true |         insecureSkipVerify: true | ||||||
|       {{- end }} |       {{- end }} | ||||||
|  |       interval: {{ .Values.metrics.serviceMonitor.interval }} | ||||||
|  |       scrapeTimeout: {{ .Values.metrics.serviceMonitor.timeout }} | ||||||
|   selector: |   selector: | ||||||
|     matchLabels: |     matchLabels: | ||||||
|       {{- include "actions-runner-controller.selectorLabels" . | nindent 6 }} |       {{- include "actions-runner-controller.selectorLabels" . | nindent 6 }} | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ spec: | ||||||
|     {{ range $_, $port := .Values.githubWebhookServer.service.ports -}} |     {{ range $_, $port := .Values.githubWebhookServer.service.ports -}} | ||||||
|     - {{ $port | toYaml | nindent 6 }} |     - {{ $port | toYaml | nindent 6 }} | ||||||
|     {{- end }} |     {{- end }} | ||||||
|     {{- if .Values.metrics.serviceMonitor }} |     {{- if .Values.metrics.serviceMonitor.enable }} | ||||||
|     - name: metrics-port |     - name: metrics-port | ||||||
|       port: {{ .Values.metrics.port }} |       port: {{ .Values.metrics.port }} | ||||||
|       targetPort: metrics-port |       targetPort: metrics-port | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| {{- if and .Values.githubWebhookServer.enabled .Values.metrics.serviceMonitor }} | {{- if and .Values.githubWebhookServer.enabled .Values.metrics.serviceMonitor.enable }} | ||||||
| apiVersion: monitoring.coreos.com/v1 | apiVersion: monitoring.coreos.com/v1 | ||||||
| kind: ServiceMonitor | kind: ServiceMonitor | ||||||
| metadata: | metadata: | ||||||
|  | @ -19,6 +19,8 @@ spec: | ||||||
|       tlsConfig: |       tlsConfig: | ||||||
|         insecureSkipVerify: true |         insecureSkipVerify: true | ||||||
|       {{- end }} |       {{- end }} | ||||||
|  |       interval: {{ .Values.metrics.serviceMonitor.interval }} | ||||||
|  |       scrapeTimeout: {{ .Values.metrics.serviceMonitor.timeout }} | ||||||
|   selector: |   selector: | ||||||
|     matchLabels: |     matchLabels: | ||||||
|       {{- include "actions-runner-controller-github-webhook-server.selectorLabels" . | nindent 6 }} |       {{- include "actions-runner-controller-github-webhook-server.selectorLabels" . | nindent 6 }} | ||||||
|  |  | ||||||
|  | @ -109,7 +109,10 @@ service: | ||||||
| # Metrics service resource | # Metrics service resource | ||||||
| metrics: | metrics: | ||||||
|   serviceAnnotations: {} |   serviceAnnotations: {} | ||||||
|   serviceMonitor: false |   serviceMonitor: | ||||||
|  |     enable: false | ||||||
|  |     timeout: 30s | ||||||
|  |     interval: 1m | ||||||
|   serviceMonitorLabels: {} |   serviceMonitorLabels: {} | ||||||
|   port: 8443 |   port: 8443 | ||||||
|   proxy: |   proxy: | ||||||
|  | @ -308,7 +311,10 @@ actionsMetrics: | ||||||
|   # as a part of the helm release. |   # as a part of the helm release. | ||||||
|   # Do note that you also need actionsMetricsServer.enabled=true |   # Do note that you also need actionsMetricsServer.enabled=true | ||||||
|   # to deploy the actions-metrics-server whose k8s service is referenced by the service monitor. |   # to deploy the actions-metrics-server whose k8s service is referenced by the service monitor. | ||||||
|   serviceMonitor: false |   serviceMonitor: | ||||||
|  |     enable: false | ||||||
|  |     timeout: 30s | ||||||
|  |     interval: 1m | ||||||
|   serviceMonitorLabels: {} |   serviceMonitorLabels: {} | ||||||
|   port: 8443 |   port: 8443 | ||||||
|   proxy: |   proxy: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue