@flowfuse/driver-kubernetes
Advanced tools
Comparing version 1.15.1-51d5f79-202312211334.0 to 1.15.1-672aeb5-202401161208.0
@@ -363,2 +363,14 @@ const got = require('got') | ||
if (this._certManagerIssuer) { | ||
localIngress.metadata.annotations['cert-manager.io/cluster-issuer'] = this._certManagerIssuer | ||
localIngress.spec.tls = [ | ||
{ | ||
hosts: [ | ||
url.host | ||
], | ||
secretName: project.safeName | ||
} | ||
] | ||
} | ||
// process annotations with potential replacements | ||
@@ -597,2 +609,3 @@ Object.keys(localIngress.metadata.annotations).forEach((key) => { | ||
this._k8sRetries = this._app.config.driver.options.k8sRetries || 10 | ||
this._certManagerIssuer = this._app.config.driver.options._certManagerIssuer | ||
@@ -758,2 +771,10 @@ const kc = new k8s.KubeConfig() | ||
if (this._certManagerIssuer) { | ||
try { | ||
await this._k8sApi.deleteNamespacedSecret(project.safeName, this._namespace) | ||
} catch (err) { | ||
this._app.log.error(`[k8s] Project ${project.id} - error deleting tls secret: ${err.toString()}`) | ||
} | ||
} | ||
// Note that, regardless, the main objective is to delete deployment (runnable) | ||
@@ -857,2 +878,9 @@ // Even if some k8s resources like ingress or service are still not deleted (maybe because of | ||
} | ||
if (this._certManagerIssuer) { | ||
try { | ||
await this._k8sApi.deleteNamespacedSecret(project.safeName, this._namespace) | ||
} catch (err) { | ||
this._app.log.error(`[k8s] Project ${project.id} - error deleting tls secret: ${err.toString()}`) | ||
} | ||
} | ||
try { | ||
@@ -859,0 +887,0 @@ if (project.safeName.match(/^[0-9]/)) { |
{ | ||
"name": "@flowfuse/driver-kubernetes", | ||
"version": "1.15.1-51d5f79-202312211334.0", | ||
"version": "1.15.1-672aeb5-202401161208.0", | ||
"description": "Kubernetes driver for FlowFuse", | ||
@@ -5,0 +5,0 @@ "main": "kubernetes.js", |
@@ -20,2 +20,3 @@ # FlowForge Docker Container Driver | ||
privateCA: ff-ca-certs | ||
certManagerIssuer: lets-encrypt | ||
k8sDelay: 1000 | ||
@@ -32,2 +33,3 @@ k8sRetries: 10 | ||
- `privateCA` name of ConfigMap holding PEM CA Cert Bundle (file name `certs.pem`) Optional | ||
- `certManagerIssuer` name of the ClusterIssuer to use to create HTTPS certs for instances (default not set) | ||
- `k8sRetries` how many times to retry actions against the K8s API | ||
@@ -34,0 +36,0 @@ - `k8sDelay` how long to wait (in ms) between retries to the K8s API |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66274
1075
46