Skip to content

Commit

Permalink
fix(kafka-setup): Make kafka setup use explicit topic names (#245)
Browse files Browse the repository at this point in the history
* fix(kafka-setup): Make kafka setup use explicit topic names

* Set kafka env vars for all deployments

* Update gms & actions pod env vars

* Add documentation for new properties
  • Loading branch information
pedro93 authored Jan 25, 2023
1 parent d3a8e1e commit dd2678b
Show file tree
Hide file tree
Showing 13 changed files with 132 additions and 9 deletions.
10 changes: 5 additions & 5 deletions charts/datahub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ 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.2.140
version: 0.2.141
# 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.9.6.1
dependencies:
- name: datahub-gms
version: 0.2.132
version: 0.2.133
repository: file://./subcharts/datahub-gms
condition: datahub-gms.enabled
- name: datahub-frontend
version: 0.2.132
repository: file://./subcharts/datahub-frontend
condition: datahub-frontend.enabled
- name: datahub-mae-consumer
version: 0.2.131
version: 0.2.132
repository: file://./subcharts/datahub-mae-consumer
condition: global.datahub_standalone_consumers_enabled
- name: datahub-mce-consumer
version: 0.2.132
version: 0.2.133
repository: file://./subcharts/datahub-mce-consumer
condition: global.datahub_standalone_consumers_enabled
- name: datahub-ingestion-cron
version: 0.2.130
repository: file://./subcharts/datahub-ingestion-cron
condition: datahub-ingestion-cron.enabled
- name: acryl-datahub-actions
version: 0.2.130
version: 0.2.131
repository: file://./subcharts/acryl-datahub-actions
condition: acryl-datahub-actions.enabled
maintainers:
Expand Down
9 changes: 9 additions & 0 deletions charts/datahub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ helm install datahub datahub/datahub --values <<path-to-values-file>>
| global.elasticsearch.port | string | `"9200"` | Elasticsearch port |
| global.kafka.bootstrap.server | string | `"prerequisites-broker:9092"` | Kafka bootstrap servers (with port) |
| global.kafka.zookeeper.server | string | `"prerequisites-zookeeper:2181"` | Kafka zookeeper servers (with port) |
| global.kafka.topics.metadata_change_event_name | string | `"MetadataChangeEvent_v4"` | Kafka topic name for Metadata Change Events (deprecated) |
| global.kafka.topics.failed_metadata_change_event_name | string | `"FailedMetadataChangeEvent_v4"` | Kafka topic name for Failed Metadata Change events (deprecated) |
| global.kafka.topics.metadata_audit_event_name | string | `"MetadataAuditEvent_v4"` | Kafka topic name for Metadata Audit events (deprecated) |
| global.kafka.topics.datahub_usage_event_name | string | `"DataHubUsageEvent_v1"` | Kafka topic name for DataHub Usage events |
| global.kafka.topics.metadata_change_proposal_topic_name | string | `"MetadataChangeProposal_v1"` | Kafka topic name for Metadata Change Proposal events |
| global.kafka.topics.failed_metadata_change_proposal_topic_name | string | `"FailedMetadataChangeProposal_v1"` | Kafka topic name for Failed Metadata Change Proposal events |
| global.kafka.topics.metadata_change_log_versioned_topic_name | string | `"MetadataChangeLog_Versioned_v1"` | Kafka topic name for Versioned Metadata Change Log events |
| global.kafka.topics.metadata_change_log_timeseries_topic_name | string | `"MetadataChangeLog_Timeseries_v1"` | Kafka topic name for Timeseries Metadata Change Log events |
| global.kafka.topics.platform_event_topic_name | string | `"PlatformEvent_v1"` | Kafka topic name for Platform events |
| global.kafka.schemaregistry.url | string | `"http://prerequisites-cp-schema-registry:8081"` | URL to kafka schema registry |
| global.neo4j.host | string | `"prerequisites-neo4j:7474"` | Neo4j host address (with port) |
| global.neo4j.uri | string | `"bolt://prerequisites-neo4j"` | Neo4j URI |
Expand Down
2 changes: 1 addition & 1 deletion 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.130
version: 0.2.131
# 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.7
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,26 @@ spec:
key: {{ $envVarValue }}
{{- end }}
{{- end }}
{{- with .Values.global.kafka.topics }}
- name: METADATA_CHANGE_EVENT_NAME
value: {{ .metadata_change_event_name }}
- name: FAILED_METADATA_CHANGE_EVENT_NAME
value: {{ .failed_metadata_change_event_name }}
- name: METADATA_AUDIT_EVENT_NAME
value: {{ .metadata_audit_event_name }}
- name: DATAHUB_USAGE_EVENT_NAME
value: {{ .datahub_usage_event_name }}
- name: METADATA_CHANGE_PROPOSAL_TOPIC_NAME
value: {{ .metadata_change_proposal_topic_name }}
- name: FAILED_METADATA_CHANGE_PROPOSAL_TOPIC_NAME
value: {{ .failed_metadata_change_proposal_topic_name }}
- name: METADATA_CHANGE_LOG_VERSIONED_TOPIC_NAME
value: {{ .metadata_change_log_versioned_topic_name }}
- name: METADATA_CHANGE_LOG_TIMESERIES_TOPIC_NAME
value: {{ .metadata_change_log_timeseries_topic_name }}
- name: PLATFORM_EVENT_TOPIC_NAME
value: {{ .platform_event_topic_name }}
{{- end }}
{{- if .Values.global.datahub.metadata_service_authentication.enabled }}
- name: DATAHUB_SYSTEM_CLIENT_ID
value: {{ .Values.global.datahub.metadata_service_authentication.systemClientId }}
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.132
version: 0.2.133
# 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.9.6.1
20 changes: 20 additions & 0 deletions charts/datahub/subcharts/datahub-gms/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,26 @@ spec:
key: {{ $envVarValue }}
{{- end }}
{{- end }}
{{- with .Values.global.kafka.topics }}
- name: METADATA_CHANGE_EVENT_NAME
value: {{ .metadata_change_event_name }}
- name: FAILED_METADATA_CHANGE_EVENT_NAME
value: {{ .failed_metadata_change_event_name }}
- name: METADATA_AUDIT_EVENT_NAME
value: {{ .metadata_audit_event_name }}
- name: DATAHUB_USAGE_EVENT_NAME
value: {{ .datahub_usage_event_name }}
- name: METADATA_CHANGE_PROPOSAL_TOPIC_NAME
value: {{ .metadata_change_proposal_topic_name }}
- name: FAILED_METADATA_CHANGE_PROPOSAL_TOPIC_NAME
value: {{ .failed_metadata_change_proposal_topic_name }}
- name: METADATA_CHANGE_LOG_VERSIONED_TOPIC_NAME
value: {{ .metadata_change_log_versioned_topic_name }}
- name: METADATA_CHANGE_LOG_TIMESERIES_TOPIC_NAME
value: {{ .metadata_change_log_timeseries_topic_name }}
- name: PLATFORM_EVENT_TOPIC_NAME
value: {{ .platform_event_topic_name }}
{{- end }}
{{- if .Values.global.datahub.metadata_service_authentication.enabled }}
- name: METADATA_SERVICE_AUTH_ENABLED
value: "true"
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.131
version: 0.2.132
# 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.9.6.1
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,18 @@ spec:
key: {{ $envVarValue }}
{{- end }}
{{- end }}
{{- with .Values.global.kafka.topics }}
- name: METADATA_AUDIT_EVENT_NAME
value: {{ .metadata_audit_event_name }}
- name: DATAHUB_USAGE_EVENT_NAME
value: {{ .datahub_usage_event_name }}
- name: METADATA_CHANGE_LOG_VERSIONED_TOPIC_NAME
value: {{ .metadata_change_log_versioned_topic_name }}
- name: METADATA_CHANGE_LOG_TIMESERIES_TOPIC_NAME
value: {{ .metadata_change_log_timeseries_topic_name }}
- name: PLATFORM_EVENT_TOPIC_NAME
value: {{ .platform_event_topic_name }}
{{- end }}
{{- with .Values.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}
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.132
version: 0.2.133
# 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.9.6.1
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,20 @@ spec:
key: {{ $envVarValue }}
{{- end }}
{{- end }}
{{- with .Values.global.kafka.topics }}
- name: METADATA_CHANGE_EVENT_NAME
value: {{ .metadata_change_event_name }}
- name: FAILED_METADATA_CHANGE_EVENT_NAME
value: {{ .failed_metadata_change_event_name }}
- name: METADATA_CHANGE_PROPOSAL_TOPIC_NAME
value: {{ .metadata_change_proposal_topic_name }}
- name: FAILED_METADATA_CHANGE_PROPOSAL_TOPIC_NAME
value: {{ .failed_metadata_change_proposal_topic_name }}
- name: METADATA_CHANGE_LOG_VERSIONED_TOPIC_NAME
value: {{ .metadata_change_log_versioned_topic_name }}
- name: METADATA_CHANGE_LOG_TIMESERIES_TOPIC_NAME
value: {{ .metadata_change_log_timeseries_topic_name }}
{{- end }}
{{- with .Values.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
16 changes: 16 additions & 0 deletions charts/datahub/templates/datahub-upgrade/_upgrade.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,20 @@ Return the env variables for upgrade jobs
key: {{ $envVarValue }}
{{- end }}
{{- end }}
{{- with .Values.global.kafka.topics }}
- name: METADATA_CHANGE_EVENT_NAME
value: {{ .metadata_change_event_name }}
- name: FAILED_METADATA_CHANGE_EVENT_NAME
value: {{ .failed_metadata_change_event_name }}
- name: METADATA_AUDIT_EVENT_NAME
value: {{ .metadata_audit_event_name }}
- name: METADATA_CHANGE_PROPOSAL_TOPIC_NAME
value: {{ .metadata_change_proposal_topic_name }}
- name: FAILED_METADATA_CHANGE_PROPOSAL_TOPIC_NAME
value: {{ .failed_metadata_change_proposal_topic_name }}
- name: METADATA_CHANGE_LOG_VERSIONED_TOPIC_NAME
value: {{ .metadata_change_log_versioned_topic_name }}
- name: METADATA_CHANGE_LOG_TIMESERIES_TOPIC_NAME
value: {{ .metadata_change_log_timeseries_topic_name }}
{{- end }}
{{- end -}}
20 changes: 20 additions & 0 deletions charts/datahub/templates/kafka-setup-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,26 @@ spec:
key: {{ $envVarValue }}
{{- end }}
{{- end }}
{{- with .Values.global.kafka.topics }}
- name: METADATA_CHANGE_EVENT_NAME
value: {{ .metadata_change_event_name }}
- name: FAILED_METADATA_CHANGE_EVENT_NAME
value: {{ .failed_metadata_change_event_name }}
- name: METADATA_AUDIT_EVENT_NAME
value: {{ .metadata_audit_event_name }}
- name: DATAHUB_USAGE_EVENT_NAME
value: {{ .datahub_usage_event_name }}
- name: METADATA_CHANGE_PROPOSAL_TOPIC_NAME
value: {{ .metadata_change_proposal_topic_name }}
- name: FAILED_METADATA_CHANGE_PROPOSAL_TOPIC_NAME
value: {{ .failed_metadata_change_proposal_topic_name }}
- name: METADATA_CHANGE_LOG_VERSIONED_TOPIC_NAME
value: {{ .metadata_change_log_versioned_topic_name }}
- name: METADATA_CHANGE_LOG_TIMESERIES_TOPIC_NAME
value: {{ .metadata_change_log_timeseries_topic_name }}
- name: PLATFORM_EVENT_TOPIC_NAME
value: {{ .platform_event_topic_name }}
{{- end }}
{{- with .Values.global.kafka.partitions }}
- name: PARTITIONS
value: {{ . | quote }}
Expand Down
12 changes: 12 additions & 0 deletions charts/datahub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,18 @@ global:
server: "prerequisites-kafka:9092"
zookeeper:
server: "prerequisites-zookeeper:2181"
# This section defines the names for the kafka topics that DataHub depends on, at a global level. Do not override this config
# at a sub-chart level.
topics:
metadata_change_event_name: "MetadataChangeEvent_v4"
failed_metadata_change_event_name: "FailedMetadataChangeEvent_v4"
metadata_audit_event_name: "MetadataAuditEvent_v4"
datahub_usage_event_name: "DataHubUsageEvent_v1"
metadata_change_proposal_topic_name: "MetadataChangeProposal_v1"
failed_metadata_change_proposal_topic_name: "FailedMetadataChangeProposal_v1"
metadata_change_log_versioned_topic_name: "MetadataChangeLog_Versioned_v1"
metadata_change_log_timeseries_topic_name: "MetadataChangeLog_Timeseries_v1"
platform_event_topic_name: "PlatformEvent_v1"
## For AWS MSK set this to a number larger than 1
# partitions: 3
# replicationFactor: 3
Expand Down

0 comments on commit dd2678b

Please sign in to comment.