Skip to content

Commit

Permalink
add additional configuration to optional serviceMonitor (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
fishnix authored Feb 10, 2023
1 parent c3d4ae6 commit a233070
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ description: |-
and maintained by your friends at Equinix Metal
type: application
version: 0.1.11
version: 0.1.12
appVersion: "0.1.0"
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Krakend

![Version: 0.1.11](https://img.shields.io/badge/Version-0.1.11-informational?style=for-the-badge)
![Version: 0.1.12](https://img.shields.io/badge/Version-0.1.12-informational?style=for-the-badge)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge)
![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=for-the-badge)

Expand Down Expand Up @@ -74,11 +74,10 @@ please refer to [the official krakend documentation](https://www.krakend.io/docs
| serviceAccount.annotations | object | `{}` | The annotations to use for the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| serviceMonitor | object | `{"annotations":{},"enabled":false,"interval":"10s","labels":{},"scrapeTimeout":"10s","targetPort":9091}` | The serviceMonitor configures a ServiceMonitor for your application |
| serviceMonitor | object | `{"annotations":{},"enabled":false,"interval":"10s","scrapeTimeout":"10s","targetPort":9091}` | The serviceMonitor configures a ServiceMonitor for your application |
| serviceMonitor.annotations | object | `{}` | Annotations to add to ServiceMonitor |
| serviceMonitor.enabled | bool | `false` | Set to true to create a default ServiceMonitor for your application |
| serviceMonitor.interval | string | `"10s"` | Interval for scrape metrics. |
| serviceMonitor.labels | object | `{}` | Labels to add to ServiceMonitor |
| serviceMonitor.scrapeTimeout | string | `"10s"` | time out interval when scraping metrics |
| serviceMonitor.targetPort | int | `9091` | prometheus metrics port exposed by krakend |
| strategy | object | `{}` | The strategy for the krakend deployment. This can either be a `deployment` or a `rollout` strategy. For more information on the Argo Rollout strategy, see https://argo-rollouts.readthedocs.io/en/stable/features/specification/ |
Expand Down
8 changes: 7 additions & 1 deletion templates/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ metadata:
{{- end }}
{{- end }}
spec:
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels: {{- include "krakend.selectorLabels" . | nindent 6 }}
endpoints:
- port: metrics
- interval: {{ .Values.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
path: /metrics
targetPort: {{ .Values.serviceMonitor.targetPort }}
{{- end }}
2 changes: 0 additions & 2 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ readinessProbe:
serviceMonitor:
# -- (bool) Set to true to create a default ServiceMonitor for your application
enabled: false
# -- Labels to add to ServiceMonitor
labels: {}
# -- Annotations to add to ServiceMonitor
annotations: {}
# -- Interval for scrape metrics.
Expand Down

0 comments on commit a233070

Please sign in to comment.