mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Use quotas in resource applier's kubeconfig path
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
4087cf025e
commit
9ddda3d176
@ -25,7 +25,7 @@ export class ResourceApplier {
|
|||||||
return new Promise<string>((resolve, reject) => {
|
return new Promise<string>((resolve, reject) => {
|
||||||
const fileName = tempy.file({ name: "resource.yaml" })
|
const fileName = tempy.file({ name: "resource.yaml" })
|
||||||
fs.writeFileSync(fileName, content)
|
fs.writeFileSync(fileName, content)
|
||||||
const cmd = `"${kubectlPath}" apply --kubeconfig ${kubeConfigPath} -o json -f ${fileName}`
|
const cmd = `"${kubectlPath}" apply --kubeconfig "${kubeConfigPath}" -o json -f ${fileName}`
|
||||||
logger.debug("shooting manifests with: " + cmd);
|
logger.debug("shooting manifests with: " + cmd);
|
||||||
const execEnv: NodeJS.ProcessEnv = Object.assign({}, process.env)
|
const execEnv: NodeJS.ProcessEnv = Object.assign({}, process.env)
|
||||||
const httpsProxy = this.cluster.preferences?.httpsProxy
|
const httpsProxy = this.cluster.preferences?.httpsProxy
|
||||||
@ -54,7 +54,7 @@ export class ResourceApplier {
|
|||||||
resources.forEach((resource, index) => {
|
resources.forEach((resource, index) => {
|
||||||
fs.writeFileSync(path.join(tmpDir, `${index}.yaml`), resource);
|
fs.writeFileSync(path.join(tmpDir, `${index}.yaml`), resource);
|
||||||
})
|
})
|
||||||
const cmd = `"${kubectlPath}" apply --kubeconfig ${kubeConfigPath} -o json -f ${tmpDir}`
|
const cmd = `"${kubectlPath}" apply --kubeconfig "${kubeConfigPath}" -o json -f ${tmpDir}`
|
||||||
console.log("shooting manifests with:", cmd);
|
console.log("shooting manifests with:", cmd);
|
||||||
exec(cmd, (error, stdout, stderr) => {
|
exec(cmd, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user