diff --git a/app/scripts/modules/kubernetes/help/kubernetes.help.ts b/app/scripts/modules/kubernetes/help/kubernetes.help.ts index 6687a307910..308e33ab92b 100644 --- a/app/scripts/modules/kubernetes/help/kubernetes.help.ts +++ b/app/scripts/modules/kubernetes/help/kubernetes.help.ts @@ -127,6 +127,7 @@ const helpContents: {[key: string]: string} = { 'kubernetes.ingress.rules.host': 'The fully qualified domain name of a network host. Any traffic routed to this host matches this rule. May not be an IP address, or contain port information.', 'kubernetes.ingress.rules.path': 'POSIX regex (IEE Std 1003.1) matched against the path of an incoming request.', 'kubernetes.ingress.rules.port': 'The port on the specifed load balancer to route traffic to.', + 'kubernetes.ingress.rules.secret': '(Optional) The Kubernetes secret that contains the TLS certificate with which to secure connections to the security group. Note that Spinnaker will not create this secret, it will be assumed to exist.', }; export const KUBERNETES_HELP = 'spinnaker.kubernetes.help.contents'; diff --git a/app/scripts/modules/kubernetes/securityGroup/configure/wizard/advancedSettings.html b/app/scripts/modules/kubernetes/securityGroup/configure/wizard/advancedSettings.html new file mode 100644 index 00000000000..b9b2c13b1d2 --- /dev/null +++ b/app/scripts/modules/kubernetes/securityGroup/configure/wizard/advancedSettings.html @@ -0,0 +1,8 @@ +
+
+ +
+
+ +
+
diff --git a/app/scripts/modules/kubernetes/securityGroup/configure/wizard/createWizard.html b/app/scripts/modules/kubernetes/securityGroup/configure/wizard/createWizard.html index b91522e7119..9114ac828e3 100644 --- a/app/scripts/modules/kubernetes/securityGroup/configure/wizard/createWizard.html +++ b/app/scripts/modules/kubernetes/securityGroup/configure/wizard/createWizard.html @@ -8,6 +8,9 @@ + + + +
+
+ Secret + +
+
+ +
+


diff --git a/app/scripts/modules/kubernetes/securityGroup/configure/wizard/upsert.controller.js b/app/scripts/modules/kubernetes/securityGroup/configure/wizard/upsert.controller.js index d181230e5db..327bcd18e14 100644 --- a/app/scripts/modules/kubernetes/securityGroup/configure/wizard/upsert.controller.js +++ b/app/scripts/modules/kubernetes/securityGroup/configure/wizard/upsert.controller.js @@ -34,6 +34,7 @@ module.exports = angular.module('spinnaker.securityGroup.kubernetes.create.contr basicSettings: require('./basicSettings.html'), backend: require('./backend.html'), rules: require('./rules.html'), + advancedSettings: require('./advancedSettings.html'), }; $scope.state = { @@ -181,6 +182,16 @@ module.exports = angular.module('spinnaker.securityGroup.kubernetes.create.contr cloudProvider: 'kubernetes', region: $scope.securityGroup.namespace, }; + + // Write TLS property so clouddriver understands it and our certs get configured + $scope.securityGroup.tls = []; + for (var idx in $scope.securityGroup.rules) { + let rule = $scope.securityGroup.rules[idx]; + if (typeof rule.secret !== 'undefined' && rule.secret !== '') { + $scope.securityGroup.tls.push({ hosts: [rule.host], secretName: rule.secret }); + } + } + return securityGroupWriter.upsertSecurityGroup($scope.securityGroup, application, descriptor, params); } );