@spinnaker/google 0.2.13 → 2025.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/index.js +17716 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/instance/gceInstanceType.service.js +10 -3
- package/src/loadBalancer/configure/common/sessionAffinityNameMaps.ts +1 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.js +33 -2
- package/src/serverGroup/configure/serverGroupConfiguration.service.js +2 -2
- package/src/serverGroup/configure/wizard/advancedSettings/advancedSettings.directive.html +18 -0
- package/src/serverGroup/configure/wizard/advancedSettings/advancedSettingsSelector.directive.spec.js +1 -1
- package/src/serverGroup/configure/wizard/advancedSettings/diskConfigurer.component.ts +6 -2
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinnaker/google",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "2025.0.0",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"publishConfig": {
|
|
8
|
-
"access": "public"
|
|
8
|
+
"access": "public",
|
|
9
|
+
"registry": "https://registry.npmjs.org"
|
|
9
10
|
},
|
|
10
11
|
"scripts": {
|
|
11
12
|
"clean": "shx rm -rf dist",
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
"lib": "npm run build"
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
|
-
"@spinnaker/core": "^0.29.
|
|
20
|
+
"@spinnaker/core": "^0.29.1",
|
|
20
21
|
"@uirouter/angularjs": "1.0.26",
|
|
21
22
|
"angular": "1.6.10",
|
|
22
23
|
"angular-ui-bootstrap": "2.5.0",
|
|
@@ -40,5 +41,5 @@
|
|
|
40
41
|
"shx": "0.3.3",
|
|
41
42
|
"typescript": "4.3.5"
|
|
42
43
|
},
|
|
43
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "5b197da8614979a51dc24b0a6f92e19c3162e874"
|
|
44
45
|
}
|
|
@@ -400,9 +400,16 @@ module(GOOGLE_INSTANCE_GCEINSTANCETYPE_SERVICE, []).factory('gceInstanceTypeServ
|
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
function getAvailableTypesForLocations(locationToInstanceTypesMap, selectedLocations) {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
403
|
+
if (!locationToInstanceTypesMap || !selectedLocations || selectedLocations.length === 0) {
|
|
404
|
+
console.error('Invalid input parameters');
|
|
405
|
+
return [];
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const availableTypes = selectedLocations
|
|
409
|
+
.filter((location) => locationToInstanceTypesMap[location])
|
|
410
|
+
.flatMap((location) => locationToInstanceTypesMap[location].instanceTypes || []);
|
|
411
|
+
|
|
412
|
+
return availableTypes;
|
|
406
413
|
}
|
|
407
414
|
|
|
408
415
|
const getAvailableTypesForRegions = getAvailableTypesForLocations;
|
|
@@ -12,6 +12,7 @@ export const sessionAffinityViewToModelMap: IStringMap = {
|
|
|
12
12
|
'Client IP, port and protocol': 'CLIENT_IP_PORT_PROTO',
|
|
13
13
|
'Header Field': 'HEADER_FIELD',
|
|
14
14
|
'HTTP Cookie': 'HTTP_COOKIE',
|
|
15
|
+
'Strong Cookie': 'STRONG_COOKIE_AFFINITY',
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
export const sessionAffinityModelToViewMap = _.invert<IStringMap, IStringMap>(sessionAffinityViewToModelMap);
|
|
@@ -104,7 +104,9 @@ angular
|
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
106
|
const localSSDDisks = disks.filter((disk) => disk.type === 'local-ssd');
|
|
107
|
-
const persistentDisks = disks.filter(
|
|
107
|
+
const persistentDisks = disks.filter(
|
|
108
|
+
(disk) => disk.type.startsWith('pd-') || disk.type.startsWith('hyperdisk-'),
|
|
109
|
+
);
|
|
108
110
|
|
|
109
111
|
if (persistentDisks.length) {
|
|
110
112
|
command.disks = persistentDisks.concat(localSSDDisks);
|
|
@@ -149,7 +151,9 @@ angular
|
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
function getPersistentDisks(command) {
|
|
152
|
-
return (command.disks || []).filter(
|
|
154
|
+
return (command.disks || []).filter(
|
|
155
|
+
(disk) => disk.type.startsWith('pd-') || disk.type.startsWith('hyperdisk-'),
|
|
156
|
+
);
|
|
153
157
|
}
|
|
154
158
|
|
|
155
159
|
function calculatePersistentDiskOverriddenStorageDescription(command) {
|
|
@@ -285,6 +289,18 @@ angular
|
|
|
285
289
|
}
|
|
286
290
|
}
|
|
287
291
|
|
|
292
|
+
function populateResourceManagerTags(instanceTemplateResourceManagerTags, command) {
|
|
293
|
+
if (instanceTemplateResourceManagerTags) {
|
|
294
|
+
Object.assign(command.resourceManagerTags, instanceTemplateResourceManagerTags);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function populatePartnerMetadata(instanceTemplatePartnerMetadata, command) {
|
|
299
|
+
if (instanceTemplatePartnerMetadata) {
|
|
300
|
+
Object.assign(command.partnerMetadata, instanceTemplatePartnerMetadata);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
288
304
|
function populateLabels(instanceTemplateLabels, command) {
|
|
289
305
|
if (instanceTemplateLabels) {
|
|
290
306
|
Object.assign(command.labels, instanceTemplateLabels);
|
|
@@ -363,6 +379,8 @@ angular
|
|
|
363
379
|
instanceMetadata: {},
|
|
364
380
|
tags: [],
|
|
365
381
|
labels: {},
|
|
382
|
+
resourceManagerTags: {},
|
|
383
|
+
partnerMetadata: {},
|
|
366
384
|
enableSecureBoot: false,
|
|
367
385
|
enableVtpm: false,
|
|
368
386
|
enableIntegrityMonitoring: false,
|
|
@@ -441,6 +459,8 @@ angular
|
|
|
441
459
|
instanceMetadata: {},
|
|
442
460
|
tags: [],
|
|
443
461
|
labels: {},
|
|
462
|
+
resourceManagerTags: {},
|
|
463
|
+
partnerMetadata: {},
|
|
444
464
|
availabilityZones: [],
|
|
445
465
|
enableSecureBoot: serverGroup.enableSecureBoot,
|
|
446
466
|
enableVtpm: serverGroup.enableVtpm,
|
|
@@ -501,6 +521,11 @@ angular
|
|
|
501
521
|
populateTags(serverGroup.launchConfig.instanceTemplate.properties.tags, command);
|
|
502
522
|
populateLabels(serverGroup.instanceTemplateLabels, command);
|
|
503
523
|
populateAuthScopes(serverGroup.launchConfig.instanceTemplate.properties.serviceAccounts, command);
|
|
524
|
+
populateResourceManagerTags(
|
|
525
|
+
serverGroup.launchConfig.instanceTemplate.properties.resourceManagerTags,
|
|
526
|
+
command,
|
|
527
|
+
);
|
|
528
|
+
populatePartnerMetadata(serverGroup.launchConfig.instanceTemplate.properties.partnerMetadata, command);
|
|
504
529
|
|
|
505
530
|
return populateDisksFromExisting(serverGroup.launchConfig.instanceTemplate.properties.disks, command).then(
|
|
506
531
|
function () {
|
|
@@ -574,6 +599,12 @@ angular
|
|
|
574
599
|
extendedCommand.tags = [];
|
|
575
600
|
populateTags(instanceTemplateTags, extendedCommand);
|
|
576
601
|
|
|
602
|
+
const resourceManagerTags = extendedCommand.resourceManagerTags;
|
|
603
|
+
populateResourceManagerTags(resourceManagerTags, extendedCommand);
|
|
604
|
+
|
|
605
|
+
const partnerMetadata = extendedCommand.partnerMetadata;
|
|
606
|
+
populatePartnerMetadata(partnerMetadata, extendedCommand);
|
|
607
|
+
|
|
577
608
|
return extendedCommand;
|
|
578
609
|
});
|
|
579
610
|
});
|
|
@@ -61,7 +61,7 @@ angular
|
|
|
61
61
|
gceTagManager,
|
|
62
62
|
gceLoadBalancerSetTransformer,
|
|
63
63
|
) {
|
|
64
|
-
const persistentDiskTypes = ['pd-standard', 'pd-ssd'];
|
|
64
|
+
const persistentDiskTypes = ['pd-standard', 'pd-ssd', 'hyperdisk-balanced'];
|
|
65
65
|
const authScopes = [
|
|
66
66
|
'cloud-platform',
|
|
67
67
|
'userinfo.email',
|
|
@@ -234,7 +234,7 @@ angular
|
|
|
234
234
|
const c = command;
|
|
235
235
|
const result = { dirty: {} };
|
|
236
236
|
|
|
237
|
-
const locations = c.regional ?
|
|
237
|
+
const locations = c.regional ? c.distributionPolicy.zones : [c.zone];
|
|
238
238
|
const { credentialsKeyedByAccount } = c.backingData;
|
|
239
239
|
const { locationToInstanceTypesMap } = credentialsKeyedByAccount[c.credentials];
|
|
240
240
|
|
|
@@ -87,6 +87,24 @@
|
|
|
87
87
|
</div>
|
|
88
88
|
<map-editor model="vm.command.labels" add-button-label="Add New Label" allow-empty="true"></map-editor>
|
|
89
89
|
</div>
|
|
90
|
+
<div class="form-group">
|
|
91
|
+
<div class="sm-label-left">
|
|
92
|
+
<b>Resource Manager Tags</b>
|
|
93
|
+
<help-field key="gce.serverGroup.resourceManagerTags"></help-field>
|
|
94
|
+
</div>
|
|
95
|
+
<map-editor model="vm.command.resourceManagerTags" add-button-label="Add New Tag" allow-empty="false"></map-editor>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="form-group">
|
|
98
|
+
<div class="sm-label-left">
|
|
99
|
+
<b>Partner Metadata</b>
|
|
100
|
+
<help-field key="gce.serverGroup.partnerMetadata"></help-field>
|
|
101
|
+
</div>
|
|
102
|
+
<map-object-editor
|
|
103
|
+
model="vm.command.partnerMetadata"
|
|
104
|
+
add-button-label="Add New Metadata"
|
|
105
|
+
allow-empty="false"
|
|
106
|
+
></map-object-editor>
|
|
107
|
+
</div>
|
|
90
108
|
<div class="form-group">
|
|
91
109
|
<div class="sm-label-left">
|
|
92
110
|
Shielded VMs
|
package/src/serverGroup/configure/wizard/advancedSettings/advancedSettingsSelector.directive.spec.js
CHANGED
|
@@ -18,7 +18,7 @@ describe('Directive: GCE Group Advanced Settings Selector', function () {
|
|
|
18
18
|
);
|
|
19
19
|
this.gceTagManager = gceTagManager;
|
|
20
20
|
this.scope = $rootScope.$new();
|
|
21
|
-
this.scope.command = { instanceMetadata: [], tags: [], labels: [], authScopes: [] };
|
|
21
|
+
this.scope.command = { instanceMetadata: [], tags: [], labels: [], authScopes: [], resourceManagerTags: [] };
|
|
22
22
|
this.elem = angular.element(
|
|
23
23
|
'<gce-server-group-advanced-settings-selector command="command"></gce-server-group-advanced-settings-selector>',
|
|
24
24
|
);
|
|
@@ -84,7 +84,9 @@ class GceDiskConfigurerController implements IComponentController {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
private sortDisks(disks: IGceDisk[]): IGceDisk[] {
|
|
87
|
-
const diskWithoutImage = disks.find(
|
|
87
|
+
const diskWithoutImage = disks.find(
|
|
88
|
+
(disk) => (disk.type.startsWith('pd-') || disk.type.startsWith('hyperdisk-')) && disk.sourceImage === undefined,
|
|
89
|
+
);
|
|
88
90
|
return [diskWithoutImage].concat(without(disks, diskWithoutImage));
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -93,7 +95,9 @@ class GceDiskConfigurerController implements IComponentController {
|
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
private getPersistentDisks(): IGceDisk[] {
|
|
96
|
-
return (this.command.disks || []).filter(
|
|
98
|
+
return (this.command.disks || []).filter(
|
|
99
|
+
(disk: IGceDisk) => disk.type.startsWith('pd-') || disk.type.startsWith('hyperdisk-'),
|
|
100
|
+
);
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
|