@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
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Modal } from 'react-bootstrap';
|
|
3
|
+
import Select from 'react-select';
|
|
4
|
+
|
|
5
|
+
import type { Application, DeckRuntimeServices, IModalComponentProps, ISecurityGroup } from '@spinnaker/core';
|
|
6
|
+
import {
|
|
7
|
+
confirmNotManaged,
|
|
8
|
+
DeckRuntimeContext,
|
|
9
|
+
FirewallLabels,
|
|
10
|
+
ModalClose,
|
|
11
|
+
ReactModal,
|
|
12
|
+
TaskMonitor,
|
|
13
|
+
TaskMonitorWrapper,
|
|
14
|
+
} from '@spinnaker/core';
|
|
15
|
+
|
|
16
|
+
import { AwsModalFooter } from '../../../common/AwsModalFooter';
|
|
17
|
+
import type { IAmazonServerGroup } from '../../../domain';
|
|
18
|
+
|
|
19
|
+
export interface IEditSecurityGroupsModalProps extends IModalComponentProps {
|
|
20
|
+
application: Application;
|
|
21
|
+
securityGroups?: ISecurityGroup[];
|
|
22
|
+
serverGroup: IAmazonServerGroup;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface IEditSecurityGroupsModalState {
|
|
26
|
+
availableSecurityGroups: ISecurityGroup[];
|
|
27
|
+
securityGroups: ISecurityGroup[];
|
|
28
|
+
securityGroupsLoadError?: string;
|
|
29
|
+
securityGroupsLoaded: boolean;
|
|
30
|
+
taskMonitor: TaskMonitor;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function isLaunchTemplateBacked(serverGroup: IAmazonServerGroup): boolean {
|
|
34
|
+
return Boolean(serverGroup.launchTemplate || serverGroup.mixedInstancesPolicy);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function filterSecurityGroupsForServerGroup(
|
|
38
|
+
allGroups: any,
|
|
39
|
+
serverGroup: IAmazonServerGroup,
|
|
40
|
+
attached: ISecurityGroup[],
|
|
41
|
+
): ISecurityGroup[] {
|
|
42
|
+
const regionalGroups: ISecurityGroup[] = allGroups?.[serverGroup.account]?.aws?.[serverGroup.region] || [];
|
|
43
|
+
const matchingGroups = regionalGroups.filter((group) => group.vpcId === serverGroup.vpcId);
|
|
44
|
+
const matchingById = new Map(matchingGroups.map((group) => [group.id, group]));
|
|
45
|
+
const selectedIds = new Set<string>();
|
|
46
|
+
const selected = (attached || []).map((group) => {
|
|
47
|
+
selectedIds.add(group.id);
|
|
48
|
+
return matchingById.get(group.id) || group;
|
|
49
|
+
});
|
|
50
|
+
const available = matchingGroups
|
|
51
|
+
.filter((group) => !selectedIds.has(group.id))
|
|
52
|
+
.sort((left, right) => left.name.localeCompare(right.name));
|
|
53
|
+
return [...selected, ...available];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export class EditSecurityGroupsModal extends React.Component<
|
|
57
|
+
IEditSecurityGroupsModalProps,
|
|
58
|
+
IEditSecurityGroupsModalState
|
|
59
|
+
> {
|
|
60
|
+
public static contextType = DeckRuntimeContext;
|
|
61
|
+
public declare context: React.ContextType<typeof DeckRuntimeContext>;
|
|
62
|
+
|
|
63
|
+
public static show(props: IEditSecurityGroupsModalProps, runtimeServices: DeckRuntimeServices) {
|
|
64
|
+
return confirmNotManaged(props.serverGroup, props.application).then(
|
|
65
|
+
(notManaged) => notManaged && ReactModal.show(EditSecurityGroupsModal, props, undefined, runtimeServices),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private initialSecurityGroups =
|
|
70
|
+
this.props.securityGroups ||
|
|
71
|
+
(this.props.serverGroup.securityGroups || []).map((id: string) => ({ id, name: id } as ISecurityGroup));
|
|
72
|
+
|
|
73
|
+
public state: IEditSecurityGroupsModalState = {
|
|
74
|
+
availableSecurityGroups: this.initialSecurityGroups,
|
|
75
|
+
securityGroups: this.initialSecurityGroups,
|
|
76
|
+
securityGroupsLoaded: false,
|
|
77
|
+
taskMonitor: new TaskMonitor({
|
|
78
|
+
application: this.props.application,
|
|
79
|
+
title: `Update ${FirewallLabels.get('Firewalls')} for ${this.props.serverGroup.name}`,
|
|
80
|
+
onDismiss: this.props.dismissModal,
|
|
81
|
+
onTaskComplete: () => this.props.application.serverGroups.refresh(),
|
|
82
|
+
}),
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
private isUnmounted = false;
|
|
86
|
+
|
|
87
|
+
public componentDidMount() {
|
|
88
|
+
this.loadSecurityGroups();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
public componentWillUnmount() {
|
|
92
|
+
this.isUnmounted = true;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
private loadSecurityGroups = () => {
|
|
96
|
+
this.setState({ securityGroupsLoaded: false, securityGroupsLoadError: undefined });
|
|
97
|
+
return this.context.services.securityGroupReader
|
|
98
|
+
.getAllSecurityGroups()
|
|
99
|
+
.then((allGroups) => {
|
|
100
|
+
if (!this.isUnmounted) {
|
|
101
|
+
this.setState({
|
|
102
|
+
availableSecurityGroups: filterSecurityGroupsForServerGroup(
|
|
103
|
+
allGroups,
|
|
104
|
+
this.props.serverGroup,
|
|
105
|
+
this.state.securityGroups,
|
|
106
|
+
),
|
|
107
|
+
securityGroupsLoaded: true,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
.catch(() => {
|
|
112
|
+
if (!this.isUnmounted) {
|
|
113
|
+
this.setState({
|
|
114
|
+
securityGroupsLoaded: true,
|
|
115
|
+
securityGroupsLoadError: 'Unable to load security groups. Check your connection and try again.',
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
private submit = () => {
|
|
122
|
+
const { application, serverGroup } = this.props;
|
|
123
|
+
this.state.taskMonitor.submit(() =>
|
|
124
|
+
this.context.services.serverGroupWriter.updateSecurityGroups(
|
|
125
|
+
serverGroup,
|
|
126
|
+
this.state.securityGroups,
|
|
127
|
+
application,
|
|
128
|
+
isLaunchTemplateBacked(serverGroup),
|
|
129
|
+
),
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
public render() {
|
|
134
|
+
const { dismissModal, serverGroup } = this.props;
|
|
135
|
+
return (
|
|
136
|
+
<>
|
|
137
|
+
<TaskMonitorWrapper monitor={this.state.taskMonitor} />
|
|
138
|
+
<ModalClose dismiss={dismissModal} />
|
|
139
|
+
<Modal.Header>
|
|
140
|
+
<Modal.Title>
|
|
141
|
+
Edit {FirewallLabels.get('Firewalls')} for {serverGroup.name}
|
|
142
|
+
</Modal.Title>
|
|
143
|
+
</Modal.Header>
|
|
144
|
+
<Modal.Body className="container-fluid form-horizontal">
|
|
145
|
+
<div className="form-group">
|
|
146
|
+
<div className="col-md-10 col-md-offset-1">
|
|
147
|
+
<Select
|
|
148
|
+
labelKey="name"
|
|
149
|
+
isLoading={!this.state.securityGroupsLoaded}
|
|
150
|
+
multi={true}
|
|
151
|
+
onChange={(securityGroups: ISecurityGroup[]) => this.setState({ securityGroups: securityGroups || [] })}
|
|
152
|
+
optionRenderer={(group: ISecurityGroup) => <span>{`${group.name} (${group.id})`}</span>}
|
|
153
|
+
options={this.state.availableSecurityGroups}
|
|
154
|
+
value={this.state.securityGroups}
|
|
155
|
+
valueKey="id"
|
|
156
|
+
/>
|
|
157
|
+
{this.state.securityGroupsLoadError && (
|
|
158
|
+
<div className="alert alert-danger security-groups-load-error" role="alert">
|
|
159
|
+
{this.state.securityGroupsLoadError}{' '}
|
|
160
|
+
<button className="btn btn-default btn-xs" onClick={this.loadSecurityGroups} type="button">
|
|
161
|
+
Retry
|
|
162
|
+
</button>
|
|
163
|
+
</div>
|
|
164
|
+
)}
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</Modal.Body>
|
|
168
|
+
<AwsModalFooter
|
|
169
|
+
account={serverGroup.account}
|
|
170
|
+
isValid={this.state.securityGroupsLoaded && !this.state.securityGroupsLoadError}
|
|
171
|
+
onCancel={dismissModal}
|
|
172
|
+
onSubmit={this.submit}
|
|
173
|
+
/>
|
|
174
|
+
</>
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './EditSecurityGroupsModal';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { TaskExecutor } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
import { ModifyWarmPoolModal, buildWarmPoolJob } from './ModifyWarmPoolModal';
|
|
4
|
+
|
|
5
|
+
describe('ModifyWarmPoolModal', () => {
|
|
6
|
+
const serverGroup = { name: 'deck-main-v001', account: 'test', region: 'us-east-1' } as any;
|
|
7
|
+
|
|
8
|
+
it('builds a delete job when disabled', () => {
|
|
9
|
+
const state = { enabled: false, minSize: 0, maxGroupPreparedCapacity: -1, poolState: 'Stopped' } as any;
|
|
10
|
+
|
|
11
|
+
expect(buildWarmPoolJob(state, serverGroup)).toEqual({
|
|
12
|
+
type: 'modifyWarmPool',
|
|
13
|
+
action: 'delete',
|
|
14
|
+
asgName: 'deck-main-v001',
|
|
15
|
+
regions: ['us-east-1'],
|
|
16
|
+
credentials: 'test',
|
|
17
|
+
cloudProvider: 'aws',
|
|
18
|
+
reason: undefined,
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('builds an upsert job with the configured fields when enabled', () => {
|
|
23
|
+
const state = {
|
|
24
|
+
enabled: true,
|
|
25
|
+
minSize: 2,
|
|
26
|
+
maxGroupPreparedCapacity: 10,
|
|
27
|
+
poolState: 'Running',
|
|
28
|
+
reuseOnScaleIn: true,
|
|
29
|
+
reason: 'maintenance',
|
|
30
|
+
} as any;
|
|
31
|
+
|
|
32
|
+
expect(buildWarmPoolJob(state, serverGroup)).toEqual({
|
|
33
|
+
type: 'modifyWarmPool',
|
|
34
|
+
action: 'upsert',
|
|
35
|
+
minSize: 2,
|
|
36
|
+
maxGroupPreparedCapacity: 10,
|
|
37
|
+
poolState: 'Running',
|
|
38
|
+
reuseOnScaleIn: true,
|
|
39
|
+
asgName: 'deck-main-v001',
|
|
40
|
+
regions: ['us-east-1'],
|
|
41
|
+
credentials: 'test',
|
|
42
|
+
cloudProvider: 'aws',
|
|
43
|
+
reason: 'maintenance',
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('submits the built job through the task monitor', () => {
|
|
48
|
+
const execute = spyOn(TaskExecutor, 'executeTask').and.returnValue(Promise.resolve({} as any));
|
|
49
|
+
const application = { name: 'deck', serverGroups: { refresh: jasmine.createSpy('refresh') } } as any;
|
|
50
|
+
const modal = new ModifyWarmPoolModal({
|
|
51
|
+
application,
|
|
52
|
+
serverGroup: { ...serverGroup, asg: {} },
|
|
53
|
+
closeModal: jasmine.createSpy('closeModal'),
|
|
54
|
+
dismissModal: jasmine.createSpy('dismissModal'),
|
|
55
|
+
} as any) as any;
|
|
56
|
+
modal.state.enabled = true;
|
|
57
|
+
modal.state.minSize = 3;
|
|
58
|
+
modal.state.poolState = 'Stopped';
|
|
59
|
+
modal.state.taskMonitor = { submit: (method: () => any) => method() };
|
|
60
|
+
|
|
61
|
+
modal.submit();
|
|
62
|
+
|
|
63
|
+
expect(execute).toHaveBeenCalledWith({
|
|
64
|
+
application,
|
|
65
|
+
description: 'Update Warm Pool for deck-main-v001',
|
|
66
|
+
job: [jasmine.objectContaining({ action: 'upsert', minSize: 3, poolState: 'Stopped' })],
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
});
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Modal } from 'react-bootstrap';
|
|
3
|
+
|
|
4
|
+
import type { Application, IJob, IModalComponentProps } from '@spinnaker/core';
|
|
5
|
+
import {
|
|
6
|
+
confirmNotManaged,
|
|
7
|
+
HelpField,
|
|
8
|
+
ModalClose,
|
|
9
|
+
ReactModal,
|
|
10
|
+
TaskExecutor,
|
|
11
|
+
TaskMonitor,
|
|
12
|
+
TaskMonitorWrapper,
|
|
13
|
+
TaskReason,
|
|
14
|
+
} from '@spinnaker/core';
|
|
15
|
+
|
|
16
|
+
import { WarmPoolService } from './WarmPoolService';
|
|
17
|
+
import { AwsModalFooter } from '../../../common/AwsModalFooter';
|
|
18
|
+
import type { IAmazonServerGroup } from '../../../domain';
|
|
19
|
+
|
|
20
|
+
export interface IModifyWarmPoolModalProps extends IModalComponentProps {
|
|
21
|
+
application: Application;
|
|
22
|
+
serverGroup: IAmazonServerGroup;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface IModifyWarmPoolModalState {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
minSize: number;
|
|
28
|
+
maxGroupPreparedCapacity: number;
|
|
29
|
+
poolState: string;
|
|
30
|
+
reuseOnScaleIn: boolean;
|
|
31
|
+
reason?: string;
|
|
32
|
+
taskMonitor: TaskMonitor;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function buildWarmPoolJob(state: IModifyWarmPoolModalState, serverGroup: IAmazonServerGroup): IJob {
|
|
36
|
+
const base = {
|
|
37
|
+
asgName: serverGroup.name,
|
|
38
|
+
regions: [serverGroup.region],
|
|
39
|
+
credentials: serverGroup.account,
|
|
40
|
+
cloudProvider: 'aws',
|
|
41
|
+
reason: state.reason,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
if (!state.enabled) {
|
|
45
|
+
return { ...base, type: 'modifyWarmPool', action: 'delete' };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
...base,
|
|
50
|
+
type: 'modifyWarmPool',
|
|
51
|
+
action: 'upsert',
|
|
52
|
+
minSize: state.minSize,
|
|
53
|
+
maxGroupPreparedCapacity: state.maxGroupPreparedCapacity,
|
|
54
|
+
poolState: state.poolState,
|
|
55
|
+
reuseOnScaleIn: state.reuseOnScaleIn,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export class ModifyWarmPoolModal extends React.Component<IModifyWarmPoolModalProps, IModifyWarmPoolModalState> {
|
|
60
|
+
public static show(props: IModifyWarmPoolModalProps) {
|
|
61
|
+
return confirmNotManaged(props.serverGroup, props.application).then(
|
|
62
|
+
(notManaged) => notManaged && ReactModal.show(ModifyWarmPoolModal, props),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
private initialConfiguration = WarmPoolService.getWarmPoolConfiguration(this.props.serverGroup);
|
|
67
|
+
|
|
68
|
+
public state: IModifyWarmPoolModalState = {
|
|
69
|
+
enabled: !!this.initialConfiguration,
|
|
70
|
+
minSize: this.initialConfiguration?.minSize ?? 0,
|
|
71
|
+
maxGroupPreparedCapacity: this.initialConfiguration?.maxGroupPreparedCapacity ?? -1,
|
|
72
|
+
poolState: this.initialConfiguration?.poolState ?? 'Stopped',
|
|
73
|
+
reuseOnScaleIn: this.initialConfiguration?.instanceReusePolicy?.reuseOnScaleIn ?? false,
|
|
74
|
+
taskMonitor: new TaskMonitor({
|
|
75
|
+
application: this.props.application,
|
|
76
|
+
title: `Update Warm Pool for ${this.props.serverGroup.name}`,
|
|
77
|
+
onDismiss: this.props.dismissModal,
|
|
78
|
+
onTaskComplete: () => this.props.application.serverGroups.refresh(),
|
|
79
|
+
}),
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
private submit = () => {
|
|
83
|
+
const { application, serverGroup } = this.props;
|
|
84
|
+
const job = buildWarmPoolJob(this.state, serverGroup);
|
|
85
|
+
this.state.taskMonitor.submit(() =>
|
|
86
|
+
TaskExecutor.executeTask({
|
|
87
|
+
application,
|
|
88
|
+
description: `Update Warm Pool for ${serverGroup.name}`,
|
|
89
|
+
job: [job],
|
|
90
|
+
}),
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
public render() {
|
|
95
|
+
const { dismissModal, serverGroup } = this.props;
|
|
96
|
+
const { enabled, minSize, maxGroupPreparedCapacity, poolState, reuseOnScaleIn } = this.state;
|
|
97
|
+
return (
|
|
98
|
+
<>
|
|
99
|
+
<TaskMonitorWrapper monitor={this.state.taskMonitor} />
|
|
100
|
+
<ModalClose dismiss={dismissModal} />
|
|
101
|
+
<Modal.Header>
|
|
102
|
+
<Modal.Title>Modify Warm Pool for {serverGroup.name}</Modal.Title>
|
|
103
|
+
</Modal.Header>
|
|
104
|
+
<Modal.Body className="container-fluid form-horizontal">
|
|
105
|
+
<div className="form-group">
|
|
106
|
+
<div className="col-sm-offset-2 col-sm-10">
|
|
107
|
+
<div className="checkbox">
|
|
108
|
+
<label>
|
|
109
|
+
<input
|
|
110
|
+
checked={enabled}
|
|
111
|
+
onChange={(event) => this.setState({ enabled: event.target.checked })}
|
|
112
|
+
type="checkbox"
|
|
113
|
+
/>{' '}
|
|
114
|
+
Enable Warm Pool
|
|
115
|
+
<HelpField
|
|
116
|
+
content="Keeps a pool of pre-initialized instances alongside this Auto Scaling Group to speed up scale-out."
|
|
117
|
+
placement="right"
|
|
118
|
+
/>
|
|
119
|
+
</label>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
{enabled && (
|
|
124
|
+
<>
|
|
125
|
+
<div className="form-group">
|
|
126
|
+
<label className="col-sm-4 control-label">Min Size</label>
|
|
127
|
+
<div className="col-sm-6">
|
|
128
|
+
<input
|
|
129
|
+
className="form-control"
|
|
130
|
+
type="number"
|
|
131
|
+
min={0}
|
|
132
|
+
value={minSize}
|
|
133
|
+
onChange={(event) => this.setState({ minSize: Number(event.target.value) })}
|
|
134
|
+
/>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
<div className="form-group">
|
|
138
|
+
<label className="col-sm-4 control-label">
|
|
139
|
+
Max Group Prepared Capacity
|
|
140
|
+
<HelpField content="The maximum capacity of the Auto Scaling Group, including the warm pool. -1 means no limit beyond the group's own max size." />
|
|
141
|
+
</label>
|
|
142
|
+
<div className="col-sm-6">
|
|
143
|
+
<input
|
|
144
|
+
className="form-control"
|
|
145
|
+
type="number"
|
|
146
|
+
min={-1}
|
|
147
|
+
value={maxGroupPreparedCapacity}
|
|
148
|
+
onChange={(event) => this.setState({ maxGroupPreparedCapacity: Number(event.target.value) })}
|
|
149
|
+
/>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
<div className="form-group">
|
|
153
|
+
<label className="col-sm-4 control-label">Instance State</label>
|
|
154
|
+
<div className="col-sm-6">
|
|
155
|
+
<select
|
|
156
|
+
className="form-control"
|
|
157
|
+
value={poolState}
|
|
158
|
+
onChange={(event) => this.setState({ poolState: event.target.value })}
|
|
159
|
+
>
|
|
160
|
+
{WarmPoolService.poolStates().map((state) => (
|
|
161
|
+
<option key={state} value={state}>
|
|
162
|
+
{state}
|
|
163
|
+
</option>
|
|
164
|
+
))}
|
|
165
|
+
</select>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
<div className="form-group">
|
|
169
|
+
<div className="col-sm-offset-2 col-sm-10">
|
|
170
|
+
<div className="checkbox">
|
|
171
|
+
<label>
|
|
172
|
+
<input
|
|
173
|
+
checked={reuseOnScaleIn}
|
|
174
|
+
onChange={(event) => this.setState({ reuseOnScaleIn: event.target.checked })}
|
|
175
|
+
type="checkbox"
|
|
176
|
+
/>{' '}
|
|
177
|
+
Reuse instances on scale in
|
|
178
|
+
<HelpField content="If enabled, instances terminated by scale-in are returned to the warm pool instead of being terminated." />
|
|
179
|
+
</label>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</>
|
|
184
|
+
)}
|
|
185
|
+
<TaskReason reason={this.state.reason} onChange={(reason) => this.setState({ reason })} />
|
|
186
|
+
</Modal.Body>
|
|
187
|
+
<AwsModalFooter account={serverGroup.account} isValid={true} onCancel={dismissModal} onSubmit={this.submit} />
|
|
188
|
+
</>
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { WarmPoolService } from './WarmPoolService';
|
|
2
|
+
import type { IAmazonServerGroup } from '../../../domain';
|
|
3
|
+
|
|
4
|
+
describe('WarmPoolService', () => {
|
|
5
|
+
describe('getWarmPoolConfiguration', () => {
|
|
6
|
+
it('returns undefined if no asg or warmPoolConfiguration present on server group', () => {
|
|
7
|
+
expect(WarmPoolService.getWarmPoolConfiguration({} as IAmazonServerGroup)).toBeUndefined();
|
|
8
|
+
expect(WarmPoolService.getWarmPoolConfiguration({ asg: {} } as IAmazonServerGroup)).toBeUndefined();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('returns the warm pool configuration when present', () => {
|
|
12
|
+
const asg = { warmPoolConfiguration: { minSize: 2, poolState: 'Stopped' } } as any;
|
|
13
|
+
expect(WarmPoolService.getWarmPoolConfiguration({ asg } as IAmazonServerGroup)).toEqual({
|
|
14
|
+
minSize: 2,
|
|
15
|
+
poolState: 'Stopped',
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
describe('isEnabled', () => {
|
|
21
|
+
it('returns false when no warm pool is configured', () => {
|
|
22
|
+
expect(WarmPoolService.isEnabled({ asg: {} } as IAmazonServerGroup)).toBe(false);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('returns true when a warm pool is configured', () => {
|
|
26
|
+
const asg = { warmPoolConfiguration: { minSize: 1 } } as any;
|
|
27
|
+
expect(WarmPoolService.isEnabled({ asg } as IAmazonServerGroup)).toBe(true);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IAmazonServerGroup, IAmazonWarmPoolConfiguration } from '../../../domain';
|
|
2
|
+
|
|
3
|
+
export class WarmPoolService {
|
|
4
|
+
public static getWarmPoolConfiguration(serverGroup: IAmazonServerGroup): IAmazonWarmPoolConfiguration | undefined {
|
|
5
|
+
return serverGroup.asg?.warmPoolConfiguration;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
public static isEnabled(serverGroup: IAmazonServerGroup): boolean {
|
|
9
|
+
return !!WarmPoolService.getWarmPoolConfiguration(serverGroup);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public static poolStates(): Array<IAmazonWarmPoolConfiguration['poolState']> {
|
|
13
|
+
return ['Stopped', 'Running', 'Hibernated'];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { module } from 'angular';
|
|
2
|
-
|
|
3
1
|
import type { IVpc } from '@spinnaker/core';
|
|
4
2
|
|
|
5
3
|
import type { IAmazonServerGroupCommand, IAmazonServerGroupDeployConfiguration } from './configure';
|
|
@@ -70,7 +68,7 @@ export class AwsServerGroupTransformer {
|
|
|
70
68
|
return view;
|
|
71
69
|
}
|
|
72
70
|
|
|
73
|
-
public normalizeServerGroup(serverGroup: IAmazonServerGroup):
|
|
71
|
+
public normalizeServerGroup(serverGroup: IAmazonServerGroup): Promise<IAmazonServerGroup> {
|
|
74
72
|
serverGroup.instances.forEach((instance) => {
|
|
75
73
|
instance.vpcId = serverGroup.vpcId;
|
|
76
74
|
});
|
|
@@ -155,6 +153,3 @@ export class AwsServerGroupTransformer {
|
|
|
155
153
|
};
|
|
156
154
|
}
|
|
157
155
|
}
|
|
158
|
-
|
|
159
|
-
export const AWS_SERVER_GROUP_TRANSFORMER = 'spinnaker.amazon.serverGroup.transformer';
|
|
160
|
-
module(AWS_SERVER_GROUP_TRANSFORMER, []).service('awsServerGroupTransformer', AwsServerGroupTransformer);
|
package/src/vpc/VpcReader.ts
CHANGED
|
@@ -2,9 +2,9 @@ import type { IVpc } from '@spinnaker/core';
|
|
|
2
2
|
import { NetworkReader } from '@spinnaker/core';
|
|
3
3
|
|
|
4
4
|
export class VpcReader {
|
|
5
|
-
private static cache:
|
|
5
|
+
private static cache: Promise<IVpc[]>;
|
|
6
6
|
|
|
7
|
-
public static listVpcs():
|
|
7
|
+
public static listVpcs(): Promise<IVpc[]> {
|
|
8
8
|
if (this.cache) {
|
|
9
9
|
return this.cache;
|
|
10
10
|
}
|
package/src/vpc/index.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const COMMON_MODULE = "spinnaker.amazon.common";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AWS_FOOTER_COMPONENT = "spinnaker.amazon.footer";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AWS_FUNCTION_MODULE = "spinnaker.amazon.function";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AMAZON_INSTANCE_INFORMATION_COMPONENT = "spinnaker.application.amazonInstanceInformation.component";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const INSTANCE_DNS_COMPONENT = "spinnaker.application.instanceDns.component";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const INSTANCE_SECURITY_GROUPS_COMPONENT = "spinnaker.application.instanceSecurityGroups.component";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const INSTANCE_STATUS_COMPONENT = "spinnaker.application.instanceStatus.component";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const INSTANCE_TAGS_COMPONENT = "spinnaker.application.instanceTags.component";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const LOAD_BALANCER_ACTIONS = "spinnaker.amazon.loadBalancer.details.loadBalancerActions.component";
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { StateService } from '@uirouter/angularjs';
|
|
2
|
-
import type { IController, IQService, IScope } from 'angular';
|
|
3
|
-
import type { Application, ISecurityGroup, ISubnet, LoadBalancerReader, SecurityGroupReader } from '@spinnaker/core';
|
|
4
|
-
import type { IAmazonLoadBalancer, IListenerAction, ITargetGroup } from '../../domain';
|
|
5
|
-
export interface ILoadBalancerFromStateParams {
|
|
6
|
-
accountId: string;
|
|
7
|
-
region: string;
|
|
8
|
-
name: string;
|
|
9
|
-
}
|
|
10
|
-
export interface IActionDetails extends IListenerAction {
|
|
11
|
-
targetGroup: ITargetGroup;
|
|
12
|
-
}
|
|
13
|
-
export declare class AwsLoadBalancerDetailsController implements IController {
|
|
14
|
-
private $scope;
|
|
15
|
-
private $state;
|
|
16
|
-
private $q;
|
|
17
|
-
private app;
|
|
18
|
-
private securityGroupReader;
|
|
19
|
-
private loadBalancerReader;
|
|
20
|
-
application: Application;
|
|
21
|
-
elbProtocol: string;
|
|
22
|
-
listeners: Array<{
|
|
23
|
-
in: string;
|
|
24
|
-
actions: IActionDetails[];
|
|
25
|
-
}>;
|
|
26
|
-
loadBalancerFromParams: ILoadBalancerFromStateParams;
|
|
27
|
-
loadBalancer: IAmazonLoadBalancer;
|
|
28
|
-
securityGroups: ISecurityGroup[];
|
|
29
|
-
ipAddressTypeDescription: string;
|
|
30
|
-
state: {
|
|
31
|
-
loading: boolean;
|
|
32
|
-
};
|
|
33
|
-
firewallsLabel: string;
|
|
34
|
-
oidcConfigPath: any;
|
|
35
|
-
static $inject: string[];
|
|
36
|
-
constructor($scope: IScope, $state: StateService, $q: IQService, loadBalancer: ILoadBalancerFromStateParams, app: Application, securityGroupReader: SecurityGroupReader, loadBalancerReader: LoadBalancerReader);
|
|
37
|
-
autoClose(): void;
|
|
38
|
-
extractLoadBalancer(): PromiseLike<void>;
|
|
39
|
-
getFirstSubnetPurpose(subnetDetailsList?: ISubnet[]): string;
|
|
40
|
-
}
|
|
41
|
-
export declare const AWS_LOAD_BALANCER_DETAILS_CTRL = "spinnaker.amazon.loadBalancer.details.controller";
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { StateService } from '@uirouter/angularjs';
|
|
2
|
-
import type { IController, IQService, IScope } from 'angular';
|
|
3
|
-
import type { Application } from '@spinnaker/core';
|
|
4
|
-
import type { IAmazonApplicationLoadBalancer, ITargetGroup } from '../../domain/IAmazonLoadBalancer';
|
|
5
|
-
export interface ITargetGroupFromStateParams {
|
|
6
|
-
accountId: string;
|
|
7
|
-
region: string;
|
|
8
|
-
name: string;
|
|
9
|
-
loadBalancerName: string;
|
|
10
|
-
vpcId: string;
|
|
11
|
-
}
|
|
12
|
-
export declare class AwsTargetGroupDetailsController implements IController {
|
|
13
|
-
private $scope;
|
|
14
|
-
private $q;
|
|
15
|
-
private $state;
|
|
16
|
-
private app;
|
|
17
|
-
private targetGroupFromParams;
|
|
18
|
-
application: Application;
|
|
19
|
-
state: {
|
|
20
|
-
loading: boolean;
|
|
21
|
-
};
|
|
22
|
-
elbProtocol: string;
|
|
23
|
-
targetGroup: ITargetGroup;
|
|
24
|
-
loadBalancer: IAmazonApplicationLoadBalancer;
|
|
25
|
-
static $inject: string[];
|
|
26
|
-
constructor($scope: IScope, $q: IQService, $state: StateService, targetGroup: ITargetGroupFromStateParams, app: Application);
|
|
27
|
-
autoClose(): void;
|
|
28
|
-
extractTargetGroup(): PromiseLike<void>;
|
|
29
|
-
}
|
|
30
|
-
export declare const AWS_TARGET_GROUP_DETAILS_CTRL = "spinnaker.amazon.loadBalancer.details.targetGroupDetails.controller";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AWS_LOAD_BALANCER_MODULE = "spinnaker.amazon.loadBalancer";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TARGET_GROUP_STATES = "spinnaker.amazon.loadBalancer.targetGroup.states";
|
package/dist/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const CLOUDFORMATION_TEMPLATE_ENTRY = "spinnaker.amazon.cloudformation.entry.component";
|