Skip to content

Commit

Permalink
feat: add monitoring.portName in values.yaml (#407)
Browse files Browse the repository at this point in the history
* feat: add `monitoring.portName` in values.yaml
Add support for customizing the `portName` for monitoring.  It is currently hardcoded
to `jmx`.  In our setup, the prometheus scraper is looking for ports that are called
`prometheus`.  This change allows this value to be customized to any value that is
needed for a specific environment.  If no value is provided, it remains `jmx`.

---------

Co-authored-by: Travis Cook <[email protected]>
  • Loading branch information
travis-cook-sfdc and Travis Cook authored Dec 11, 2023
1 parent cbf1cab commit b969ce1
Show file tree
Hide file tree
Showing 23 changed files with 131 additions and 124 deletions.
10 changes: 5 additions & 5 deletions charts/datahub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ description: A Helm chart for LinkedIn DataHub
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.3.16
version: 0.3.17
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 0.11.0
dependencies:
- name: datahub-gms
version: 0.2.157
version: 0.2.158
repository: file://./subcharts/datahub-gms
condition: datahub-gms.enabled
- name: datahub-frontend
version: 0.2.149
version: 0.2.150
repository: file://./subcharts/datahub-frontend
condition: datahub-frontend.enabled
- name: datahub-mae-consumer
version: 0.2.151
version: 0.2.152
repository: file://./subcharts/datahub-mae-consumer
condition: global.datahub_standalone_consumers_enabled
- name: datahub-mce-consumer
version: 0.2.153
version: 0.2.154
repository: file://./subcharts/datahub-mce-consumer
condition: global.datahub_standalone_consumers_enabled
- name: datahub-ingestion-cron
Expand Down
199 changes: 100 additions & 99 deletions charts/datahub/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion charts/datahub/subcharts/datahub-frontend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: A Helm chart for Kubernetes
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.2.149
version: 0.2.150
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v0.11.0
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
containerPort: {{ .Values.service.containerPort }}
protocol: TCP
{{- if or .Values.global.datahub.monitoring.enablePrometheus .Values.global.datahub.monitoring.enableJMXPort }}
- name: jmx
- name: {{ .Values.global.datahub.monitoring.portName }}
containerPort: 4318
protocol: TCP
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.global.datahub.monitoring.enablePrometheus }}
- name: jmx
- name: {{ .Values.global.datahub.monitoring.portName }}
port: 4318
targetPort: jmx
targetPort: {{ .Values.global.datahub.monitoring.portName }}
protocol: TCP
{{- end }}
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
{{- end }}
spec:
endpoints:
- port: jmx
- port: {{ .Values.global.datahub.monitoring.portName }}
relabelings:
- separator: /
sourceLabels:
Expand Down
1 change: 1 addition & 0 deletions charts/datahub/subcharts/datahub-frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ global:
port: "8080"
monitoring:
enablePrometheus: true
portName: "jmx"
appVersion: "1.0"
frontend:
validateSignUpEmail: true
Expand Down
2 changes: 1 addition & 1 deletion charts/datahub/subcharts/datahub-gms/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: A Helm chart for LinkedIn DataHub's datahub-gms component
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.2.157
version: 0.2.158
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v0.11.0
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
containerPort: 8080
protocol: TCP
{{- if or .Values.global.datahub.monitoring.enablePrometheus .Values.global.datahub.monitoring.enableJMXPort }}
- name: jmx
- name: {{ .Values.global.datahub.monitoring.portName }}
containerPort: 4318
protocol: TCP
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/datahub/subcharts/datahub-gms/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.global.datahub.monitoring.enablePrometheus }}
- name: jmx
- name: {{ .Values.global.datahub.monitoring.portName }}
port: 4318
targetPort: jmx
targetPort: {{ .Values.global.datahub.monitoring.portName }}
protocol: TCP
{{- end }}
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
{{- end }}
spec:
endpoints:
- port: jmx
- port: {{ .Values.global.datahub.monitoring.portName }}
relabelings:
- separator: /
sourceLabels:
Expand Down
1 change: 1 addition & 0 deletions charts/datahub/subcharts/datahub-gms/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ global:
monitoring:
enablePrometheus: false
enableJMXPort: false
portName: jmx
gms:
port: "8080"
appVersion: "1.0"
Expand Down
2 changes: 1 addition & 1 deletion charts/datahub/subcharts/datahub-mae-consumer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: A Helm chart for Kubernetes
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.2.151
version: 0.2.152
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v0.11.0
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
containerPort: 9091
protocol: TCP
{{- if or .Values.global.datahub.monitoring.enablePrometheus .Values.global.datahub.monitoring.enableJMXPort }}
- name: jmx
- name: {{ .Values.global.datahub.monitoring.portName }}
containerPort: 4318
protocol: TCP
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.global.datahub.monitoring.enablePrometheus }}
- name: jmx
- name: {{ .Values.global.datahub.monitoring.portName }}
port: 4318
targetPort: jmx
targetPort: {{ .Values.global.datahub.monitoring.portName }}
protocol: TCP
{{- end }}
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
{{- end }}
spec:
endpoints:
- port: jmx
- port: {{ .Values.global.datahub.monitoring.portName }}
relabelings:
- separator: /
sourceLabels:
Expand Down
1 change: 1 addition & 0 deletions charts/datahub/subcharts/datahub-mae-consumer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ global:
port: "8080"
monitoring:
enablePrometheus: false
portName: jmx

systemUpdate:
## The following options control settings for datahub-upgrade job which will
Expand Down
2 changes: 1 addition & 1 deletion charts/datahub/subcharts/datahub-mce-consumer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: A Helm chart for Kubernetes
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.2.153
version: 0.2.154
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v0.11.0
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
containerPort: 9090
protocol: TCP
{{- if or .Values.global.datahub.monitoring.enablePrometheus .Values.global.datahub.monitoring.enableJMXPort }}
- name: jmx
- name: {{ .Values.global.datahub.monitoring.portName }}
containerPort: 4318
protocol: TCP
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.global.datahub.monitoring.enablePrometheus }}
- name: jmx
- name: {{ .Values.global.datahub.monitoring.portName }}
port: 4318
targetPort: jmx
targetPort: {{ .Values.global.datahub.monitoring.portName }}
protocol: TCP
{{- end }}
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
{{- end }}
spec:
endpoints:
- port: jmx
- port: {{ .Values.global.datahub.monitoring.portName }}
relabelings:
- separator: /
sourceLabels:
Expand Down
1 change: 1 addition & 0 deletions charts/datahub/subcharts/datahub-mce-consumer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ global:
version: head
monitoring:
enablePrometheus: false
portName: jmx
gms:
port: "8080"
metadata_service_authentication:
Expand Down
2 changes: 2 additions & 0 deletions charts/datahub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@ global:

monitoring:
enablePrometheus: true
# Set a custom name for the monitoring port
portName: jmx

mae_consumer:
port: "9091"
Expand Down

0 comments on commit b969ce1

Please sign in to comment.