Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit 3ada318

Browse files
author
Kevin Marquardsen
committed
Merge branch 'master' of github.com:spinnaker/deck into lbaasv2
* 'master' of github.com:spinnaker/deck: Address the spacing-related linter warnings. (spinnaker#2596) core/bake: Add support for 'varFileName' attribute to bake stages. (spinnaker#2594) (kubernetes) Only strip underscores from names (spinnaker#2593) SpEL autocomplete (spinnaker#2588) (titus) replace titus tiny icon (spinnaker#2587) (core) add quip stage description link (spinnaker#2586) provider/cf: Allow resizing to include memory and disk (spinnaker#2585) guard against undefined while loading docker image (spinnaker#2584) (core) added retry service, updated docker image reader with retries (spinnaker#2582) (netflix) include link to documentation (spinnaker#2583) Openstack Security group support for UDP and ICMP (spinnaker#2580) Add image list to clusters and project (spinnaker#2530) * (gce) load balancer detail panel includes health check for each backend (spinnaker#2581) (cf) Add 'disk limit' as an advanced setting to server group settings (spinnaker#2579) (gce) updated max vcpu list (spinnaker#2569)
2 parents 44824e8 + 1f56823 commit 3ada318

File tree

57 files changed

+1243
-254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1243
-254
lines changed

app/scripts/modules/amazon/pipeline/stages/bake/awsBakeStage.js

+4
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ module.exports = angular.module('spinnaker.core.pipeline.stage.aws.bakeStage', [
126126
return $scope.viewState.roscoMode || ($scope.stage.extendedAttributes && _.size($scope.stage.extendedAttributes) > 0);
127127
};
128128

129+
this.showVarFileName = function() {
130+
return $scope.viewState.roscoMode || $scope.stage.varFileName;
131+
};
132+
129133
$scope.$watch('stage', deleteEmptyProperties, true);
130134

131135
initialize();

app/scripts/modules/amazon/pipeline/stages/bake/bakeExecutionDetails.html

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
<dd ng-if="roscoMode || stage.context.rebake">{{stage.context.rebake || false}}</dd>
2929
<dt ng-if="stage.context.templateFileName">Template</dt>
3030
<dd ng-if="stage.context.templateFileName">{{stage.context.templateFileName}}</dd>
31+
<dt ng-if="stage.context.varFileName">Var File</dt>
32+
<dd ng-if="stage.context.varFileName">{{stage.context.varFileName}}</dd>
3133
</dl>
3234
</div>
3335
</div>

app/scripts/modules/amazon/pipeline/stages/bake/bakeStage.html

+5
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ <h4 ng-if="viewState.loading" class="text-center">
106106
</tfoot>
107107
</table>
108108
</stage-config-field>
109+
<stage-config-field label="Var File Name" help-key="pipeline.config.bake.varFileName"
110+
ng-if="bakeStageCtrl.showVarFileName()">
111+
<input type="text" class="form-control input-sm"
112+
ng-model="stage.varFileName"/>
113+
</stage-config-field>
109114
<stage-config-field label="Base Name">
110115
<input type="text" class="form-control input-sm"
111116
ng-model="stage.baseName"/>

app/scripts/modules/azure/pipeline/stages/bake/azureBakeStage.js

+4
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ module.exports = angular.module('spinnaker.core.pipeline.stage.azure.bakeStage',
126126
return $scope.viewState.roscoMode || ($scope.stage.extendedAttributes && _.size($scope.stage.extendedAttributes) > 0);
127127
};
128128

129+
this.showVarFileName = function() {
130+
return $scope.viewState.roscoMode || $scope.stage.varFileName;
131+
};
132+
129133
$scope.$watch('stage', deleteEmptyProperties, true);
130134

131135
initialize();

app/scripts/modules/azure/pipeline/stages/bake/bakeExecutionDetails.html

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
<dd ng-if="roscoMode || stage.context.rebake">{{stage.context.rebake || false}}</dd>
2525
<dt ng-if="stage.context.templateFileName">Template</dt>
2626
<dd ng-if="stage.context.templateFileName">{{stage.context.templateFileName}}</dd>
27+
<dt ng-if="stage.context.varFileName">Var File</dt>
28+
<dd ng-if="stage.context.varFileName">{{stage.context.varFileName}}</dd>
2729
</dl>
2830
</div>
2931
</div>

app/scripts/modules/azure/pipeline/stages/bake/bakeStage.html

+5
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ <h4 ng-if="viewState.loading" class="text-center">
8585
</tfoot>
8686
</table>
8787
</stage-config-field>
88+
<stage-config-field label="Var File Name" help-key="pipeline.config.bake.varFileName"
89+
ng-if="bakeStageCtrl.showVarFileName()">
90+
<input type="text" class="form-control input-sm"
91+
ng-model="stage.varFileName"/>
92+
</stage-config-field>
8893
</div>
8994
</div>
9095
</div>

app/scripts/modules/cloudfoundry/pipeline/stages/resizeAsg/cfResizeAsgStage.js

-15
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,6 @@ module.exports = angular.module('spinnaker.core.pipeline.stage.cf.resizeAsgStage
4949
$scope.resizeTargets = stageConstants.targetList;
5050

5151
$scope.scaleActions = [
52-
{
53-
label: 'Scale Up',
54-
val: 'scale_up',
55-
},
56-
{
57-
label: 'Scale Down',
58-
val: 'scale_down'
59-
},
60-
{
61-
label: 'Scale to Cluster Size',
62-
val: 'scale_to_cluster'
63-
},
6452
{
6553
label: 'Scale to Exact Size',
6654
val: 'scale_exact'
@@ -83,9 +71,6 @@ module.exports = angular.module('spinnaker.core.pipeline.stage.cf.resizeAsgStage
8371
stage.target = stage.target || $scope.resizeTargets[0].val;
8472
stage.action = stage.action || $scope.scaleActions[0].val;
8573
stage.resizeType = stage.resizeType || $scope.resizeTypes[0].val;
86-
if (stage.resizeType === 'exact') {
87-
stage.action = 'scale_exact';
88-
}
8974
stage.cloudProvider = 'cf';
9075

9176
if (!stage.credentials && $scope.application.defaultCredentials) {

app/scripts/modules/cloudfoundry/pipeline/stages/resizeAsg/resizeAsgStage.html

+6-47
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ <h4 class="text-center">
1212
<stage-config-field label="Account">
1313
<account-select-field component="stage" field="credentials" accounts="accounts" provider="'cf'" on-change="resizeAsgStageCtrl.accountUpdated()" required></account-select-field>
1414
</stage-config-field>
15-
<stage-config-field label="Regions">
16-
<p ng-if="!stage.credentials" class="form-control-static">(Select an Account)</p>
17-
<checklist ng-if="stage.credentials" items="regions" model="stage.regions" inline="true" include-select-all-button="true"></checklist>
18-
</stage-config-field>
1915
<stage-config-field label="Target">
2016
<target-select model="stage" options="resizeTargets"></target-select>
2117
</stage-config-field>
@@ -28,64 +24,27 @@ <h4 class="text-center">
2824
<option>Select an action...</option>
2925
</select>
3026
</stage-config-field>
31-
<div ng-if="stage.action !== 'scale_exact'">
32-
<stage-config-field label="{{stage.action === 'scale_to_cluster' ? 'Additional Capacity' : 'Type'}}">
33-
<select class="form-control input-sm"
34-
required
35-
ng-model="stage.resizeType"
36-
ng-change="resizeAsgStageCtrl.updateResizeType()"
37-
ng-options="t.val as t.label for t in resizeTypes">
38-
<option>Select an action...</option>
39-
</select>
40-
</stage-config-field>
41-
<div class="form-group" ng-if="stage.resizeType === 'pct'">
42-
<div class="col-md-9 col-md-offset-3">
43-
<label class="col-md-2 sm-label-right" style="font-size:12px;line-height:13px;margin-left:0;padding-left:0">Resize Percentage</label>
44-
<div class="col-md-2">
45-
<input type="number" min="0" ng-model="stage.scalePct"
46-
class="form-control input-sm" />
47-
</div>
48-
</div>
49-
<div class="col-md-9 col-md-offset-3">
50-
<em class="subinput-note">This is the percentage by which the target server group's capacity will be increased</em>
51-
</div>
52-
53-
</div>
54-
<div class="form-group" ng-if="stage.resizeType === 'incr'">
55-
<div class="col-md-9 col-md-offset-3">
56-
<label class="col-md-2 sm-label-right" style="margin-left:0;padding-left:0">Resize-by Amount</label>
57-
<div class="col-md-2">
58-
<input type="number" min="0" ng-model="stage.scaleNum"
59-
class="form-control input-sm" />
60-
</div>
61-
</div>
62-
63-
<div class="col-md-9 col-md-offset-3">
64-
<em class="subinput-note">This is the exact amount by which the target server group's capacity will be increased</em>
65-
</div>
66-
</div>
67-
</div>
6827
<div class="form-group" ng-if="stage.action === 'scale_exact'">
6928
<div class="col-md-9 col-md-offset-3 small">
7029
<div class="col-md-9">
71-
<div class="col-md-2 col-md-offset-3">Min</div>
72-
<div class="col-md-2">Max</div>
73-
<div class="col-md-2">Desired</div>
30+
<div class="col-md-2 col-md-offset-3">Instances</div>
31+
<div class="col-md-2">Memory (MB)</div>
32+
<div class="col-md-2">Disk Limit (MB)</div>
7433
</div>
7534
</div>
7635
<div class="col-md-9 col-md-offset-3">
7736
<label class="col-md-2 sm-label-right small" style="margin-left:0;padding-left:0">Match Capacity</label>
7837
<div class="col-md-9">
7938
<div class="col-md-2">
80-
<input type="number" ng-model="stage.capacity.min"
39+
<input type="number" ng-model="stage.newSize"
8140
class="form-control input-sm" />
8241
</div>
8342
<div class="col-md-2">
84-
<input type="number" ng-model="stage.capacity.max"
43+
<input type="number" ng-model="stage.memory"
8544
class="form-control input-sm" />
8645
</div>
8746
<div class="col-md-2">
88-
<input type="number" ng-model="stage.capacity.desired"
47+
<input type="number" ng-model="stage.disk"
8948
class="form-control input-sm" />
9049
</div>
9150
</div>

app/scripts/modules/cloudfoundry/serverGroup/configure/ServerGroupCommandBuilder.js

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ module.exports = angular.module('spinnaker.cf.serverGroupCommandBuilder.service'
6969
password: '',
7070
buildpackUrl: '',
7171
memory: 1024,
72+
disk: 1024,
7273
viewState: {
7374
instanceProfile: 'custom',
7475
allImageSelection: null,
@@ -132,6 +133,7 @@ module.exports = angular.module('spinnaker.cf.serverGroupCommandBuilder.service'
132133
password: serverGroup.password,
133134
buildpackUrl: serverGroup.buildpackUrl,
134135
memory: serverGroup.memory,
136+
disk: serverGroup.disk,
135137
viewState: {
136138
allImageSelection: null,
137139
useAllImageSelection: false,

app/scripts/modules/cloudfoundry/serverGroup/configure/serverGroupAdvancedDirective.html

+14
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,18 @@
3232
</ui-select>
3333
</div>
3434
</div>
35+
<div class="form-group">
36+
<div class="col-md-3 sm-label-right">
37+
<b>Disk Limit</b>
38+
</div>
39+
<div class="col-md-7">
40+
<ui-select ng-model="command.disk" class="form-control input-sm">
41+
<ui-select-match placeholder="None">{{$select.selected.label}}</ui-select-match>
42+
<ui-select-choices repeat="disk.key as disk in diskOptions | filter: $select.search">
43+
<strong ng-bind-html="disk.label | highlight: $select.search"></strong>
44+
<div ng-bind-html="disk.description"></div>
45+
</ui-select-choices>
46+
</ui-select>
47+
</div>
48+
</div>
3549
</ng-form>

app/scripts/modules/cloudfoundry/serverGroup/configure/serverGroupAdvancedSelector.directive.js

+29
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ module.exports = angular.module('spinnaker.serverGroup.configure.cf.advancedSele
3232
};
3333

3434
$scope.memoryOptions = [
35+
{
36+
key: 8192,
37+
label: '8GB',
38+
description: ''
39+
},
40+
{
41+
key: 4096,
42+
label: '4GB',
43+
description: ''
44+
},
3545
{
3646
key: 2048,
3747
label: '2GB',
@@ -49,4 +59,23 @@ module.exports = angular.module('spinnaker.serverGroup.configure.cf.advancedSele
4959
},
5060
];
5161

62+
$scope.diskOptions = [
63+
{
64+
key: 2048,
65+
label: '2GB',
66+
description: 'Maximum available'
67+
},
68+
{
69+
key: 1024,
70+
label: '1GB',
71+
description: 'Recommended minimum'
72+
},
73+
{
74+
key: 512,
75+
label: '512MB',
76+
description: ''
77+
},
78+
];
79+
80+
5281
});

app/scripts/modules/cloudfoundry/serverGroup/configure/wizard/CloneServerGroupCtrl.js

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ module.exports = angular.module('spinnaker.serverGroup.configure.cf.cloneServerG
143143

144144
$scope.command.buildpackUrl = $scope.command.buildpackUrl;
145145
$scope.command.memory = $scope.command.memory;
146+
$scope.command.disk = $scope.command.disk;
146147

147148
if ($scope.command.viewState.mode === 'editPipeline' || $scope.command.viewState.mode === 'createPipeline') {
148149
return $uibModalInstance.close($scope.command);

app/scripts/modules/cloudfoundry/serverGroup/details/resize/resizeServerGroup.controller.js

+14-18
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,16 @@ module.exports = angular.module('spinnaker.cf.serverGroup.details.resize.control
1010
.controller('cfResizeServerGroupCtrl', function($scope, $uibModalInstance, serverGroupWriter, taskMonitorService,
1111
application, serverGroup) {
1212

13-
// TODO: Rip out min/max and just use desired capacity.
1413
$scope.serverGroup = serverGroup;
15-
$scope.currentSize = {
16-
min: serverGroup.asg.minSize,
17-
max: serverGroup.asg.maxSize,
18-
desired: serverGroup.asg.desiredCapacity,
19-
newSize: null
20-
};
2114

2215
$scope.verification = {};
2316

24-
$scope.command = angular.copy($scope.currentSize);
25-
$scope.command.advancedMode = serverGroup.asg.minSize !== serverGroup.asg.maxSize;
17+
$scope.command = {
18+
newSize: serverGroup.asg.desiredCapacity,
19+
memory: serverGroup.memory,
20+
disk: serverGroup.disk == 0 ? 1024 : serverGroup.disk,
21+
};
22+
2623

2724
if (application && application.attributes) {
2825
if (application.attributes.platformHealthOnly) {
@@ -37,25 +34,24 @@ module.exports = angular.module('spinnaker.cf.serverGroup.details.resize.control
3734
if (!$scope.verification.verified) {
3835
return false;
3936
}
40-
return command.advancedMode ?
41-
command.min <= command.max && command.desired >= command.min && command.desired <= command.max :
42-
command.newSize !== null;
37+
return command.newSize !== null;
4338
};
4439

4540
this.resize = function () {
4641
if (!this.isValid()) {
4742
return;
4843
}
49-
var capacity = { min: $scope.command.min, max: $scope.command.max, desired: $scope.command.desired };
50-
if (!$scope.command.advancedMode) {
51-
capacity = { min: $scope.command.newSize, max: $scope.command.newSize, desired: $scope.command.newSize };
52-
}
44+
var newSize = $scope.command.newSize;
45+
var memory = $scope.command.memory;
46+
var disk = $scope.command.disk;
5347

5448
var submitMethod = function() {
5549
return serverGroupWriter.resizeServerGroup(serverGroup, application, {
56-
capacity: capacity,
50+
capacity: { min: newSize, max: newSize, desired: newSize },
5751
serverGroupName: serverGroup.name,
58-
targetSize: capacity.desired, // TODO(GLT): Unify on this or capacity
52+
targetSize: newSize, // TODO(GLT): Unify on this or capacity
53+
memory: memory,
54+
disk: disk,
5955
region: serverGroup.region,
6056
interestingHealthProviderNames: $scope.command.interestingHealthProviderNames,
6157
});

0 commit comments

Comments
 (0)