Fixes broken config path for functions (#1177)
This commit is contained in:
@@ -93,7 +93,7 @@ func MakeFetcherConfig(sharedMountPath string) (*Config, error) {
|
|||||||
fetcherImagePullPolicy: fission.GetImagePullPolicy(fetcherImagePullPolicy),
|
fetcherImagePullPolicy: fission.GetImagePullPolicy(fetcherImagePullPolicy),
|
||||||
sharedMountPath: sharedMountPath,
|
sharedMountPath: sharedMountPath,
|
||||||
sharedSecretPath: "/secrets",
|
sharedSecretPath: "/secrets",
|
||||||
sharedCfgMapPath: "/configmaps",
|
sharedCfgMapPath: "/configs",
|
||||||
jaegerCollectorEndpoint: os.Getenv("OPENCENSUS_TRACE_JAEGER_COLLECTOR_ENDPOINT"),
|
jaegerCollectorEndpoint: os.Getenv("OPENCENSUS_TRACE_JAEGER_COLLECTOR_ENDPOINT"),
|
||||||
serviceAccount: fission.FissionFetcherSA,
|
serviceAccount: fission.FissionFetcherSA,
|
||||||
}, nil
|
}, nil
|
||||||
|
|||||||
@@ -597,7 +597,7 @@ func (fetcher *Fetcher) SpecializePod(ctx context.Context, fetchReq fission.Func
|
|||||||
|
|
||||||
_, err = fetcher.FetchSecretsAndCfgMaps(fetchReq.Secrets, fetchReq.ConfigMaps)
|
_, err = fetcher.FetchSecretsAndCfgMaps(fetchReq.Secrets, fetchReq.ConfigMaps)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "error fetching secrets/configmaps")
|
return errors.Wrap(err, "error fetching secrets/configs")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Specialize the pod
|
// Specialize the pod
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
def main():
|
def main():
|
||||||
path = "/configmaps/default/{{ FN_CFGMAP }}/TEST_KEY"
|
path = "/configs/default/{{ FN_CFGMAP }}/TEST_KEY"
|
||||||
f = open(path, "r")
|
f = open(path, "r")
|
||||||
data = f.read()
|
data = f.read()
|
||||||
return data, 200
|
return data, 200
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
def main():
|
def main():
|
||||||
cfgmap_path = "/configmaps/"
|
cfgmap_path = "/configs/"
|
||||||
secret_path = "/secrets/"
|
secret_path = "/secrets/"
|
||||||
if os.listdir(cfgmap_path) or os.listdir(secret_path):
|
if os.listdir(cfgmap_path) or os.listdir(secret_path):
|
||||||
return "no", 400
|
return "no", 400
|
||||||
|
|||||||
Reference in New Issue
Block a user