Skip to content

Commit cc5daac

Browse files
jshum2479robertpatrick
authored andcommitted
correct ssl termination and passthrough ingress generation.
1 parent de87c0e commit cc5daac

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

webui/src/js/utils/ingress-resource-generator.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,15 @@ define(['models/wkt-project', 'js-yaml'],
238238
result.spec.routes[0].match = matchExpression;
239239

240240
// if SSL terminate at ingress
241-
if (this.project.ingress.specifyIngressTLSSecret.value && this.isSSLTerminateAtIngress(item)) {
242-
if (!item['tlsSecretName']) {
241+
if (this.isSSLTerminateAtIngress(item)) {
242+
// Set user provided tls cert if provided, otherwise use whatever is set up during user install
243+
if (!item['tlsSecretName'] && this.project.ingress.specifyIngressTLSSecret.value) {
243244
item['tlsSecretName'] = this.project.ingress.ingressTLSSecretName.value;
245+
result.spec.tls = { secretName: item['tlsSecretName'] };
244246
}
245-
result.spec.tls = { secretName: item['tlsSecretName'] };
246247
}
247248
// SSL passthrough
248-
if (this.project.ingress.specifyIngressTLSSecret.value && this.isSSLPassThrough(item)) {
249+
if (this.isSSLPassThrough(item)) {
249250
const obj = { passthrough: true };
250251
result.spec.tls = obj;
251252

0 commit comments

Comments
 (0)