feat(argo-rollouts): Add service monitor (#474)

Co-authored-by: Scott Cabrinha <scott@internaught.io>
main
Alan Tang 2020-10-27 17:31:38 +00:00 committed by GitHub
parent fbec017cfb
commit 1f67a85a58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 1 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.9.1"
description: A Helm chart for Argo Rollouts
name: argo-rollouts
version: 0.3.7
version: 0.3.8
icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png
home: https://github.com/argoproj/argo-helm
maintainers:

View File

@ -39,6 +39,7 @@ $ helm install --name my-release argo/argo-rollouts
| controller.tolerations | [Tolerations for use with node taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` |
| controller.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` |
| controller.nodeSelector | [Node selector](https://kubernetes.io/docs/user-guide/node-selection/) | `{}` |
| controller.metrics.serviceMonitor.enabled | bool | `false` | |
| imagePullSecrets | list | `[]` | |
| installCRDs | bool | `true` | |
| podAnnotations | object | `{}` | |

View File

@ -0,0 +1,28 @@
{{- if .Values.controller.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: {{ .Release.Name }}-metrics
app.kubernetes.io/part-of: {{ .Release.Name }}
{{- if .Values.controller.metrics.serviceMonitor.additionalLabels }}
{{ toYaml .Values.controller.metrics.serviceMonitor.additionalLabels | indent 4 }}
{{- end }}
{{- if .Values.controller.metrics.serviceMonitor.additionalAnnotations }}
annotations:
{{ toYaml .Values.controller.metrics.serviceMonitor.additionalAnnotations | indent 4 }}
{{- end }}
spec:
endpoints:
- port: metrics
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
app.kubernetes.io/component: server
app.kubernetes.io/name: {{ .Release.Name }}-metrics
app.kubernetes.io/part-of: {{ .Release.Name }}
{{- end }}

View File

@ -24,6 +24,12 @@ controller:
# cpu: 50m
# memory: 64Mi
metrics:
serviceMonitor:
enabled: false
additionalLabels: {}
additionalAnnotations: {}
serviceAccount:
name: argo-rollouts