Skip to content

Commit 1f60282

Browse files
authored
feat: Expose Metrics Port & prometheus scrape annotations(#86)
1 parent aa17e27 commit 1f60282

4 files changed

Lines changed: 14 additions & 0 deletions

File tree

charts/lakekeeper/Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Changed
1111

1212
### Added
13+
* Expose Metrics Port 9000 for Catalog Pods
14+
* Add boolean `catalog.prometheus.setScrapeAnnotations` configuration option to set prometheus scrape labels
1315

1416
### Fixed
1517

charts/lakekeeper/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ For potential additional steps that are required for upgrades, please check the
9797
| catalog.podDisruptionBudget.minAvailable | string | `""` | the minimum available pods/percentage for the catalog |
9898
| catalog.podLabels | object | `{}` | Pod labels for the catalog Deployment |
9999
| catalog.podSecurityContext | <html><a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#podsecuritycontext-v1-core">podsecuritycontext-v1-core</a></html> | `{}` | security context for the catalog Pods. `runAsUser` and `runAsGroup` are ignored for the catalog container, please set with `catalog.image.uid` and `catalog.image.gid` |
100+
| catalog.prometheus.setScrapeAnnotations | bool | `false` | Adds the prometheus.io/port and prometheus.io/scrape annotations to the catalog Pods. |
100101
| catalog.readinessProbe.enabled | bool | `true` | if the readiness probes of the catalog Pods are enabled |
101102
| catalog.readinessProbe.failureThreshold | int | `5` | |
102103
| catalog.readinessProbe.initialDelaySeconds | int | `1` | |

charts/lakekeeper/templates/catalog/catalog-deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ spec:
3030
{{- if .Values.catalog.safeToEvict }}
3131
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
3232
{{- end }}
33+
{{- if .Values.catalog.prometheus.setScrapeAnnotations }}
34+
prometheus.io/port: "9000"
35+
prometheus.io/scrape: "true"
36+
{{- end }}
3337
labels:
3438
{{- include "iceberg-catalog.labels" . | nindent 8 }}
3539
app.kubernetes.io/component: catalog
@@ -82,6 +86,9 @@ spec:
8286
- name: http
8387
containerPort: 8181
8488
protocol: TCP
89+
- name: metrics
90+
containerPort: 9000
91+
protocol: TCP
8592
{{- if .Values.catalog.command }}
8693
command:
8794
{{- toYaml .Values.catalog.command | nindent 12 }}

charts/lakekeeper/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ catalog:
297297
# -- the name of a pre-created Secret containing a TLS private key and certificate
298298
secretName: ""
299299

300+
prometheus:
301+
# -- Adds the prometheus.io/port and prometheus.io/scrape annotations to the catalog Pods.
302+
setScrapeAnnotations: false
303+
300304
serviceAccount:
301305
# -- Specifies whether a service account should be created.
302306
# If `false`, you must create the you must create the service account outside this chart with name: `serviceAccount.name`

0 commit comments

Comments
 (0)