Skip to content
Snippets Groups Projects
Commit 5b27798d authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

templates: templates/kube, templates/html

parent 54288fad
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ baseRepl['commands'] = templatize(cconfig.commands.path)(baseRepl) ...@@ -32,7 +32,7 @@ baseRepl['commands'] = templatize(cconfig.commands.path)(baseRepl)
// Given a path loads it and compiles a template for it, use loadTemplate that has caching // Given a path loads it and compiles a template for it, use loadTemplate that has caching
function loadTemplateInternal(templatePath, next) { function loadTemplateInternal(templatePath, next) {
const templateRealPath = path.join(templatesDir, templatePath || "defaultTemplate.yaml") const templateRealPath = path.join(templatesDir, templatePath || "kube/defaultTemplate.yaml")
fs.readFile(templateRealPath, 'utf8', function(err, data) { fs.readFile(templateRealPath, 'utf8', function(err, data) {
if (err) { if (err) {
err.message = err.message + ` loading ${templateRealPath}` err.message = err.message + ` loading ${templateRealPath}`
...@@ -93,7 +93,7 @@ function evalTemplate(templatePath, extraRepl, next) { ...@@ -93,7 +93,7 @@ function evalTemplate(templatePath, extraRepl, next) {
} }
function namespaceTemplate(name, next) { function namespaceTemplate(name, next) {
evalTemplate("namespace.yaml", { namespace: name }, next) evalTemplate("kube/namespace.yaml", { namespace: name }, next)
} }
/// returns a short session ID from a long session id /// returns a short session ID from a long session id
......
...@@ -6,6 +6,6 @@ k8component: { ...@@ -6,6 +6,6 @@ k8component: {
port: 8809, port: 8809,
prefix: "/jupyter", prefix: "/jupyter",
homePath: "/home/beaker" homePath: "/home/beaker"
templatePath: "remoteVisTemplate.yaml" templatePath: "kube/remoteVisTemplate.yaml"
} }
} }
...@@ -11,7 +11,7 @@ app: { ...@@ -11,7 +11,7 @@ app: {
frontendAddr: "http://127.0.0.1:4200" frontendAddr: "http://127.0.0.1:4200"
baseUri: "http://127.0.0.1" baseUri: "http://127.0.0.1"
catchErrors: false catchErrors: false
templatesDir: "{{baseDir}}/kubeTemplates" templatesDir: "{{baseDir}}/templates"
baseReplacements: { baseReplacements: {
nomadRoot: "/nomad/nomadlab" nomadRoot: "/nomad/nomadlab"
} }
...@@ -49,7 +49,7 @@ k8component: { ...@@ -49,7 +49,7 @@ k8component: {
templateCacheNMax: 20 templateCacheNMax: 20
templateCacheTtlMaxMs: 30000 templateCacheTtlMaxMs: 30000
namespace: "analytics" namespace: "analytics"
templatePath: "defaultTemplate.yaml" templatePath: "kube/defaultTemplate.yaml"
keysToProtect: ["keysToProtect", "keysToSkip"] keysToProtect: ["keysToProtect", "keysToSkip"]
keysToSkip: ["templateCacheTtlMaxMs", "templateCacheNMax", "keysToSkip", "keysToProtect", "images", "entryPoint", "commands"] keysToSkip: ["templateCacheTtlMaxMs", "templateCacheNMax", "keysToSkip", "keysToProtect", "images", "entryPoint", "commands"]
image: { image: {
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment