From 3cb2c99bbf2132444df9038cbdb45d446bbbe09c Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 12 Feb 2024 10:01:06 +0000 Subject: [PATCH] Protect against no options set --- kubernetes.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kubernetes.js b/kubernetes.js index 79766b8..427a3a5 100644 --- a/kubernetes.js +++ b/kubernetes.js @@ -606,11 +606,11 @@ module.exports = { this._projects = {} this._options = options - this._namespace = this._app.config.driver.options.projectNamespace || 'flowforge' - this._k8sDelay = this._app.config.driver.options.k8sDelay || 1000 - this._k8sRetries = this._app.config.driver.options.k8sRetries || 10 - this._certManagerIssuer = this._app.config.driver.options.certManagerIssuer - this._logPassthrough = this._app.config.driver.options.logPassthrough || false + this._namespace = this._app.config.driver.options?.projectNamespace || 'flowforge' + this._k8sDelay = this._app.config.driver.options?.k8sDelay || 1000 + this._k8sRetries = this._app.config.driver.options?.k8sRetries || 10 + this._certManagerIssuer = this._app.config.driver.options?.certManagerIssuer + this._logPassthrough = this._app.config.driver.options?.logPassthrough || false const kc = new k8s.KubeConfig()