ソースを参照

HPCC-24093 WsStore on K8: Malformed URL error

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 4 年 前
コミット
ed044e9c8e
2 ファイル変更6 行追加5 行削除
  1. 3 2
      helm/hpcc/templates/_helpers.tpl
  2. 3 3
      plugins/fileservices/fileservices.cpp

+ 3 - 2
helm/hpcc/templates/_helpers.tpl

@@ -47,7 +47,6 @@ Generate global ConfigMap info
 Pass in root as .
 Pass in root as .
 */}}
 */}}
 {{- define "hpcc.generateGlobalConfigMap" -}}
 {{- define "hpcc.generateGlobalConfigMap" -}}
-{{- $local := dict "defaultEsp" "" -}}
 {{- /*Create local variables which always exist to avoid having to check if intermediate key values exist*/ -}}
 {{- /*Create local variables which always exist to avoid having to check if intermediate key values exist*/ -}}
 {{- $storage := (.Values.storage | default dict) -}}
 {{- $storage := (.Values.storage | default dict) -}}
 {{- $planes := ($storage.planes | default list) -}}
 {{- $planes := ($storage.planes | default list) -}}
@@ -61,7 +60,9 @@ Pass in root as .
 {{- $dllStoragePlane := ($dllStorage.plane | default "hpcc-dlls-plane") -}}
 {{- $dllStoragePlane := ($dllStorage.plane | default "hpcc-dlls-plane") -}}
 imageVersion: {{ required "Please specify .global.image.version" .Values.global.image.version | quote }}
 imageVersion: {{ required "Please specify .global.image.version" .Values.global.image.version | quote }}
 singleNode: {{ .Values.global.singleNode | default false }}
 singleNode: {{ .Values.global.singleNode | default false }}
-defaultEsp: {{ .Values.global.defaultEsp | default ""}}
+{{ if .Values.global.defaultEsp -}}
+defaultEsp: {{ .Values.global.defaultEsp | quote }}
+{{ end -}}
 {{ if hasPrefix "[]" (typeOf .Values.esp) -}}
 {{ if hasPrefix "[]" (typeOf .Values.esp) -}}
 esp:
 esp:
 {{ toYaml .Values.esp }}
 {{ toYaml .Values.esp }}

+ 3 - 3
plugins/fileservices/fileservices.cpp

@@ -2858,9 +2858,9 @@ FILESERVICES_API char * FILESERVICES_CALL fsGetEspURL(const char *username, cons
 {
 {
 #ifdef _CONTAINERIZED
 #ifdef _CONTAINERIZED
     const char *defaultEsp = queryComponentConfig().queryProp("@defaultEsp");
     const char *defaultEsp = queryComponentConfig().queryProp("@defaultEsp");
-    if (!defaultEsp)
+    if (isEmptyString(defaultEsp))
         defaultEsp = queryGlobalConfig().queryProp("@defaultEsp");
         defaultEsp = queryGlobalConfig().queryProp("@defaultEsp");
-    if (!defaultEsp)
+    if (isEmptyString(defaultEsp))
     {
     {
         Owned<IPropertyTreeIterator> esps = queryGlobalConfig().getElements("esp");
         Owned<IPropertyTreeIterator> esps = queryGlobalConfig().getElements("esp");
         ForEach(*esps)
         ForEach(*esps)
@@ -2878,7 +2878,7 @@ FILESERVICES_API char * FILESERVICES_CALL fsGetEspURL(const char *username, cons
             }
             }
         }
         }
     }
     }
-    if (defaultEsp)
+    if (!isEmptyString(defaultEsp))
     {
     {
         StringBuffer credentials;
         StringBuffer credentials;
         if (username && username[0] && userPW && userPW[0])
         if (username && username[0] && userPW && userPW[0])