@spinnaker/amazon 2026.2.2 → 2026.3.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/dist/aws.module.d.ts +2 -1
- package/dist/aws.services.d.ts +8 -0
- package/dist/certificates/AmazonCertificateReader.d.ts +1 -1
- package/dist/domain/IAmazonServerGroup.d.ts +10 -0
- package/dist/function/CreateLambdaFunction.d.ts +10 -5
- package/dist/function/configure/Network.d.ts +3 -0
- package/dist/function/details/FunctionActions.d.ts +3 -0
- package/dist/function/function.transformer.d.ts +1 -0
- package/dist/image/image.reader.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/instance/amazon.instance.write.service.d.ts +5 -5
- package/dist/instance/awsInstanceType.service.d.ts +13 -2
- package/dist/instance/details/AmazonInstanceDetails.d.ts +67 -0
- package/dist/instance/index.d.ts +1 -0
- package/dist/keyPairs/KeyPairsReader.d.ts +1 -1
- package/dist/loadBalancer/AmazonLoadBalancersTag.d.ts +7 -4
- package/dist/loadBalancer/OidcConfigReader.d.ts +1 -1
- package/dist/loadBalancer/TargetGroupDetails.d.ts +37 -3
- package/dist/loadBalancer/amazonLoadBalancerDataUtils.d.ts +1 -1
- package/dist/loadBalancer/configure/AmazonLoadBalancerChoiceModal.d.ts +6 -2
- package/dist/loadBalancer/configure/LoadBalancerTypes.d.ts +4 -4
- package/dist/loadBalancer/configure/application/CreateApplicationLoadBalancer.d.ts +10 -5
- package/dist/loadBalancer/configure/classic/CreateClassicLoadBalancer.d.ts +12 -7
- package/dist/loadBalancer/configure/common/SecurityGroups.d.ts +4 -0
- package/dist/loadBalancer/configure/network/CreateNetworkLoadBalancer.d.ts +10 -5
- package/dist/loadBalancer/details/LoadBalancerActions.d.ts +9 -2
- package/dist/loadBalancer/details/amazonLoadBalancerDetails.d.ts +22 -0
- package/dist/loadBalancer/index.d.ts +1 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +1 -1
- package/dist/pipeline/stages/AmazonStageConfig.d.ts +11 -0
- package/dist/pipeline/stages/bake/AwsBakeStageConfig.d.ts +66 -0
- package/dist/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.d.ts +20 -0
- package/dist/pipeline/stages/deleteLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.d.ts +5 -4
- package/dist/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.d.ts +1 -3
- package/dist/pipeline/stages/deployLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/destroyAsg/awsDestroyAsgStage.d.ts +26 -2
- package/dist/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.d.ts +27 -0
- package/dist/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.d.ts +20 -0
- package/dist/pipeline/stages/findAmi/awsFindAmiStage.d.ts +17 -2
- package/dist/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.d.ts +12 -2
- package/dist/pipeline/stages/invokeLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.d.ts +20 -2
- package/dist/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.d.ts +20 -0
- package/dist/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/resizeAsg/awsResizeAsgStage.d.ts +40 -2
- package/dist/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/routeLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.d.ts +22 -0
- package/dist/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.d.ts +21 -0
- package/dist/pipeline/stages/tagImage/awsTagImageStage.d.ts +5 -2
- package/dist/pipeline/stages/updateCodeLambda/index.d.ts +1 -1
- package/dist/search/searchResultFormatter.d.ts +4 -2
- package/dist/securityGroup/configure/AmazonSecurityGroupModal.d.ts +43 -0
- package/dist/securityGroup/details/AmazonSecurityGroupDetails.d.ts +62 -0
- package/dist/securityGroup/details/index.d.ts +1 -0
- package/dist/securityGroup/index.d.ts +1 -0
- package/dist/securityGroup/securityGroup.reader.d.ts +0 -1
- package/dist/securityGroup/securityGroup.transformer.d.ts +11 -2
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +23 -7
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +17 -13
- package/dist/serverGroup/configure/wizard/AmazonCloneServerGroupModal.d.ts +16 -6
- package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +6 -3
- package/dist/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.d.ts +3 -0
- package/dist/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.d.ts +4 -0
- package/dist/serverGroup/details/AmazonServerGroupActions.d.ts +10 -2
- package/dist/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.d.ts +17 -0
- package/dist/serverGroup/details/advancedSettings/index.d.ts +1 -0
- package/dist/serverGroup/details/resize/AmazonResizeServerGroupModal.d.ts +5 -3
- package/dist/serverGroup/details/rollback/AmazonRollbackServerGroupModal.d.ts +67 -0
- package/dist/serverGroup/details/rollback/index.d.ts +2 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroupSelection.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/ScalingPolicyWriter.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.d.ts +0 -1
- package/dist/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.d.ts +24 -0
- package/dist/serverGroup/details/scalingProcesses/index.d.ts +2 -0
- package/dist/serverGroup/details/scheduledActions/EditScheduledActionsModal.d.ts +31 -0
- package/dist/serverGroup/details/scheduledActions/index.d.ts +1 -0
- package/dist/serverGroup/details/sections/AdvancedSettingsDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/AmazonCapacityDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/ScalingProcessesDetailsSection.d.ts +1 -1
- package/dist/serverGroup/details/sections/ScheduledActionsDetailsSection.d.ts +1 -1
- package/dist/serverGroup/details/sections/SecurityGroupsDetailsSection.d.ts +4 -1
- package/dist/serverGroup/details/sections/WarmPoolDetailsSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/index.d.ts +1 -0
- package/dist/serverGroup/details/securityGroups/EditSecurityGroupsModal.d.ts +32 -0
- package/dist/serverGroup/details/securityGroups/index.d.ts +1 -0
- package/dist/serverGroup/details/warmPool/ModifyWarmPoolModal.d.ts +26 -0
- package/dist/serverGroup/details/warmPool/WarmPoolService.d.ts +6 -0
- package/dist/serverGroup/details/warmPool/index.d.ts +2 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +1 -2
- package/dist/vpc/VpcReader.d.ts +2 -2
- package/dist/vpc/index.d.ts +1 -0
- package/package.json +3 -12
- package/src/aws.module.spec.ts +296 -0
- package/src/aws.module.ts +107 -112
- package/src/aws.services.ts +21 -0
- package/src/certificates/AmazonCertificateReader.ts +1 -1
- package/src/domain/IAmazonServerGroup.ts +9 -0
- package/src/function/CreateLambdaFunction.tsx +29 -16
- package/src/function/configure/Network.tsx +8 -4
- package/src/function/details/AmazonFunctionDetails.tsx +4 -5
- package/src/function/details/FunctionActions.tsx +5 -1
- package/src/function/function.transformer.ts +4 -0
- package/src/image/image.reader.ts +3 -5
- package/src/index.ts +2 -2
- package/src/instance/amazon.instance.write.service.ts +15 -4
- package/src/instance/awsInstanceType.service.spec.js +172 -136
- package/src/instance/awsInstanceType.service.ts +142 -154
- package/src/instance/details/AmazonInstanceDetails.spec.tsx +79 -0
- package/src/instance/details/AmazonInstanceDetails.tsx +644 -0
- package/src/instance/details/InstanceInformation.tsx +11 -14
- package/src/instance/details/InstanceSecurityGroups.tsx +20 -23
- package/src/instance/details/InstanceTags.tsx +5 -3
- package/src/instance/index.ts +1 -0
- package/src/keyPairs/KeyPairsReader.ts +1 -1
- package/src/loadBalancer/AmazonLoadBalancersTag.spec.tsx +39 -0
- package/src/loadBalancer/AmazonLoadBalancersTag.tsx +21 -14
- package/src/loadBalancer/OidcConfigReader.ts +1 -1
- package/src/loadBalancer/TargetGroupDetails.spec.tsx +113 -0
- package/src/loadBalancer/TargetGroupDetails.tsx +287 -7
- package/src/loadBalancer/amazonLoadBalancerDataUtils.ts +21 -21
- package/src/loadBalancer/configure/AmazonLoadBalancerChoiceModal.tsx +17 -4
- package/src/loadBalancer/configure/LoadBalancerTypes.ts +7 -4
- package/src/loadBalancer/configure/application/ALBListeners.tsx +1 -2
- package/src/loadBalancer/configure/application/CreateApplicationLoadBalancer.tsx +28 -18
- package/src/loadBalancer/configure/classic/CreateClassicLoadBalancer.tsx +29 -19
- package/src/loadBalancer/configure/common/LoadBalancerLocation.tsx +1 -1
- package/src/loadBalancer/configure/common/SecurityGroups.spec.tsx +27 -0
- package/src/loadBalancer/configure/common/SecurityGroups.tsx +11 -5
- package/src/loadBalancer/configure/network/CreateNetworkLoadBalancer.tsx +28 -18
- package/src/loadBalancer/details/LoadBalancerActions.tsx +19 -5
- package/src/loadBalancer/details/amazonLoadBalancerDetails.spec.tsx +141 -0
- package/src/loadBalancer/details/amazonLoadBalancerDetails.tsx +599 -0
- package/src/loadBalancer/index.ts +1 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +3 -4
- package/src/pipeline/stages/AmazonStageConfig.spec.tsx +103 -0
- package/src/pipeline/stages/AmazonStageConfig.tsx +259 -0
- package/src/pipeline/stages/bake/AwsBakeStageConfig.tsx +708 -0
- package/src/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.tsx +275 -0
- package/src/pipeline/stages/deleteLambda/index.ts +2 -6
- package/src/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.tsx +14 -33
- package/src/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.tsx +264 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.spec.tsx +403 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.ts +21 -29
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.ts +1 -11
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.tsx +4 -3
- package/src/pipeline/stages/deployLambda/components/NetworkForm.tsx +3 -6
- package/src/pipeline/stages/deployLambda/index.ts +2 -6
- package/src/pipeline/stages/destroyAsg/awsDestroyAsgStage.js +28 -65
- package/src/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.tsx +103 -0
- package/src/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.tsx +119 -0
- package/src/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.tsx +98 -0
- package/src/pipeline/stages/findAmi/awsFindAmiStage.js +22 -79
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.spec.tsx +122 -0
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.tsx +71 -0
- package/src/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.js +17 -32
- package/src/pipeline/stages/invokeLambda/index.ts +2 -6
- package/src/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.tsx +146 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.js +27 -98
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.spec.tsx +167 -0
- package/src/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.tsx +157 -0
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.js +26 -0
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.spec.tsx +89 -0
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.spec.tsx +617 -0
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.tsx +340 -0
- package/src/pipeline/stages/resizeAsg/awsResizeAsgStage.js +34 -125
- package/src/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.tsx +129 -0
- package/src/pipeline/stages/routeLambda/index.ts +2 -6
- package/src/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.tsx +121 -0
- package/src/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.tsx +136 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.spec.tsx +167 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.tsx +94 -0
- package/src/pipeline/stages/updateCodeLambda/index.ts +2 -6
- package/src/routerConsumers.spec.tsx +207 -0
- package/src/search/searchResultFormatter.ts +9 -16
- package/src/securityGroup/configure/AmazonSecurityGroupModal.spec.tsx +170 -0
- package/src/securityGroup/configure/AmazonSecurityGroupModal.tsx +440 -0
- package/src/securityGroup/details/AmazonSecurityGroupDetails.spec.tsx +62 -0
- package/src/securityGroup/details/AmazonSecurityGroupDetails.tsx +444 -0
- package/src/securityGroup/details/IPRangeRules.tsx +1 -1
- package/src/securityGroup/details/index.ts +1 -0
- package/src/securityGroup/index.ts +1 -0
- package/src/securityGroup/securityGroup.reader.ts +0 -5
- package/src/securityGroup/securityGroup.transformer.ts +35 -0
- package/src/serverGroup/configure/AmazonImageSelectInput.spec.tsx +104 -80
- package/src/serverGroup/configure/AmazonImageSelectInput.tsx +37 -18
- package/src/serverGroup/configure/serverGroupCommandBuilder.aws.service.spec.js +28 -66
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +476 -465
- package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +76 -124
- package/src/serverGroup/configure/serverGroupConfiguration.service.ts +106 -103
- package/src/serverGroup/configure/wizard/AmazonCloneServerGroupModal.tsx +65 -25
- package/src/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.tsx +3 -3
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.tsx +2 -2
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.spec.tsx +105 -0
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.tsx +20 -6
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.spec.tsx +39 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +10 -9
- package/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx +2 -2
- package/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx +5 -2
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.spec.tsx +53 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.tsx +35 -33
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.spec.tsx +20 -0
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.tsx +9 -4
- package/src/serverGroup/details/AmazonServerGroupActions.spec.tsx +186 -0
- package/src/serverGroup/details/AmazonServerGroupActions.tsx +37 -87
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.spec.tsx +110 -0
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.tsx +117 -0
- package/src/serverGroup/details/advancedSettings/index.ts +1 -0
- package/src/serverGroup/details/amazonServerGroupDetailsGetter.ts +4 -4
- package/src/serverGroup/details/resize/AmazonResizeServerGroupModal.tsx +16 -6
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.spec.tsx +285 -0
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.tsx +449 -0
- package/src/serverGroup/details/rollback/index.ts +2 -0
- package/src/serverGroup/details/rollback/rollbackServerGroupSelection.spec.ts +101 -0
- package/src/serverGroup/details/rollback/rollbackServerGroupSelection.ts +81 -0
- package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +4 -4
- package/src/serverGroup/details/scalingPolicy/ScalingPolicyWriter.ts +2 -5
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.tsx +0 -2
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.spec.tsx +74 -0
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.tsx +140 -0
- package/src/serverGroup/details/scalingProcesses/index.ts +2 -0
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.spec.tsx +115 -0
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.tsx +205 -0
- package/src/serverGroup/details/scheduledActions/index.ts +1 -0
- package/src/serverGroup/details/sections/AdvancedSettingsDetailsSection.tsx +7 -14
- package/src/serverGroup/details/sections/AmazonCapacityDetailsSection.tsx +14 -2
- package/src/serverGroup/details/sections/AmazonServerGroupMaintenanceActions.spec.tsx +148 -0
- package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.spec.tsx +1 -5
- package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.spec.tsx +1 -5
- package/src/serverGroup/details/sections/ScalingProcessesDetailsSection.tsx +8 -20
- package/src/serverGroup/details/sections/ScheduledActionsDetailsSection.tsx +7 -12
- package/src/serverGroup/details/sections/SecurityGroupsDetailsSection.tsx +14 -19
- package/src/serverGroup/details/sections/WarmPoolDetailsSection.tsx +44 -0
- package/src/serverGroup/details/sections/index.ts +1 -0
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.spec.tsx +161 -0
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.tsx +177 -0
- package/src/serverGroup/details/securityGroups/index.ts +1 -0
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.spec.tsx +69 -0
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.tsx +191 -0
- package/src/serverGroup/details/warmPool/WarmPoolService.spec.ts +30 -0
- package/src/serverGroup/details/warmPool/WarmPoolService.ts +15 -0
- package/src/serverGroup/details/warmPool/index.ts +2 -0
- package/src/serverGroup/serverGroup.transformer.ts +1 -6
- package/src/vpc/VpcReader.ts +2 -2
- package/src/vpc/index.ts +1 -0
- package/dist/common/common.module.d.ts +0 -1
- package/dist/common/footer.component.d.ts +0 -1
- package/dist/function/function.module.d.ts +0 -1
- package/dist/instance/details/amazonInstanceInformation.component.d.ts +0 -1
- package/dist/instance/details/instance.details.controller.d.ts +0 -2
- package/dist/instance/details/instanceDns.component.d.ts +0 -1
- package/dist/instance/details/instanceSecurityGroups.component.d.ts +0 -1
- package/dist/instance/details/instanceStatus.component.d.ts +0 -1
- package/dist/instance/details/instanceTags.component.d.ts +0 -1
- package/dist/loadBalancer/details/loadBalancerActions.component.d.ts +0 -1
- package/dist/loadBalancer/details/loadBalancerDetails.controller.d.ts +0 -41
- package/dist/loadBalancer/details/targetGroupDetails.controller.d.ts +0 -30
- package/dist/loadBalancer/loadBalancer.module.d.ts +0 -1
- package/dist/loadBalancer/targetGroup.states.d.ts +0 -1
- package/dist/pipeline/stages/bake/awsBakeStage.d.ts +0 -2
- package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +0 -2
- package/dist/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.d.ts +0 -2
- package/dist/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.d.ts +0 -1
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.d.ts +0 -25
- package/dist/pipeline/stages/disableAsg/awsDisableAsgStage.d.ts +0 -2
- package/dist/pipeline/stages/disableCluster/awsDisableClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/enableAsg/awsEnableAsgStage.d.ts +0 -2
- package/dist/pipeline/stages/rollbackCluster/awsRollbackClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/shrinkCluster/awsShrinkClusterStage.d.ts +0 -2
- package/dist/reactShims/aws.react.injector.d.ts +0 -18
- package/dist/reactShims/aws.react.module.d.ts +0 -1
- package/dist/reactShims/index.d.ts +0 -1
- package/dist/securityGroup/clone/cloneSecurityGroup.controller.d.ts +0 -2
- package/dist/securityGroup/configure/CreateSecurityGroupCtrl.d.ts +0 -2
- package/dist/securityGroup/configure/EditSecurityGroupCtrl.d.ts +0 -2
- package/dist/securityGroup/configure/configSecurityGroup.mixin.controller.d.ts +0 -2
- package/dist/securityGroup/configure/ingressRuleGroupSelector.component.d.ts +0 -1
- package/dist/securityGroup/configure/securityGroupDetailsCustom.component.d.ts +0 -1
- package/dist/securityGroup/configure/securityGroupDetailsCustom.d.ts +0 -10
- package/dist/securityGroup/details/securityGroupDetail.controller.d.ts +0 -2
- package/dist/securityGroup/details/securityGroupIpRangeRules.component.d.ts +0 -1
- package/dist/securityGroup/securityGroup.module.d.ts +0 -1
- package/dist/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +0 -2
- package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +0 -1
- package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +0 -1
- package/dist/serverGroup/details/scalingPolicy/scalingPolicySummary.component.d.ts +0 -1
- package/dist/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.d.ts +0 -2
- package/dist/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/serverGroupDetails.module.d.ts +0 -1
- package/dist/subnet/subnet.renderer.d.ts +0 -5
- package/dist/vpc/vpc.module.d.ts +0 -1
- package/src/applicationProviderFields/awsFields.html +0 -13
- package/src/common/common.module.ts +0 -6
- package/src/common/footer.component.ts +0 -29
- package/src/function/function.module.ts +0 -5
- package/src/image/image.reader.spec.ts +0 -75
- package/src/instance/details/amazonInstanceInformation.component.ts +0 -13
- package/src/instance/details/instance.details.controller.js +0 -586
- package/src/instance/details/instance.details.controller.spec.js +0 -133
- package/src/instance/details/instanceDetails.html +0 -65
- package/src/instance/details/instanceDns.component.ts +0 -21
- package/src/instance/details/instanceSecurityGroups.component.ts +0 -13
- package/src/instance/details/instanceStatus.component.ts +0 -19
- package/src/instance/details/instanceTags.component.ts +0 -13
- package/src/loadBalancer/details/loadBalancerActions.component.ts +0 -16
- package/src/loadBalancer/details/loadBalancerDetails.controller.spec.ts +0 -76
- package/src/loadBalancer/details/loadBalancerDetails.controller.ts +0 -240
- package/src/loadBalancer/details/loadBalancerDetails.html +0 -266
- package/src/loadBalancer/details/targetGroupDetails.controller.ts +0 -95
- package/src/loadBalancer/details/targetGroupDetails.html +0 -138
- package/src/loadBalancer/loadBalancer.module.ts +0 -15
- package/src/loadBalancer/targetGroup.states.ts +0 -55
- package/src/pipeline/stages/bake/awsBakeStage.js +0 -219
- package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +0 -43
- package/src/pipeline/stages/bake/bakeExecutionDetails.html +0 -65
- package/src/pipeline/stages/bake/bakeStage.html +0 -205
- package/src/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.js +0 -143
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +0 -143
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +0 -1
- package/src/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.ts +0 -46
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.ts +0 -84
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.html +0 -84
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +0 -9
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +0 -1
- package/src/pipeline/stages/disableAsg/awsDisableAsgStage.js +0 -69
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +0 -11
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +0 -1
- package/src/pipeline/stages/disableCluster/awsDisableClusterStage.js +0 -84
- package/src/pipeline/stages/disableCluster/disableClusterStage.html +0 -26
- package/src/pipeline/stages/enableAsg/awsEnableAsgStage.js +0 -73
- package/src/pipeline/stages/enableAsg/enableAsgStage.html +0 -11
- package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +0 -1
- package/src/pipeline/stages/findAmi/findAmiStage.html +0 -24
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +0 -44
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +0 -11
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessExecutionDetails.html +0 -36
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.html +0 -24
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +0 -90
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +0 -4
- package/src/pipeline/stages/rollbackCluster/awsRollbackClusterStage.js +0 -66
- package/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html +0 -43
- package/src/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.js +0 -78
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +0 -35
- package/src/pipeline/stages/shrinkCluster/awsShrinkClusterStage.js +0 -73
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +0 -34
- package/src/pipeline/stages/tagImage/awsTagImageStage.js +0 -34
- package/src/pipeline/stages/tagImage/tagImageExecutionDetails.html +0 -38
- package/src/pipeline/stages/tagImage/tagImageStage.html +0 -10
- package/src/reactShims/aws.react.injector.ts +0 -25
- package/src/reactShims/aws.react.module.ts +0 -12
- package/src/reactShims/index.ts +0 -1
- package/src/securityGroup/clone/cloneSecurityGroup.controller.js +0 -106
- package/src/securityGroup/clone/cloneSecurityGroup.html +0 -19
- package/src/securityGroup/configure/CreateSecurityGroup.controller.spec.js +0 -307
- package/src/securityGroup/configure/CreateSecurityGroupCtrl.js +0 -47
- package/src/securityGroup/configure/EditSecurityGroupCtrl.js +0 -115
- package/src/securityGroup/configure/configSecurityGroup.mixin.controller.js +0 -366
- package/src/securityGroup/configure/createSecurityGroup.html +0 -19
- package/src/securityGroup/configure/createSecurityGroupIngress.html +0 -100
- package/src/securityGroup/configure/createSecurityGroupProperties.html +0 -123
- package/src/securityGroup/configure/editSecurityGroup.html +0 -20
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.html +0 -77
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.less +0 -6
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.ts +0 -190
- package/src/securityGroup/configure/securityGroupDetailsCustom.component.ts +0 -16
- package/src/securityGroup/configure/securityGroupDetailsCustom.tsx +0 -16
- package/src/securityGroup/details/securityGroupDetail.controller.js +0 -249
- package/src/securityGroup/details/securityGroupDetail.html +0 -114
- package/src/securityGroup/details/securityGroupIpRangeRules.component.ts +0 -12
- package/src/securityGroup/securityGroup.module.ts +0 -26
- package/src/securityGroup/securityGroup.transformer.js +0 -48
- package/src/serverGroup/configure/serverGroupConfiguration.service.spec.ts +0 -478
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.js +0 -47
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.html +0 -79
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +0 -146
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +0 -139
- package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +0 -15
- package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +0 -6
- package/src/serverGroup/details/scalingPolicy/scalingPolicySummary.component.ts +0 -14
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/dimensionsEditor.less +0 -18
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.js +0 -95
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.spec.js +0 -106
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.html +0 -30
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.js +0 -70
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.html +0 -89
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.js +0 -95
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.html +0 -40
- package/src/serverGroup/details/serverGroupDetails.module.ts +0 -18
- package/src/serverGroup/serverGroup.transformer.spec.ts +0 -185
- package/src/subnet/SubnetSelectInput.spec.tsx +0 -91
- package/src/subnet/subnet.renderer.ts +0 -12
- package/src/vpc/vpc.module.ts +0 -9
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { AccountService, SubnetReader } from '@spinnaker/core';
|
|
4
4
|
|
|
5
5
|
import { AWSProviderSettings } from '../../aws.settings';
|
|
6
|
+
import { createAwsServerGroupCommandBuilder } from './serverGroupCommandBuilder.service';
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
createMockAmazonServerGroupWithLt,
|
|
@@ -13,62 +14,50 @@ import {
|
|
|
13
14
|
describe('awsServerGroupCommandBuilder', function () {
|
|
14
15
|
const AccountServiceFixture = require('./AccountServiceFixtures');
|
|
15
16
|
|
|
16
|
-
beforeEach(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
spyOn(SubnetReader, 'listSubnets').and.returnValue($q.when([]));
|
|
31
|
-
spyOn(AccountService, 'getAvailabilityZonesForAccountAndRegion').and.returnValue(this.$q.when(['a', 'b', 'c']));
|
|
32
|
-
}),
|
|
33
|
-
);
|
|
17
|
+
beforeEach(function () {
|
|
18
|
+
this.instanceTypeService = {
|
|
19
|
+
getCategoryForMultipleInstanceTypes: jasmine.createSpy('getCategoryForMultipleInstanceTypes'),
|
|
20
|
+
};
|
|
21
|
+
this.awsServerGroupCommandBuilder = createAwsServerGroupCommandBuilder(this.instanceTypeService);
|
|
22
|
+
spyOn(AccountService, 'getPreferredZonesByAccount').and.returnValue(
|
|
23
|
+
Promise.resolve(AccountServiceFixture.preferredZonesByAccount),
|
|
24
|
+
);
|
|
25
|
+
spyOn(AccountService, 'getCredentialsKeyedByAccount').and.returnValue(
|
|
26
|
+
Promise.resolve(AccountServiceFixture.credentialsKeyedByAccount),
|
|
27
|
+
);
|
|
28
|
+
spyOn(SubnetReader, 'listSubnets').and.returnValue(Promise.resolve([]));
|
|
29
|
+
spyOn(AccountService, 'getAvailabilityZonesForAccountAndRegion').and.returnValue(Promise.resolve(['a', 'b', 'c']));
|
|
30
|
+
});
|
|
34
31
|
|
|
35
32
|
afterEach(AWSProviderSettings.resetToOriginal);
|
|
36
33
|
|
|
37
34
|
describe('buildNewServerGroupCommand', function () {
|
|
38
|
-
it('initializes to default values, setting usePreferredZone flag to true', function () {
|
|
39
|
-
let command = null;
|
|
35
|
+
it('initializes to default values, setting usePreferredZone flag to true', async function () {
|
|
40
36
|
AWSProviderSettings.defaults.iamRole = '{{application}}IAMRole';
|
|
41
|
-
this.awsServerGroupCommandBuilder
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
this.$scope.$digest();
|
|
37
|
+
const command = await this.awsServerGroupCommandBuilder.buildNewServerGroupCommand(
|
|
38
|
+
{ name: 'appo', defaultCredentials: {}, defaultRegions: {} },
|
|
39
|
+
'aws',
|
|
40
|
+
);
|
|
48
41
|
|
|
49
42
|
expect(command.viewState.usePreferredZones).toBe(true);
|
|
50
43
|
expect(command.availabilityZones).toEqual(['a', 'b', 'c']);
|
|
51
44
|
expect(command.iamRole).toBe('appoIAMRole');
|
|
52
45
|
});
|
|
53
46
|
|
|
54
|
-
it('sets unlimitedCpuCredits to undefined if not modified by user', function () {
|
|
55
|
-
let command = null;
|
|
47
|
+
it('sets unlimitedCpuCredits to undefined if not modified by user', async function () {
|
|
56
48
|
AWSProviderSettings.defaults.iamRole = '{{application}}IAMRole';
|
|
57
|
-
this.awsServerGroupCommandBuilder
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
this.$scope.$digest();
|
|
49
|
+
const command = await this.awsServerGroupCommandBuilder.buildNewServerGroupCommand(
|
|
50
|
+
{ name: 'test-app', defaultCredentials: {}, defaultRegions: {} },
|
|
51
|
+
'aws',
|
|
52
|
+
);
|
|
64
53
|
|
|
65
54
|
expect(command.unlimitedCpuCredits).toBe(undefined);
|
|
66
55
|
});
|
|
67
56
|
});
|
|
68
57
|
|
|
69
58
|
describe('buildServerGroupCommandFromExisting', function () {
|
|
70
|
-
it('sets usePreferredZones flag based on initial value', function () {
|
|
71
|
-
|
|
59
|
+
it('sets usePreferredZones flag based on initial value', async function () {
|
|
60
|
+
this.instanceTypeService.getCategoryForMultipleInstanceTypes.and.returnValue(Promise.resolve('custom'));
|
|
72
61
|
const baseServerGroup = {
|
|
73
62
|
account: 'prod',
|
|
74
63
|
region: 'us-west-1',
|
|
@@ -78,37 +67,27 @@ describe('awsServerGroupCommandBuilder', function () {
|
|
|
78
67
|
},
|
|
79
68
|
launchTemplate: mockLaunchTemplate,
|
|
80
69
|
};
|
|
81
|
-
let command =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
.then(function (result) {
|
|
86
|
-
command = result;
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
this.$scope.$digest();
|
|
70
|
+
let command = await this.awsServerGroupCommandBuilder.buildServerGroupCommandFromExisting(
|
|
71
|
+
{ name: 'appo' },
|
|
72
|
+
baseServerGroup,
|
|
73
|
+
);
|
|
90
74
|
|
|
91
75
|
expect(command.viewState.usePreferredZones).toBe(true);
|
|
92
76
|
expect(command.availabilityZones).toEqual(['g', 'h', 'i']);
|
|
93
77
|
|
|
94
78
|
baseServerGroup.asg.availabilityZones = ['g'];
|
|
95
79
|
|
|
96
|
-
this.awsServerGroupCommandBuilder
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
this.$scope.$digest();
|
|
80
|
+
command = await this.awsServerGroupCommandBuilder.buildServerGroupCommandFromExisting(
|
|
81
|
+
{ name: 'appo' },
|
|
82
|
+
baseServerGroup,
|
|
83
|
+
);
|
|
103
84
|
|
|
104
85
|
expect(command.viewState.usePreferredZones).toBe(false);
|
|
105
86
|
expect(command.availabilityZones).toEqual(['g']);
|
|
106
87
|
});
|
|
107
88
|
|
|
108
|
-
it('sets profile and instance type if available', function () {
|
|
109
|
-
|
|
110
|
-
this.$q.when('selectedProfile'),
|
|
111
|
-
);
|
|
89
|
+
it('sets profile and instance type if available', async function () {
|
|
90
|
+
this.instanceTypeService.getCategoryForMultipleInstanceTypes.and.returnValue(Promise.resolve('selectedProfile'));
|
|
112
91
|
|
|
113
92
|
const baseServerGroup = {
|
|
114
93
|
account: 'prod',
|
|
@@ -123,24 +102,17 @@ describe('awsServerGroupCommandBuilder', function () {
|
|
|
123
102
|
securityGroups: [],
|
|
124
103
|
},
|
|
125
104
|
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
.then(function (result) {
|
|
131
|
-
command = result;
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
this.$scope.$digest();
|
|
105
|
+
const command = await this.awsServerGroupCommandBuilder.buildServerGroupCommandFromExisting(
|
|
106
|
+
{ name: 'appo' },
|
|
107
|
+
baseServerGroup,
|
|
108
|
+
);
|
|
135
109
|
|
|
136
110
|
expect(command.viewState.instanceProfile).toBe('selectedProfile');
|
|
137
111
|
expect(command.instanceType).toBe('something-custom');
|
|
138
112
|
});
|
|
139
113
|
|
|
140
|
-
it('copies suspended processes unless the mode is "editPipeline"', function () {
|
|
141
|
-
|
|
142
|
-
this.$q.when('selectedProfile'),
|
|
143
|
-
);
|
|
114
|
+
it('copies suspended processes unless the mode is "editPipeline"', async function () {
|
|
115
|
+
this.instanceTypeService.getCategoryForMultipleInstanceTypes.and.returnValue(Promise.resolve('selectedProfile'));
|
|
144
116
|
|
|
145
117
|
const baseServerGroup = {
|
|
146
118
|
account: 'prod',
|
|
@@ -156,29 +128,24 @@ describe('awsServerGroupCommandBuilder', function () {
|
|
|
156
128
|
securityGroups: [],
|
|
157
129
|
},
|
|
158
130
|
};
|
|
159
|
-
let command =
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
.then((result) => (command = result));
|
|
164
|
-
|
|
165
|
-
this.$scope.$digest();
|
|
131
|
+
let command = await this.awsServerGroupCommandBuilder.buildServerGroupCommandFromExisting(
|
|
132
|
+
{ name: 'appo' },
|
|
133
|
+
baseServerGroup,
|
|
134
|
+
);
|
|
166
135
|
|
|
167
136
|
expect(command.suspendedProcesses).toEqual(['x', 'a']);
|
|
168
137
|
|
|
169
|
-
this.awsServerGroupCommandBuilder
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
138
|
+
command = await this.awsServerGroupCommandBuilder.buildServerGroupCommandFromExisting(
|
|
139
|
+
{ name: 'appo' },
|
|
140
|
+
baseServerGroup,
|
|
141
|
+
'editPipeline',
|
|
142
|
+
);
|
|
174
143
|
|
|
175
144
|
expect(command.suspendedProcesses).toEqual([]);
|
|
176
145
|
});
|
|
177
146
|
|
|
178
|
-
it('copies tags not in the reserved list:', function () {
|
|
179
|
-
|
|
180
|
-
this.$q.when('selectedProfile'),
|
|
181
|
-
);
|
|
147
|
+
it('copies tags not in the reserved list:', async function () {
|
|
148
|
+
this.instanceTypeService.getCategoryForMultipleInstanceTypes.and.returnValue(Promise.resolve('selectedProfile'));
|
|
182
149
|
|
|
183
150
|
const baseServerGroup = {
|
|
184
151
|
account: 'prod',
|
|
@@ -207,21 +174,16 @@ describe('awsServerGroupCommandBuilder', function () {
|
|
|
207
174
|
securityGroups: [],
|
|
208
175
|
},
|
|
209
176
|
};
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
.then((result) => (command = result));
|
|
215
|
-
|
|
216
|
-
this.$scope.$digest();
|
|
177
|
+
const command = await this.awsServerGroupCommandBuilder.buildServerGroupCommandFromExisting(
|
|
178
|
+
{ name: 'appo' },
|
|
179
|
+
baseServerGroup,
|
|
180
|
+
);
|
|
217
181
|
|
|
218
182
|
expect(command.tags).toEqual({ 'some-key': 'some-value' });
|
|
219
183
|
});
|
|
220
184
|
|
|
221
|
-
it('sets unlimitedCpuCredits to false when building from source server group with standard credits', function () {
|
|
222
|
-
|
|
223
|
-
this.$q.when('selectedProfile'),
|
|
224
|
-
);
|
|
185
|
+
it('sets unlimitedCpuCredits to false when building from source server group with standard credits', async function () {
|
|
186
|
+
this.instanceTypeService.getCategoryForMultipleInstanceTypes.and.returnValue(Promise.resolve('selectedProfile'));
|
|
225
187
|
|
|
226
188
|
const baseServerGroup = createMockAmazonServerGroupWithLt(
|
|
227
189
|
createCustomMockLaunchTemplate('testLtCpuCredits', {
|
|
@@ -231,20 +193,16 @@ describe('awsServerGroupCommandBuilder', function () {
|
|
|
231
193
|
}),
|
|
232
194
|
);
|
|
233
195
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
this.$scope.$digest();
|
|
196
|
+
const command = await this.awsServerGroupCommandBuilder.buildServerGroupCommandFromExisting(
|
|
197
|
+
{ name: 'test' },
|
|
198
|
+
baseServerGroup,
|
|
199
|
+
);
|
|
240
200
|
|
|
241
201
|
expect(command.unlimitedCpuCredits).toBe(false);
|
|
242
202
|
});
|
|
243
203
|
|
|
244
|
-
it('sets unlimitedCpuCredits to true when building from source server group with unlimited credits', function () {
|
|
245
|
-
|
|
246
|
-
this.$q.when('selectedProfile'),
|
|
247
|
-
);
|
|
204
|
+
it('sets unlimitedCpuCredits to true when building from source server group with unlimited credits', async function () {
|
|
205
|
+
this.instanceTypeService.getCategoryForMultipleInstanceTypes.and.returnValue(Promise.resolve('selectedProfile'));
|
|
248
206
|
|
|
249
207
|
const baseServerGroup = createMockAmazonServerGroupWithLt(
|
|
250
208
|
createCustomMockLaunchTemplate('testLtCpuCredits', {
|
|
@@ -254,29 +212,23 @@ describe('awsServerGroupCommandBuilder', function () {
|
|
|
254
212
|
}),
|
|
255
213
|
);
|
|
256
214
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
this.$scope.$digest();
|
|
215
|
+
const command = await this.awsServerGroupCommandBuilder.buildServerGroupCommandFromExisting(
|
|
216
|
+
{ name: 'test' },
|
|
217
|
+
baseServerGroup,
|
|
218
|
+
);
|
|
263
219
|
|
|
264
220
|
expect(command.unlimitedCpuCredits).toBe(true);
|
|
265
221
|
});
|
|
266
222
|
|
|
267
|
-
it('sets unlimitedCpuCredits to undefined when building from source server group with cpu credits unset', function () {
|
|
268
|
-
|
|
269
|
-
this.$q.when('selectedProfile'),
|
|
270
|
-
);
|
|
223
|
+
it('sets unlimitedCpuCredits to undefined when building from source server group with cpu credits unset', async function () {
|
|
224
|
+
this.instanceTypeService.getCategoryForMultipleInstanceTypes.and.returnValue(Promise.resolve('selectedProfile'));
|
|
271
225
|
|
|
272
226
|
const baseServerGroup = createMockAmazonServerGroupWithLt();
|
|
273
227
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
this.$scope.$digest();
|
|
228
|
+
const command = await this.awsServerGroupCommandBuilder.buildServerGroupCommandFromExisting(
|
|
229
|
+
{ name: 'test' },
|
|
230
|
+
baseServerGroup,
|
|
231
|
+
);
|
|
280
232
|
|
|
281
233
|
expect(command.unlimitedCpuCredits).toBe(undefined);
|
|
282
234
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { module } from 'angular';
|
|
2
1
|
import {
|
|
3
2
|
chain,
|
|
4
3
|
clone,
|
|
@@ -15,11 +14,11 @@ import {
|
|
|
15
14
|
some,
|
|
16
15
|
xor,
|
|
17
16
|
} from 'lodash';
|
|
18
|
-
import { $q } from 'ngimport';
|
|
19
17
|
|
|
20
18
|
import type {
|
|
21
19
|
Application,
|
|
22
20
|
CacheInitializerService,
|
|
21
|
+
DeckRuntimeServices,
|
|
23
22
|
IAccountDetails,
|
|
24
23
|
IDeploymentStrategy,
|
|
25
24
|
IRegion,
|
|
@@ -31,20 +30,10 @@ import type {
|
|
|
31
30
|
IServerGroupCommandResult,
|
|
32
31
|
IServerGroupCommandViewState,
|
|
33
32
|
ISubnet,
|
|
34
|
-
LoadBalancerReader,
|
|
35
33
|
SecurityGroupReader,
|
|
36
34
|
ServerGroupCommandRegistry,
|
|
37
35
|
} from '@spinnaker/core';
|
|
38
|
-
import {
|
|
39
|
-
AccountService,
|
|
40
|
-
CACHE_INITIALIZER_SERVICE,
|
|
41
|
-
LOAD_BALANCER_READ_SERVICE,
|
|
42
|
-
NameUtils,
|
|
43
|
-
SECURITY_GROUP_READER,
|
|
44
|
-
SERVER_GROUP_COMMAND_REGISTRY_PROVIDER,
|
|
45
|
-
setMatchingResourceSummary,
|
|
46
|
-
SubnetReader,
|
|
47
|
-
} from '@spinnaker/core';
|
|
36
|
+
import { AccountService, NameUtils, REST, setMatchingResourceSummary, SubnetReader } from '@spinnaker/core';
|
|
48
37
|
|
|
49
38
|
import { AWSProviderSettings } from '../../aws.settings';
|
|
50
39
|
import { AutoScalingProcessService } from '../details/scalingProcesses/AutoScalingProcessService';
|
|
@@ -54,8 +43,8 @@ import type {
|
|
|
54
43
|
IKeyPair,
|
|
55
44
|
IScalingProcess,
|
|
56
45
|
} from '../../domain';
|
|
57
|
-
import {
|
|
58
|
-
import type { IAmazonInstanceType } from '../../instance/awsInstanceType.service';
|
|
46
|
+
import { AwsInstanceTypeService } from '../../instance/awsInstanceType.service';
|
|
47
|
+
import type { IAmazonInstanceType, IAmazonInstanceTypesByRegion } from '../../instance/awsInstanceType.service';
|
|
59
48
|
import { KeyPairsReader } from '../../keyPairs';
|
|
60
49
|
|
|
61
50
|
export type IBlockDeviceMappingSource = 'source' | 'ami' | 'default';
|
|
@@ -81,7 +70,7 @@ export interface IAmazonServerGroupCommandBackingData extends IServerGroupComman
|
|
|
81
70
|
keyPairs: IKeyPair[];
|
|
82
71
|
targetGroups: string[];
|
|
83
72
|
scalingProcesses: IScalingProcess[];
|
|
84
|
-
instanceTypesInfo:
|
|
73
|
+
instanceTypesInfo: IAmazonInstanceTypesByRegion;
|
|
85
74
|
}
|
|
86
75
|
|
|
87
76
|
export interface IAmazonServerGroupCommandViewState extends IServerGroupCommandViewState {
|
|
@@ -178,21 +167,30 @@ export class AwsServerGroupConfigurationService {
|
|
|
178
167
|
'ClosestToNextInstanceHour',
|
|
179
168
|
'Default',
|
|
180
169
|
];
|
|
170
|
+
private securityGroupReader: SecurityGroupReader;
|
|
171
|
+
private awsInstanceTypeService: AwsInstanceTypeService;
|
|
172
|
+
private cacheInitializer: CacheInitializerService;
|
|
181
173
|
|
|
182
|
-
public static $inject = [
|
|
183
|
-
'securityGroupReader',
|
|
184
|
-
'awsInstanceTypeService',
|
|
185
|
-
'cacheInitializer',
|
|
186
|
-
'loadBalancerReader',
|
|
187
|
-
'serverGroupCommandRegistry',
|
|
188
|
-
];
|
|
189
174
|
constructor(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
private
|
|
194
|
-
|
|
195
|
-
|
|
175
|
+
securityGroupReader: SecurityGroupReader,
|
|
176
|
+
awsInstanceTypeService: AwsInstanceTypeService,
|
|
177
|
+
cacheInitializer: CacheInitializerService,
|
|
178
|
+
private serverGroupCommandRegistry: Pick<ServerGroupCommandRegistry, 'getCommandOverrides'> = {
|
|
179
|
+
getCommandOverrides: () => [],
|
|
180
|
+
},
|
|
181
|
+
) {
|
|
182
|
+
this.securityGroupReader = securityGroupReader;
|
|
183
|
+
this.awsInstanceTypeService = awsInstanceTypeService;
|
|
184
|
+
this.cacheInitializer = cacheInitializer;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
private getSecurityGroupReader(): SecurityGroupReader {
|
|
188
|
+
return this.securityGroupReader;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
private getCacheInitializer(): CacheInitializerService {
|
|
192
|
+
return this.cacheInitializer;
|
|
193
|
+
}
|
|
196
194
|
|
|
197
195
|
public configureUpdateCommand(command: IAmazonServerGroupCommand): void {
|
|
198
196
|
command.backingData = {
|
|
@@ -202,7 +200,7 @@ export class AwsServerGroupConfigurationService {
|
|
|
202
200
|
} as IAmazonServerGroupCommandBackingData;
|
|
203
201
|
}
|
|
204
202
|
|
|
205
|
-
public configureCommand(application: Application, cmd: IAmazonServerGroupCommand):
|
|
203
|
+
public configureCommand(application: Application, cmd: IAmazonServerGroupCommand): Promise<void> {
|
|
206
204
|
this.applyOverrides('beforeConfiguration', cmd);
|
|
207
205
|
// TODO: Instead of attaching these to the command itself, they could be static methods
|
|
208
206
|
cmd.toggleSuspendedProcess = (command: IAmazonServerGroupCommand, process: string): void => {
|
|
@@ -260,21 +258,31 @@ export class AwsServerGroupConfigurationService {
|
|
|
260
258
|
command.backingData.filtered.regions.some((region) => region.name === command.region && region.deprecated)
|
|
261
259
|
);
|
|
262
260
|
};
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
261
|
+
const securityGroupReader = this.getSecurityGroupReader();
|
|
262
|
+
|
|
263
|
+
return Promise.all([
|
|
264
|
+
AccountService.getCredentialsKeyedByAccount('aws'),
|
|
265
|
+
securityGroupReader.getAllSecurityGroups(),
|
|
266
|
+
SubnetReader.listSubnets(),
|
|
267
|
+
AccountService.getPreferredZonesByAccount('aws'),
|
|
268
|
+
KeyPairsReader.listKeyPairs(),
|
|
269
|
+
this.awsInstanceTypeService.getAllTypesByRegion(),
|
|
270
|
+
Promise.resolve(clone(this.enabledMetrics)),
|
|
271
|
+
Promise.resolve(clone(this.healthCheckTypes)),
|
|
272
|
+
Promise.resolve(clone(this.terminationPolicies)),
|
|
273
|
+
]).then(
|
|
274
|
+
([
|
|
275
|
+
credentialsKeyedByAccount,
|
|
276
|
+
securityGroups,
|
|
277
|
+
subnets,
|
|
278
|
+
preferredZones,
|
|
279
|
+
keyPairs,
|
|
280
|
+
instanceTypesInfo,
|
|
281
|
+
enabledMetrics,
|
|
282
|
+
healthCheckTypes,
|
|
283
|
+
terminationPolicies,
|
|
284
|
+
]) => {
|
|
285
|
+
const backingData: Partial<IAmazonServerGroupCommandBackingData> = {
|
|
278
286
|
credentialsKeyedByAccount,
|
|
279
287
|
securityGroups,
|
|
280
288
|
subnets,
|
|
@@ -284,45 +292,34 @@ export class AwsServerGroupConfigurationService {
|
|
|
284
292
|
enabledMetrics,
|
|
285
293
|
healthCheckTypes,
|
|
286
294
|
terminationPolicies,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
backingData.accounts = keys(backingData.credentialsKeyedByAccount);
|
|
302
|
-
backingData.filtered = {} as IAmazonServerGroupCommandBackingDataFiltered;
|
|
303
|
-
backingData.scalingProcesses = AutoScalingProcessService.listProcesses();
|
|
304
|
-
backingData.appLoadBalancers = application.getDataSource('loadBalancers').data;
|
|
305
|
-
backingData.managedResources = application.getDataSource('managedResources')?.data?.resources;
|
|
306
|
-
cmd.backingData = backingData as IAmazonServerGroupCommandBackingData;
|
|
307
|
-
this.configureVpcId(cmd);
|
|
308
|
-
backingData.filtered.securityGroups = this.getRegionalSecurityGroups(cmd);
|
|
309
|
-
if (cmd.viewState.disableImageSelection) {
|
|
310
|
-
this.configureInstanceTypes(cmd);
|
|
311
|
-
}
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
let securityGroupReloader: Promise<void> = Promise.resolve();
|
|
298
|
+
backingData.accounts = keys(backingData.credentialsKeyedByAccount);
|
|
299
|
+
backingData.filtered = {} as IAmazonServerGroupCommandBackingDataFiltered;
|
|
300
|
+
backingData.scalingProcesses = AutoScalingProcessService.listProcesses();
|
|
301
|
+
backingData.appLoadBalancers = application.getDataSource('loadBalancers').data;
|
|
302
|
+
backingData.managedResources = application.getDataSource('managedResources')?.data?.resources;
|
|
303
|
+
cmd.backingData = backingData as IAmazonServerGroupCommandBackingData;
|
|
304
|
+
this.configureVpcId(cmd);
|
|
305
|
+
backingData.filtered.securityGroups = this.getRegionalSecurityGroups(cmd);
|
|
306
|
+
if (cmd.viewState.disableImageSelection) {
|
|
307
|
+
this.configureInstanceTypes(cmd);
|
|
308
|
+
}
|
|
312
309
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}
|
|
310
|
+
if (cmd.securityGroups && cmd.securityGroups.length) {
|
|
311
|
+
const regionalSecurityGroupIds = map(this.getRegionalSecurityGroups(cmd), 'id');
|
|
312
|
+
if (intersection(cmd.securityGroups, regionalSecurityGroupIds).length < cmd.securityGroups.length) {
|
|
313
|
+
securityGroupReloader = this.refreshSecurityGroups(cmd, true);
|
|
318
314
|
}
|
|
315
|
+
}
|
|
319
316
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
317
|
+
return securityGroupReloader.then(() => {
|
|
318
|
+
this.applyOverrides('afterConfiguration', cmd);
|
|
319
|
+
this.attachEventHandlers(cmd);
|
|
320
|
+
});
|
|
321
|
+
},
|
|
322
|
+
);
|
|
326
323
|
}
|
|
327
324
|
|
|
328
325
|
public applyOverrides(phase: string, command: IAmazonServerGroupCommand): void {
|
|
@@ -514,15 +511,19 @@ export class AwsServerGroupConfigurationService {
|
|
|
514
511
|
public refreshSecurityGroups(
|
|
515
512
|
command: IAmazonServerGroupCommand,
|
|
516
513
|
skipCommandReconfiguration?: boolean,
|
|
517
|
-
):
|
|
518
|
-
return this.
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
514
|
+
): Promise<void> {
|
|
515
|
+
return this.getCacheInitializer()
|
|
516
|
+
.refreshCache('securityGroups')
|
|
517
|
+
.then(() => {
|
|
518
|
+
return this.getSecurityGroupReader()
|
|
519
|
+
.getAllSecurityGroups()
|
|
520
|
+
.then((securityGroups) => {
|
|
521
|
+
command.backingData.securityGroups = securityGroups;
|
|
522
|
+
if (!skipCommandReconfiguration) {
|
|
523
|
+
this.configureSecurityGroupOptions(command);
|
|
524
|
+
}
|
|
525
|
+
});
|
|
524
526
|
});
|
|
525
|
-
});
|
|
526
527
|
}
|
|
527
528
|
|
|
528
529
|
private getLoadBalancerMap(command: IAmazonServerGroupCommand): IAmazonLoadBalancerSourceData[] {
|
|
@@ -613,12 +614,15 @@ export class AwsServerGroupConfigurationService {
|
|
|
613
614
|
}
|
|
614
615
|
|
|
615
616
|
public refreshLoadBalancers(command: IAmazonServerGroupCommand, skipCommandReconfiguration?: boolean) {
|
|
616
|
-
return
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
617
|
+
return REST('/loadBalancers')
|
|
618
|
+
.query({ provider: 'aws' })
|
|
619
|
+
.get()
|
|
620
|
+
.then((loadBalancers) => {
|
|
621
|
+
command.backingData.loadBalancers = loadBalancers;
|
|
622
|
+
if (!skipCommandReconfiguration) {
|
|
623
|
+
this.configureLoadBalancerOptions(command);
|
|
624
|
+
}
|
|
625
|
+
});
|
|
622
626
|
}
|
|
623
627
|
|
|
624
628
|
public configureVpcId(command: IAmazonServerGroupCommand): IAmazonServerGroupCommandResult {
|
|
@@ -737,11 +741,10 @@ export class AwsServerGroupConfigurationService {
|
|
|
737
741
|
}
|
|
738
742
|
}
|
|
739
743
|
|
|
740
|
-
export
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
]).service('awsServerGroupConfigurationService', AwsServerGroupConfigurationService);
|
|
744
|
+
export class AwsServerGroupConfigurationServiceDelegate extends AwsServerGroupConfigurationService {
|
|
745
|
+
public static readonly requiresDeckRuntimeServices = true;
|
|
746
|
+
|
|
747
|
+
constructor(_promiseService: unknown, runtimeServices: DeckRuntimeServices) {
|
|
748
|
+
super(runtimeServices.securityGroupReader, new AwsInstanceTypeService(), runtimeServices.cacheInitializer);
|
|
749
|
+
}
|
|
750
|
+
}
|