Skip to content

Commit

Permalink
feat: add monitoring configuration to acryl-datahub-actions subchart
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterchen09 committed Jun 8, 2024
1 parent 362671f commit 2bd2e47
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 6 deletions.
4 changes: 2 additions & 2 deletions charts/datahub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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.4.16
version: 0.4.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.13.2
Expand All @@ -30,7 +30,7 @@ dependencies:
repository: file://./subcharts/datahub-ingestion-cron
condition: datahub-ingestion-cron.enabled
- name: acryl-datahub-actions
version: 0.2.146
version: 0.2.147
repository: file://./subcharts/acryl-datahub-actions
condition: acryl-datahub-actions.enabled
maintainers:
Expand Down
4 changes: 2 additions & 2 deletions charts/datahub/subcharts/acryl-datahub-actions/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.146
version: 0.2.147
# 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.0.11
appVersion: 0.0.17
1 change: 1 addition & 0 deletions charts/datahub/subcharts/acryl-datahub-actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Current chart version is `0.0.3`
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `false` | |
| serviceAccount.name | string | `nil` | |
| serviceMonitor.create | bool | `false` | If set true and `global.datahub.monitoring.enablePrometheus` is set `true` it will create a ServiceMonitor resource |
| tolerations | list | `[]` | |
| global.kafka.bootstrap.server | string | `nil` | |
| global.kafka.schemaregistry.url | string | `nil` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ spec:
- name: http
containerPort: 9093
protocol: TCP
{{- if or .Values.global.datahub.monitoring.enablePrometheus }}
- name: {{ .Values.global.datahub.monitoring.portName }}
containerPort: 8000
protocol: TCP
{{- end }}
{{- if .Values.image.command }}
command: {{ .Values.image.command | toRawJson }}
{{- end }}
Expand Down Expand Up @@ -151,6 +156,10 @@ spec:
name: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretRef }}
key: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretKey }}
{{- end }}
{{- if or .Values.global.datahub.monitoring.enablePrometheus }}
- name: DATAHUB_ACTIONS_MONITORING_ENABLED
value: "true"
{{- end }}
{{- if .Values.extraEnvs }}
{{ toYaml .Values.extraEnvs | nindent 12 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ spec:
targetPort: http
protocol: TCP
name: http
{{- if .Values.global.datahub.monitoring.enablePrometheus }}
- name: {{ .Values.global.datahub.monitoring.portName }}
port: 8000
targetPort: {{ .Values.global.datahub.monitoring.portName }}
protocol: TCP
{{- end }}
selector:
{{- include "acryl-datahub-actions.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- if and .Values.serviceMonitor.create .Values.global.datahub.monitoring.enablePrometheus -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "acryl-datahub-actions.fullname" . }}
labels:
{{- include "acryl-datahub-actions.labels" . | nindent 4 }}
{{- range $key, $val := .Values.serviceMonitor.extraLabels }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- with .Values.serviceMonitor.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: {{ .Values.global.datahub.monitoring.portName }}
relabelings:
- separator: /
sourceLabels:
- namespace
- pod
targetLabel: instance
selector:
matchLabels:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: acryl-datahub-actions
{{- end -}}
9 changes: 8 additions & 1 deletion charts/datahub/subcharts/acryl-datahub-actions/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ replicaCount: 1

image:
repository: acryldata/datahub-actions
tag: "v0.0.1"
tag: "v0.0.17"
pullPolicy: IfNotPresent
# Override the image's command & args with a new one.
# This may be necessary for custom startup or shutdown behaviors
Expand All @@ -27,6 +27,10 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name:

serviceMonitor:
create: false
extraLabels: {}

podAnnotations: {}

podSecurityContext: {}
Expand Down Expand Up @@ -96,6 +100,9 @@ global:
datahub:
gms:
port: "8080"
monitoring:
enablePrometheus: true
portName: "jmx"
metadata_service_authentication:
enabled: true
systemClientId: "__datahub_system"
Expand Down
2 changes: 1 addition & 1 deletion charts/datahub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ acryl-datahub-actions:
enabled: true
image:
repository: acryldata/datahub-actions
tag: "v0.0.15"
tag: "v0.0.17"
# Add custom command / arguments to this job. Useful if you need a custom startup or shutdown script
# to run
# command: customCommand
Expand Down

0 comments on commit 2bd2e47

Please sign in to comment.