Skip to content

Commit

Permalink
feat(provider/kubernetes): Enable annotations, labels and secrets for…
Browse files Browse the repository at this point in the history
… security groups (aka ingress resources) (#2000)
  • Loading branch information
Maarten Dirkse committed Oct 9, 2017
1 parent ed9c20f commit df96ee2
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/scripts/modules/kubernetes/help/kubernetes.help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const angular = require('angular');

module.exports = angular.module('spinnaker.securityGroup.configure.kubernetes', [
require('./wizard/upsert.controller.js').name,
require('./wizard/backend.controller.js').name,
require('./wizard/rules.controller.js').name,
require('./wizard/upsert.controller.js').name,
]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<form class="container-fluid form-horizontal" name="advancedSettings">
<div class="col-md-12">
<map-editor model="securityGroup.annotations" label="Annotations" add-button-label="Add Annotations" labels-left="true"></map-editor>
</div>
<div class="col-md-12">
<map-editor model="securityGroup.labels" label="Labels" add-button-label="Add Labels" labels-left="true"></map-editor>
</div>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<v2-wizard-page key="rules" label="Rules">
<ng-include src="pages.rules"></ng-include>
</v2-wizard-page>
<v2-wizard-page key="Advanced Settings" label="Advanced Settings">
<ng-include src="pages.advancedSettings"></ng-include>
</v2-wizard-page>
</v2-modal-wizard>
<div class="modal-footer">
<button ng-disabled="taskMonitor.submitting" class="btn btn-default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<v2-wizard-page key="rules" label="Rules">
<ng-include src="pages.rules"></ng-include>
</v2-wizard-page>
<v2-wizard-page key="Advanced Settings" label="Advanced Settings">
<ng-include src="pages.advancedSettings"></ng-include>
</v2-wizard-page>
</v2-modal-wizard>
<div class="modal-footer">
<button ng-disabled="taskMonitor.submitting" class="btn btn-default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
</button>
</div>
</div>
<div class="form-group">
<div class="col-md-3 sm-label-right">
Secret
<help-field key="kubernetes.ingress.rules.secret"></help-field>
</div>
<div class="col-md-6">
<input type="text" class="form-control input-sm" name="details" ng-model="rule.secret"/>
</div>
</div>
<br/>
<div ng-repeat="path in rule.value.http.paths">
<hr ng-if="$index > 0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit df96ee2

Please sign in to comment.