Skip to content

Commit

Permalink
Fix null value secrets (#204)
Browse files Browse the repository at this point in the history
* Update secret and helper templates to avoid empty secret creation

* Update secret template file with correct indentation

* Update secret template file

* Remove extra function from _helpers.tpl
  • Loading branch information
preetsshah authored Jan 8, 2024
1 parent f3e45f3 commit a1cbfb5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions charts/openmetadata/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ Warning to update openmetadata global keyword to openmetadata.config */}}
{{- printf "Error: %s" . | fail }}
{{- end }}

{{/*
Function to check if passed value is empty string or null value */}}
{{- define "OpenMetadata.utils.checkEmptyString" -}}
{{- if or (empty .) (eq . "") -}}
{{- false -}}
{{- else -}}
{{- true -}}
{{- end -}}
{{- end -}}

{{/*
OpenMetadata Configurations Environment Variables*/}}
{{- define "OpenMetadata.configs" -}}
Expand Down
4 changes: 3 additions & 1 deletion charts/openmetadata/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@ metadata:
type: Opaque
data:
{{- with .Values.openmetadata.config.pipelineServiceClientConfig }}
{{- if eq (include "OpenMetadata.utils.checkEmptyString" .hostIp) "true" }}
PIPELINE_SERVICE_CLIENT_HOST_IP: {{ .hostIp | quote | b64enc }}
{{- end }}
PIPELINE_SERVICE_CLIENT_ENABLED: {{ .enabled | quote | b64enc }}
PIPELINE_SERVICE_CLIENT_CLASS_NAME: {{ .className | quote | b64enc }}
PIPELINE_SERVICE_IP_INFO_ENABLED: {{ .ingestionIpInfoEnabled | quote | b64enc }}
PIPELINE_SERVICE_CLIENT_ENDPOINT: {{ .apiEndpoint | b64enc }}
PIPELINE_SERVICE_CLIENT_VERIFY_SSL: {{ .verifySsl | quote | b64enc }}
PIPELINE_SERVICE_CLIENT_HOST_IP: {{ .hostIp | b64enc }}
PIPELINE_SERVICE_CLIENT_HEALTH_CHECK_INTERVAL: {{ .healthCheckInterval | quote | b64enc }}
PIPELINE_SERVICE_CLIENT_SSL_CERT_PATH: {{ .sslCertificatePath | quote | b64enc }}
SERVER_HOST_API_URL: {{ .metadataApiEndpoint | b64enc }}
Expand Down

0 comments on commit a1cbfb5

Please sign in to comment.