chart: Add additional labels to serviceMonitor (#670)
Add a way to add additional labels for service monitor. Could be helpful in case if you are using unified labels to scrape the metrics in k8s
This commit is contained in:
		
							parent
							
								
									67031acdc4
								
							
						
					
					
						commit
						e5a9d50cb6
					
				|  | @ -32,6 +32,7 @@ _Default values are the defaults set in the charts values.yaml, some properties | ||||||
| | `metrics.proxy.enabled`                                  | Deploy kube-rbac-proxy container in controller pod                                                                         | true                                                                 | | | `metrics.proxy.enabled`                                  | Deploy kube-rbac-proxy container in controller pod                                                                         | true                                                                 | | ||||||
| | `metrics.proxy.image.repository`                         | The "repository/image" of the kube-proxy container                                                                         | quay.io/brancz/kube-rbac-proxy                                       | | | `metrics.proxy.image.repository`                         | The "repository/image" of the kube-proxy container                                                                         | quay.io/brancz/kube-rbac-proxy                                       | | ||||||
| | `metrics.proxy.image.tag`                                | The tag of the kube-proxy image to use when pulling the container                                                          | v0.10.0                                                              | | | `metrics.proxy.image.tag`                                | The tag of the kube-proxy image to use when pulling the container                                                          | v0.10.0                                                              | | ||||||
|  | | `metrics.serviceMonitorLabels`                                 | Set labels to apply to ServiceMonitor resources                                                        |                                                                 | | ||||||
| | `imagePullSecrets`                                       | Specifies the secret to be used when pulling the controller pod containers                                                 |                                                                      | | | `imagePullSecrets`                                       | Specifies the secret to be used when pulling the controller pod containers                                                 |                                                                      | | ||||||
| | `fullNameOverride`                                       | Override the full resource names	                                                                                        |                                                                      | | | `fullNameOverride`                                       | Override the full resource names	                                                                                        |                                                                      | | ||||||
| | `nameOverride`                                           | Override the resource name prefix	                                                                                        |                                                                      | | | `nameOverride`                                           | Override the resource name prefix	                                                                                        |                                                                      | | ||||||
|  |  | ||||||
|  | @ -4,6 +4,9 @@ kind: ServiceMonitor | ||||||
| metadata: | metadata: | ||||||
|   labels: |   labels: | ||||||
|     {{- include "actions-runner-controller.labels" . | nindent 4 }} |     {{- include "actions-runner-controller.labels" . | nindent 4 }} | ||||||
|  |   {{- with .Values.metrics.serviceMonitorLabels }} | ||||||
|  |     {{- toYaml . | nindent 4 }} | ||||||
|  |   {{- end }} | ||||||
|   name: {{ include "actions-runner-controller.serviceMonitorName" . }} |   name: {{ include "actions-runner-controller.serviceMonitorName" . }} | ||||||
| spec: | spec: | ||||||
|   endpoints: |   endpoints: | ||||||
|  |  | ||||||
|  | @ -4,6 +4,9 @@ kind: ServiceMonitor | ||||||
| metadata: | metadata: | ||||||
|   labels: |   labels: | ||||||
|     {{- include "actions-runner-controller.labels" . | nindent 4 }} |     {{- include "actions-runner-controller.labels" . | nindent 4 }} | ||||||
|  |   {{- with .Values.metrics.serviceMonitorLabels }} | ||||||
|  |     {{- toYaml . | nindent 4 }} | ||||||
|  |   {{- end }} | ||||||
|   name: {{ include "actions-runner-controller-github-webhook-server.serviceMonitorName" . }} |   name: {{ include "actions-runner-controller-github-webhook-server.serviceMonitorName" . }} | ||||||
| spec: | spec: | ||||||
|   endpoints: |   endpoints: | ||||||
|  |  | ||||||
|  | @ -70,6 +70,7 @@ service: | ||||||
| 
 | 
 | ||||||
| metrics: | metrics: | ||||||
|   serviceMonitor: false |   serviceMonitor: false | ||||||
|  |   serviceMonitorLabels: {} | ||||||
|   port: 8443 |   port: 8443 | ||||||
|   proxy: |   proxy: | ||||||
|     enabled: true |     enabled: true | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue