Skip to content

Commit e5136c8

Browse files
feat: add serviceMonitor and podMonitor (#384)
1 parent fe02f49 commit e5136c8

File tree

5 files changed

+43
-6
lines changed

5 files changed

+43
-6
lines changed

charts/cf-runtime/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
description: A Helm chart for Codefresh Runner
33
name: cf-runtime
4-
version: 5.1.1
4+
version: 5.2.0
55
keywords:
66
- codefresh
77
- runner
@@ -14,9 +14,9 @@ maintainers:
1414
url: https://codefresh-io.github.io/
1515
annotations:
1616
artifacthub.io/changes: |
17-
- kind: fixed
18-
description: Fix userEnvVars for .runtime.engine
17+
- kind: added
18+
description: Add serviceMonitor and podMonitor templates
1919
dependencies:
2020
- name: cf-common
2121
repository: https://chartmuseum.codefresh.io/cf-common
22-
version: 0.12.3
22+
version: 0.13.0

charts/cf-runtime/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Codefresh Runner
22

3-
![Version: 5.1.1](https://img.shields.io/badge/Version-5.1.1-informational?style=flat-square)
3+
![Version: 5.2.0](https://img.shields.io/badge/Version-5.2.0-informational?style=flat-square)
44

55
Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/installation/codefresh-runner/) to Kubernetes.
66

@@ -694,7 +694,7 @@ Go to [https://<YOUR_ONPREM_DOMAIN_HERE>/admin/runtime-environments/system](http
694694

695695
| Repository | Name | Version |
696696
|------------|------|---------|
697-
| https://chartmuseum.codefresh.io/cf-common | cf-common | 0.12.3 |
697+
| https://chartmuseum.codefresh.io/cf-common | cf-common | 0.13.0 |
698698

699699
## Values
700700

@@ -768,6 +768,8 @@ Go to [https://<YOUR_ONPREM_DOMAIN_HERE>/admin/runtime-environments/system](http
768768
| monitor.tolerations | list | `[]` | Set tolerations |
769769
| monitor.updateStrategy | object | `{"type":"RollingUpdate"}` | Upgrade strategy |
770770
| nameOverride | string | `""` | String to partially override cf-runtime.fullname template (will maintain the release name) |
771+
| podMonitor | object | See below | Add podMonitor (for engine pods) |
772+
| podMonitor.main.enabled | bool | `false` | Enable service monitor |
771773
| re | object | `{}` | |
772774
| runner | object | See below | Runner parameters |
773775
| runner.affinity | object | `{}` | Set affinity |
@@ -834,6 +836,8 @@ Go to [https://<YOUR_ONPREM_DOMAIN_HERE>/admin/runtime-environments/system](http
834836
| runtime.rbac.rules | list | `[]` | Add custom rule to the engine role |
835837
| runtime.runtimeExtends | list | `["system/default/hybrid/k8s_low_limits"]` | Set parent runtime to inherit. Should not be changes. Parent runtime is controlled from Codefresh side. |
836838
| runtime.serviceAccount | object | `{"annotations":{},"create":true}` | Set annotation on engine Service Account Ref: https://codefresh.io/docs/docs/administration/codefresh-runner/#injecting-aws-arn-roles-into-the-cluster |
839+
| serviceMonitor | object | See below | Add serviceMonitor (for dind pods) |
840+
| serviceMonitor.main.enabled | bool | `false` | Enable service monitor |
837841
| storage.azuredisk.cachingMode | string | `"None"` | |
838842
| storage.azuredisk.skuName | string | `"Premium_LRS"` | Set storage type (`Premium_LRS`) |
839843
| storage.backend | string | `"local"` | Set backend volume type (`local`/`ebs`/`ebs-csi`/`gcedisk`/`azuredisk`) |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{{ $templateName := printf "cf-common-%s.podMonitor" (index .Subcharts "cf-common").Chart.Version }}
2+
{{- include $templateName . -}}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{{ $templateName := printf "cf-common-%s.serviceMonitor" (index .Subcharts "cf-common").Chart.Version }}
2+
{{- include $templateName . -}}

charts/cf-runtime/values.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,35 @@ monitor:
728728
# -- Set affinity
729729
affinity: {}
730730

731+
# -- Add serviceMonitor (for dind pods)
732+
# @default -- See below
733+
serviceMonitor:
734+
main:
735+
# -- Enable service monitor
736+
enabled: false
737+
selector:
738+
matchLabels:
739+
app: dind
740+
endpoints:
741+
- path: /metrics
742+
targetPort: 9100
743+
relabelings:
744+
- action: labelmap
745+
regex: __meta_kubernetes_pod_label_(.+)
746+
747+
# -- Add podMonitor (for engine pods)
748+
# @default -- See below
749+
podMonitor:
750+
main:
751+
# -- Enable service monitor
752+
enabled: false
753+
selector:
754+
matchLabels:
755+
app: runtime
756+
podMetricsEndpoints:
757+
- path: /metrics
758+
targetPort: 9100
759+
731760
# -- Array of extra objects to deploy with the release
732761
extraResources: []
733762
# E.g.

0 commit comments

Comments
 (0)