Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove duplicated EBEAN env vars on datahub-upgrade jobs #269

Merged
merged 1 commit into from
Feb 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 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.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: 0.10.0
Expand Down
11 changes: 6 additions & 5 deletions charts/datahub/templates/datahub-upgrade/_upgrade.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ Return the env variables for upgrade jobs
- name: DATAHUB_MAE_CONSUMER_PORT
value: "{{ .Values.global.datahub.mae_consumer.port }}"
- name: EBEAN_DATASOURCE_USERNAME
value: "{{ .Values.global.sql.datasource.username }}"
value: {{ (.Values.sql).datasource.username | default .Values.global.sql.datasource.username | quote }}
- name: EBEAN_DATASOURCE_PASSWORD
{{- if .Values.global.sql.datasource.password.value }}
value: {{ .Values.global.sql.datasource.password.value | quote }}
{{- $passwordValue := (.Values.sql).datasource.password.value | default .Values.global.sql.datasource.password.value }}
{{- if $passwordValue }}
value: {{ $passwordValue | quote }}
{{- else }}
valueFrom:
secretKeyRef:
name: "{{ .Values.global.sql.datasource.password.secretRef }}"
key: "{{ .Values.global.sql.datasource.password.secretKey }}"
name: "{{ (.Values.sql).datasource.password.secretRef | default .Values.global.sql.datasource.password.secretRef }}"
key: "{{ (.Values.sql).datasource.password.secretKey | default .Values.global.sql.datasource.password.secretKey }}"
{{- end }}
- name: EBEAN_DATASOURCE_HOST
value: "{{ .Values.global.sql.datasource.host }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,6 @@ spec:
- "-a"
- "batchDelayMs={{ .Values.datahubUpgrade.batchDelayMs }}"
env:
- name: EBEAN_DATASOURCE_USERNAME
value: {{ (.Values.sql).datasource.username | default .Values.global.sql.datasource.username | quote }}
- name: EBEAN_DATASOURCE_PASSWORD
{{- $passwordValue := (.Values.sql).datasource.password.value | default .Values.global.sql.datasource.password.value }}
{{- if $passwordValue }}
value: {{ $passwordValue | quote }}
{{- else }}
valueFrom:
secretKeyRef:
name: "{{ (.Values.sql).datasource.password.secretRef | default .Values.global.sql.datasource.password.secretRef }}"
key: "{{ (.Values.sql).datasource.password.secretKey | default .Values.global.sql.datasource.password.secretKey }}"
{{- end }}
- name: EBEAN_DATASOURCE_HOST
value: "{{ .Values.global.sql.datasource.host }}"
- name: EBEAN_DATASOURCE_URL
value: "{{ .Values.global.sql.datasource.url }}"
- name: EBEAN_DATASOURCE_DRIVER
value: "{{ .Values.global.sql.datasource.driver }}"
{{- include "datahub.upgrade.env" . | nindent 16}}
{{- with .Values.datahubUpgrade.extraEnvs }}
{{- toYaml . | nindent 16 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,6 @@ spec:
value: {{ .Values.global.datahub_analytics_enabled | quote }}
- name: ENTITY_REGISTRY_CONFIG_PATH
value: /datahub/datahub-gms/resources/entity-registry.yml
- name: EBEAN_DATASOURCE_USERNAME
value: {{ (.Values.sql).datasource.username | default .Values.global.sql.datasource.username | quote }}
- name: EBEAN_DATASOURCE_PASSWORD
{{- $passwordValue := (.Values.sql).datasource.password.value | default .Values.global.sql.datasource.password.value }}
{{- if $passwordValue }}
value: {{ $passwordValue | quote }}
{{- else }}
valueFrom:
secretKeyRef:
name: "{{ (.Values.sql).datasource.password.secretRef | default .Values.global.sql.datasource.password.secretRef }}"
key: "{{ (.Values.sql).datasource.password.secretKey | default .Values.global.sql.datasource.password.secretKey }}"
{{- end }}
- name: EBEAN_DATASOURCE_HOST
value: "{{ .Values.global.sql.datasource.host }}"
- name: EBEAN_DATASOURCE_URL
value: "{{ .Values.global.sql.datasource.url }}"
- name: EBEAN_DATASOURCE_DRIVER
value: "{{ .Values.global.sql.datasource.driver }}"
- name: KAFKA_BOOTSTRAP_SERVER
value: "{{ .Values.global.kafka.bootstrap.server }}"
{{- with .Values.global.kafka.schemaregistry.url }}
Expand Down