@spinnaker/titus 0.0.0-2025.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2661 -0
- package/LICENSE.txt +203 -0
- package/dist/domain/IJobDisruptionBudget.d.ts +35 -0
- package/dist/domain/ITitusCredentials.d.ts +5 -0
- package/dist/domain/ITitusInstance.d.ts +28 -0
- package/dist/domain/ITitusScalingPolicy.d.ts +4 -0
- package/dist/domain/ITitusServerGroup.d.ts +52 -0
- package/dist/domain/ITitusServiceJobProcesses.d.ts +3 -0
- package/dist/domain/index.d.ts +5 -0
- package/dist/help/titus.help.d.ts +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +12828 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/details/TitusInstanceDetails.d.ts +25 -0
- package/dist/instance/details/TitusInstanceDns.d.ts +8 -0
- package/dist/instance/details/TitusInstanceInformation.d.ts +7 -0
- package/dist/instance/details/index.d.ts +4 -0
- package/dist/instance/details/titusInstanceDetailsUtils.d.ts +14 -0
- package/dist/pipeline/stages/cloneServerGroup/cloneServerGroupExecutionDetails.controller.d.ts +2 -0
- package/dist/pipeline/stages/cloneServerGroup/titusCloneServerGroupStage.d.ts +2 -0
- package/dist/pipeline/stages/destroyAsg/titusDestroyAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/disableAsg/titusDisableAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/disableCluster/titusDisableClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/enableAsg/titusEnableAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/findAmi/titusFindAmiStage.d.ts +2 -0
- package/dist/pipeline/stages/resizeAsg/titusResizeAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/runJob/RunJobExecutionDetails.d.ts +16 -0
- package/dist/pipeline/stages/runJob/TitusRunJobStageConfig.d.ts +25 -0
- package/dist/pipeline/stages/runJob/TitusSecurityGroupPicker.d.ts +34 -0
- package/dist/pipeline/stages/runJob/titusRunJobStage.d.ts +1 -0
- package/dist/pipeline/stages/scaleDownCluster/titusScaleDownClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/shrinkCluster/titusShrinkClusterStage.d.ts +2 -0
- package/dist/reactShims/index.d.ts +1 -0
- package/dist/reactShims/titus.react.injector.d.ts +11 -0
- package/dist/reactShims/titus.react.module.d.ts +1 -0
- package/dist/securityGroup/securityGroup.read.service.d.ts +2 -0
- package/dist/serverGroup/configure/ServerGroupCommandBuilder.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroup.configure.titus.module.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +89 -0
- package/dist/serverGroup/configure/wizard/TitusCloneServerGroupModal.d.ts +31 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +28 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupParameters.d.ts +15 -0
- package/dist/serverGroup/configure/wizard/pages/ServerGroupResources.d.ts +11 -0
- package/dist/serverGroup/configure/wizard/pages/TitusMapLayout.d.ts +4 -0
- package/dist/serverGroup/configure/wizard/pages/disruptionBudget/JobDisruptionBudget.d.ts +40 -0
- package/dist/serverGroup/configure/wizard/pages/disruptionBudget/PolicyOptions.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/pages/disruptionBudget/RateOptions.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/pages/disruptionBudget/WindowPicker.d.ts +23 -0
- package/dist/serverGroup/configure/wizard/pages/index.d.ts +4 -0
- package/dist/serverGroup/details/TitusCapacityDetailsSection.d.ts +11 -0
- package/dist/serverGroup/details/TitusLaunchConfigSection.d.ts +9 -0
- package/dist/serverGroup/details/TitusPackageDetailsSection.d.ts +6 -0
- package/dist/serverGroup/details/TitusSecurityGroups.d.ts +17 -0
- package/dist/serverGroup/details/capacityDetailsSection.component.d.ts +1 -0
- package/dist/serverGroup/details/disruptionBudget/DisruptionBudgetSection.d.ts +19 -0
- package/dist/serverGroup/details/disruptionBudget/EditDisruptionBudgetModal.d.ts +14 -0
- package/dist/serverGroup/details/index.d.ts +5 -0
- package/dist/serverGroup/details/launchConfigSection.component.d.ts +1 -0
- package/dist/serverGroup/details/resize/TitusResizeServerGroupModal.d.ts +8 -0
- package/dist/serverGroup/details/resize/useTaskMonitor.d.ts +25 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/scalingActivity/TitusScalingActivitiesModal.d.ts +7 -0
- package/dist/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.d.ts +21 -0
- package/dist/serverGroup/details/scalingPolicy/TitusCustomScalingPolicy.d.ts +7 -0
- package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/index.d.ts +3 -0
- package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TitusTargetTrackingChart.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/targetTracking/UpsertTargetTrackingModal.d.ts +10 -0
- package/dist/serverGroup/details/scalingPolicy/titusCustomScalingPolicy.component.d.ts +1 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/TitusScalingPolicyCommandBuilderService.d.ts +10 -0
- package/dist/serverGroup/details/scalingPolicy/upsert/UpsertScalingPolicyModal.d.ts +10 -0
- package/dist/serverGroup/details/sections/ITitusServerGroupDetailsSectionProps.d.ts +5 -0
- package/dist/serverGroup/details/serverGroupDetails.titus.controller.d.ts +2 -0
- package/dist/serverGroup/details/serviceJobProcesses/ServiceJobProcesses.d.ts +3 -0
- package/dist/serverGroup/details/serviceJobProcesses/ServiceJobProcessesSection.d.ts +7 -0
- package/dist/serverGroup/details/titusPackageDetailsSection.component.d.ts +1 -0
- package/dist/serverGroup/details/titusSecurityGroups.component.d.ts +1 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +2 -0
- package/dist/titus.module.d.ts +5 -0
- package/dist/titus.settings.d.ts +14 -0
- package/dist/validation/ApplicationNameValidator.d.ts +1 -0
- package/package.json +52 -0
- package/src/domain/IJobDisruptionBudget.ts +19 -0
- package/src/domain/ITitusCredentials.ts +6 -0
- package/src/domain/ITitusInstance.ts +30 -0
- package/src/domain/ITitusScalingPolicy.ts +5 -0
- package/src/domain/ITitusServerGroup.ts +56 -0
- package/src/domain/ITitusServiceJobProcesses.ts +3 -0
- package/src/domain/index.ts +5 -0
- package/src/help/titus.help.ts +99 -0
- package/src/index.ts +6 -0
- package/src/instance/details/TitusInstanceDetails.tsx +234 -0
- package/src/instance/details/TitusInstanceDns.tsx +40 -0
- package/src/instance/details/TitusInstanceInformation.tsx +42 -0
- package/src/instance/details/index.ts +4 -0
- package/src/instance/details/titusInstanceDetailsUtils.spec.ts +124 -0
- package/src/instance/details/titusInstanceDetailsUtils.ts +181 -0
- package/src/logo/titus.logo.less +5 -0
- package/src/logo/titus.logo.png +0 -0
- package/src/logo/titus.logo.svg +7 -0
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupExecutionDetails.controller.js +66 -0
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupExecutionDetails.html +46 -0
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +106 -0
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +1 -0
- package/src/pipeline/stages/cloneServerGroup/titusCloneServerGroupStage.js +104 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +9 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +1 -0
- package/src/pipeline/stages/destroyAsg/titusDestroyAsgStage.js +65 -0
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +11 -0
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/disableAsg/titusDisableAsgStage.js +69 -0
- package/src/pipeline/stages/disableCluster/disableClusterStage.html +26 -0
- package/src/pipeline/stages/disableCluster/titusDisableClusterStage.js +85 -0
- package/src/pipeline/stages/enableAsg/enableAsgStage.html +11 -0
- package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/enableAsg/titusEnableAsgStage.js +73 -0
- package/src/pipeline/stages/findAmi/findAmiStage.html +24 -0
- package/src/pipeline/stages/findAmi/titusFindAmiStage.js +79 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +99 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +1 -0
- package/src/pipeline/stages/resizeAsg/titusResizeAsgStage.js +125 -0
- package/src/pipeline/stages/runJob/RunJobExecutionDetails.tsx +165 -0
- package/src/pipeline/stages/runJob/TitusRunJobStageConfig.tsx +466 -0
- package/src/pipeline/stages/runJob/TitusSecurityGroupPicker.tsx +170 -0
- package/src/pipeline/stages/runJob/titusRunJobStage.ts +30 -0
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +35 -0
- package/src/pipeline/stages/scaleDownCluster/titusScaleDownClusterStage.js +79 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +34 -0
- package/src/pipeline/stages/shrinkCluster/titusShrinkClusterStage.js +73 -0
- package/src/reactShims/index.ts +1 -0
- package/src/reactShims/titus.react.injector.ts +17 -0
- package/src/reactShims/titus.react.module.ts +10 -0
- package/src/securityGroup/securityGroup.read.service.js +15 -0
- package/src/serverGroup/configure/ServerGroupCommandBuilder.js +247 -0
- package/src/serverGroup/configure/serverGroup.configure.titus.module.js +9 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +63 -0
- package/src/serverGroup/configure/serverGroupConfiguration.service.ts +410 -0
- package/src/serverGroup/configure/wizard/TitusCloneServerGroupModal.tsx +293 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +339 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupParameters.less +5 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupParameters.tsx +217 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupResources.tsx +200 -0
- package/src/serverGroup/configure/wizard/pages/TitusMapLayout.less +3 -0
- package/src/serverGroup/configure/wizard/pages/TitusMapLayout.tsx +29 -0
- package/src/serverGroup/configure/wizard/pages/disruptionBudget/JobDisruptionBudget.tsx +285 -0
- package/src/serverGroup/configure/wizard/pages/disruptionBudget/PolicyOptions.tsx +112 -0
- package/src/serverGroup/configure/wizard/pages/disruptionBudget/RateOptions.tsx +89 -0
- package/src/serverGroup/configure/wizard/pages/disruptionBudget/WindowPicker.tsx +202 -0
- package/src/serverGroup/configure/wizard/pages/index.ts +4 -0
- package/src/serverGroup/details/TitusCapacityDetailsSection.tsx +66 -0
- package/src/serverGroup/details/TitusLaunchConfigSection.tsx +35 -0
- package/src/serverGroup/details/TitusPackageDetailsSection.tsx +40 -0
- package/src/serverGroup/details/TitusSecurityGroups.tsx +107 -0
- package/src/serverGroup/details/capacityDetailsSection.component.ts +12 -0
- package/src/serverGroup/details/disruptionBudget/DisruptionBudgetSection.tsx +226 -0
- package/src/serverGroup/details/disruptionBudget/EditDisruptionBudgetModal.tsx +92 -0
- package/src/serverGroup/details/index.ts +5 -0
- package/src/serverGroup/details/launchConfigSection.component.ts +12 -0
- package/src/serverGroup/details/resize/TitusResizeServerGroupModal.tsx +302 -0
- package/src/serverGroup/details/resize/useTaskMonitor.ts +30 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +149 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +133 -0
- package/src/serverGroup/details/scalingActivity/TitusScalingActivitiesModal.tsx +81 -0
- package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +102 -0
- package/src/serverGroup/details/scalingPolicy/TitusCustomScalingPolicy.tsx +13 -0
- package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +15 -0
- package/src/serverGroup/details/scalingPolicy/index.js +3 -0
- package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +7 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TitusTargetTrackingChart.tsx +57 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/UpsertTargetTrackingModal.tsx +82 -0
- package/src/serverGroup/details/scalingPolicy/titusCustomScalingPolicy.component.ts +17 -0
- package/src/serverGroup/details/scalingPolicy/upsert/TitusScalingPolicyCommandBuilderService.ts +115 -0
- package/src/serverGroup/details/scalingPolicy/upsert/UpsertScalingPolicyModal.tsx +157 -0
- package/src/serverGroup/details/sections/ITitusServerGroupDetailsSectionProps.ts +6 -0
- package/src/serverGroup/details/serverGroupDetails.html +191 -0
- package/src/serverGroup/details/serverGroupDetails.titus.controller.js +457 -0
- package/src/serverGroup/details/serviceJobProcesses/ServiceJobProcesses.ts +12 -0
- package/src/serverGroup/details/serviceJobProcesses/ServiceJobProcessesSection.tsx +136 -0
- package/src/serverGroup/details/titusPackageDetailsSection.component.ts +12 -0
- package/src/serverGroup/details/titusSecurityGroups.component.ts +12 -0
- package/src/serverGroup/serverGroup.transformer.js +90 -0
- package/src/titus.module.ts +95 -0
- package/src/titus.settings.ts +22 -0
- package/src/validation/ApplicationNameValidator.ts +43 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
import _ from 'lodash';
|
|
5
|
+
|
|
6
|
+
import { AccountService } from '@spinnaker/core';
|
|
7
|
+
|
|
8
|
+
export const TITUS_SERVERGROUP_SERVERGROUP_TRANSFORMER = 'spinnaker.titus.serverGroup.transformer';
|
|
9
|
+
export const name = TITUS_SERVERGROUP_SERVERGROUP_TRANSFORMER; // for backwards compatibility
|
|
10
|
+
module(TITUS_SERVERGROUP_SERVERGROUP_TRANSFORMER, []).factory('titusServerGroupTransformer', [
|
|
11
|
+
'$q',
|
|
12
|
+
function ($q) {
|
|
13
|
+
function normalizeServerGroup(serverGroup) {
|
|
14
|
+
return AccountService.getCredentialsKeyedByAccount('titus').then((credentialsKeyedByAccount) => {
|
|
15
|
+
if (serverGroup.account && credentialsKeyedByAccount[serverGroup.account]) {
|
|
16
|
+
serverGroup.awsAccount = credentialsKeyedByAccount[serverGroup.account].awsAccount;
|
|
17
|
+
}
|
|
18
|
+
return serverGroup;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function convertServerGroupCommandToDeployConfiguration(base) {
|
|
23
|
+
// use _.defaults to avoid copying the backingData, which is huge and expensive to copy over
|
|
24
|
+
const command = _.defaults({ backingData: [], viewState: [] }, base);
|
|
25
|
+
if (base.viewState.mode !== 'clone') {
|
|
26
|
+
delete command.source;
|
|
27
|
+
}
|
|
28
|
+
command.account = command.credentials;
|
|
29
|
+
|
|
30
|
+
if (!command.efs.mountPoint || !command.efs.efsId || !command.efs.mountPerm) {
|
|
31
|
+
delete command.efs;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
delete command.viewState;
|
|
35
|
+
delete command.backingData;
|
|
36
|
+
delete command.selectedProvider;
|
|
37
|
+
return command;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function constructNewStepScalingPolicyTemplate(serverGroup) {
|
|
41
|
+
return {
|
|
42
|
+
alarms: [
|
|
43
|
+
{
|
|
44
|
+
namespace: 'NFLX/EPIC',
|
|
45
|
+
metricName: '',
|
|
46
|
+
threshold: 50,
|
|
47
|
+
statistic: 'Average',
|
|
48
|
+
comparisonOperator: 'GreaterThanThreshold',
|
|
49
|
+
evaluationPeriods: 1,
|
|
50
|
+
disableEditingDimensions: true,
|
|
51
|
+
dimensions: [{ name: 'AutoScalingGroupName', value: serverGroup.name }],
|
|
52
|
+
period: 60,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
adjustmentType: 'ChangeInCapacity',
|
|
56
|
+
stepAdjustments: [
|
|
57
|
+
{
|
|
58
|
+
scalingAdjustment: 1,
|
|
59
|
+
metricIntervalLowerBound: 0,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
cooldown: 300,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function constructNewTargetTrackingPolicyTemplate(serverGroup) {
|
|
67
|
+
return {
|
|
68
|
+
alarms: [],
|
|
69
|
+
targetTrackingConfiguration: {
|
|
70
|
+
targetValue: null,
|
|
71
|
+
disableScaleIn: false,
|
|
72
|
+
customizedMetricSpecification: {
|
|
73
|
+
namespace: 'NFLX/EPIC',
|
|
74
|
+
metricName: '',
|
|
75
|
+
dimensions: [{ name: 'AutoScalingGroupName', value: serverGroup.name }],
|
|
76
|
+
},
|
|
77
|
+
scaleInCooldown: 300,
|
|
78
|
+
scaleOutCooldown: 300,
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
convertServerGroupCommandToDeployConfiguration,
|
|
85
|
+
normalizeServerGroup,
|
|
86
|
+
constructNewStepScalingPolicyTemplate,
|
|
87
|
+
constructNewTargetTrackingPolicyTemplate,
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
]);
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { module } from 'angular';
|
|
2
|
+
|
|
3
|
+
import { AmazonLoadBalancersTag } from '@spinnaker/amazon';
|
|
4
|
+
import { CloudProviderRegistry, DeploymentStrategyRegistry } from '@spinnaker/core';
|
|
5
|
+
|
|
6
|
+
import './help/titus.help';
|
|
7
|
+
import { TitusInstanceDetails } from './instance/details/TitusInstanceDetails';
|
|
8
|
+
import titusLogo from './logo/titus.logo.png';
|
|
9
|
+
import { TITUS_PIPELINE_STAGES_CLONESERVERGROUP_TITUSCLONESERVERGROUPSTAGE } from './pipeline/stages/cloneServerGroup/titusCloneServerGroupStage';
|
|
10
|
+
import { TITUS_PIPELINE_STAGES_DESTROYASG_TITUSDESTROYASGSTAGE } from './pipeline/stages/destroyAsg/titusDestroyAsgStage';
|
|
11
|
+
import { TITUS_PIPELINE_STAGES_DISABLEASG_TITUSDISABLEASGSTAGE } from './pipeline/stages/disableAsg/titusDisableAsgStage';
|
|
12
|
+
import { TITUS_PIPELINE_STAGES_DISABLECLUSTER_TITUSDISABLECLUSTERSTAGE } from './pipeline/stages/disableCluster/titusDisableClusterStage';
|
|
13
|
+
import { TITUS_PIPELINE_STAGES_ENABLEASG_TITUSENABLEASGSTAGE } from './pipeline/stages/enableAsg/titusEnableAsgStage';
|
|
14
|
+
import { TITUS_PIPELINE_STAGES_FINDAMI_TITUSFINDAMISTAGE } from './pipeline/stages/findAmi/titusFindAmiStage';
|
|
15
|
+
import { TITUS_PIPELINE_STAGES_RESIZEASG_TITUSRESIZEASGSTAGE } from './pipeline/stages/resizeAsg/titusResizeAsgStage';
|
|
16
|
+
import './pipeline/stages/runJob/titusRunJobStage';
|
|
17
|
+
import { TITUS_PIPELINE_STAGES_SCALEDOWNCLUSTER_TITUSSCALEDOWNCLUSTERSTAGE } from './pipeline/stages/scaleDownCluster/titusScaleDownClusterStage';
|
|
18
|
+
import { TITUS_PIPELINE_STAGES_SHRINKCLUSTER_TITUSSHRINKCLUSTERSTAGE } from './pipeline/stages/shrinkCluster/titusShrinkClusterStage';
|
|
19
|
+
import { TITUS_REACT_MODULE } from './reactShims/titus.react.module';
|
|
20
|
+
import { TITUS_SECURITYGROUP_SECURITYGROUP_READ_SERVICE } from './securityGroup/securityGroup.read.service';
|
|
21
|
+
import { TITUS_SERVERGROUP_CONFIGURE_SERVERGROUPCOMMANDBUILDER } from './serverGroup/configure/ServerGroupCommandBuilder';
|
|
22
|
+
import { TITUS_SERVERGROUP_CONFIGURE_SERVERGROUP_CONFIGURE_TITUS_MODULE } from './serverGroup/configure/serverGroup.configure.titus.module';
|
|
23
|
+
import { TitusCloneServerGroupModal } from './serverGroup/configure/wizard/TitusCloneServerGroupModal';
|
|
24
|
+
import {
|
|
25
|
+
TitusTargetTrackingChart,
|
|
26
|
+
TitusUpsertScalingPolicyModal,
|
|
27
|
+
TitusUpsertTargetTrackingModal,
|
|
28
|
+
} from './serverGroup/details';
|
|
29
|
+
import { TITUS_SERVERGROUP_DETAILS_CAPACITYDETAILSSECTION } from './serverGroup/details/capacityDetailsSection.component';
|
|
30
|
+
import { TITUS_SERVERGROUP_DETAILS_LAUNCHCONFIGSECTION } from './serverGroup/details/launchConfigSection.component';
|
|
31
|
+
import { TITUS_SERVERGROUP_DETAILS_SERVERGROUPDETAILS_TITUS_CONTROLLER } from './serverGroup/details/serverGroupDetails.titus.controller';
|
|
32
|
+
import { TITUS_SERVERGROUP_SERVERGROUP_TRANSFORMER } from './serverGroup/serverGroup.transformer';
|
|
33
|
+
import './validation/ApplicationNameValidator';
|
|
34
|
+
|
|
35
|
+
import './logo/titus.logo.less';
|
|
36
|
+
|
|
37
|
+
export const TITUS_MODULE = 'spinnaker.titus';
|
|
38
|
+
module(TITUS_MODULE, [
|
|
39
|
+
TITUS_REACT_MODULE,
|
|
40
|
+
TITUS_SECURITYGROUP_SECURITYGROUP_READ_SERVICE,
|
|
41
|
+
TITUS_SERVERGROUP_DETAILS_SERVERGROUPDETAILS_TITUS_CONTROLLER,
|
|
42
|
+
TITUS_SERVERGROUP_CONFIGURE_SERVERGROUPCOMMANDBUILDER,
|
|
43
|
+
TITUS_SERVERGROUP_CONFIGURE_SERVERGROUP_CONFIGURE_TITUS_MODULE,
|
|
44
|
+
TITUS_SERVERGROUP_SERVERGROUP_TRANSFORMER,
|
|
45
|
+
TITUS_PIPELINE_STAGES_FINDAMI_TITUSFINDAMISTAGE,
|
|
46
|
+
TITUS_PIPELINE_STAGES_ENABLEASG_TITUSENABLEASGSTAGE,
|
|
47
|
+
TITUS_PIPELINE_STAGES_DISABLEASG_TITUSDISABLEASGSTAGE,
|
|
48
|
+
TITUS_PIPELINE_STAGES_DESTROYASG_TITUSDESTROYASGSTAGE,
|
|
49
|
+
TITUS_PIPELINE_STAGES_RESIZEASG_TITUSRESIZEASGSTAGE,
|
|
50
|
+
TITUS_PIPELINE_STAGES_CLONESERVERGROUP_TITUSCLONESERVERGROUPSTAGE,
|
|
51
|
+
TITUS_PIPELINE_STAGES_DISABLECLUSTER_TITUSDISABLECLUSTERSTAGE,
|
|
52
|
+
TITUS_PIPELINE_STAGES_SHRINKCLUSTER_TITUSSHRINKCLUSTERSTAGE,
|
|
53
|
+
TITUS_PIPELINE_STAGES_SCALEDOWNCLUSTER_TITUSSCALEDOWNCLUSTERSTAGE,
|
|
54
|
+
TITUS_SERVERGROUP_DETAILS_CAPACITYDETAILSSECTION,
|
|
55
|
+
TITUS_SERVERGROUP_DETAILS_LAUNCHCONFIGSECTION,
|
|
56
|
+
]).config(() => {
|
|
57
|
+
CloudProviderRegistry.registerProvider('titus', {
|
|
58
|
+
name: 'Titus',
|
|
59
|
+
logo: {
|
|
60
|
+
path: titusLogo,
|
|
61
|
+
},
|
|
62
|
+
serverGroup: {
|
|
63
|
+
transformer: 'titusServerGroupTransformer',
|
|
64
|
+
detailsTemplateUrl: require('./serverGroup/details/serverGroupDetails.html'),
|
|
65
|
+
detailsController: 'titusServerGroupDetailsCtrl',
|
|
66
|
+
CloneServerGroupModal: TitusCloneServerGroupModal,
|
|
67
|
+
commandBuilder: 'titusServerGroupCommandBuilder',
|
|
68
|
+
configurationService: 'titusServerGroupConfigurationService',
|
|
69
|
+
skipUpstreamStageCheck: true,
|
|
70
|
+
checkForImageProviders: true,
|
|
71
|
+
TargetTrackingChart: TitusTargetTrackingChart,
|
|
72
|
+
UpsertStepPolicyModal: TitusUpsertScalingPolicyModal,
|
|
73
|
+
UpsertTargetTrackingModal: TitusUpsertTargetTrackingModal,
|
|
74
|
+
},
|
|
75
|
+
securityGroup: {
|
|
76
|
+
reader: 'titusSecurityGroupReader',
|
|
77
|
+
useProvider: 'aws',
|
|
78
|
+
},
|
|
79
|
+
loadBalancer: {
|
|
80
|
+
LoadBalancersTag: AmazonLoadBalancersTag,
|
|
81
|
+
incompatibleLoadBalancerTypes: [
|
|
82
|
+
{
|
|
83
|
+
type: 'classic',
|
|
84
|
+
reason: 'Classic Load Balancers cannot be used with Titus as they do not have IP based target groups.',
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
useProvider: 'aws',
|
|
88
|
+
},
|
|
89
|
+
instance: {
|
|
90
|
+
details: TitusInstanceDetails,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
DeploymentStrategyRegistry.registerProvider('titus', ['custom', 'redblack', 'monitored']);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IProviderSettings } from '@spinnaker/core';
|
|
2
|
+
import { SETTINGS } from '@spinnaker/core';
|
|
3
|
+
|
|
4
|
+
export interface ITitusProviderSettings extends IProviderSettings {
|
|
5
|
+
defaults: {
|
|
6
|
+
account?: string;
|
|
7
|
+
region?: string;
|
|
8
|
+
subnetType?: string;
|
|
9
|
+
iamProfile?: string;
|
|
10
|
+
};
|
|
11
|
+
serverGroups?: {
|
|
12
|
+
recommendedSubnets?: string[];
|
|
13
|
+
};
|
|
14
|
+
scalingActivities?: string[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const TitusProviderSettings: ITitusProviderSettings = (SETTINGS.providers.titus as ITitusProviderSettings) || {
|
|
18
|
+
defaults: {},
|
|
19
|
+
};
|
|
20
|
+
if (TitusProviderSettings) {
|
|
21
|
+
TitusProviderSettings.resetToOriginal = SETTINGS.resetToOriginal;
|
|
22
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IApplicationNameValidator } from '@spinnaker/core';
|
|
2
|
+
import { ApplicationNameValidator, FirewallLabels } from '@spinnaker/core';
|
|
3
|
+
|
|
4
|
+
class TitusApplicationNameValidator implements IApplicationNameValidator {
|
|
5
|
+
private validateSpecialCharacters(name: string, errors: string[]): void {
|
|
6
|
+
const pattern = /^[a-zA-Z_0-9.]*$/g;
|
|
7
|
+
if (!pattern.test(name)) {
|
|
8
|
+
errors.push('Only dot(.) and underscore(_) special characters are allowed.');
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
private validateLength(name: string, warnings: string[], errors: string[]): void {
|
|
13
|
+
if (name.length > 250) {
|
|
14
|
+
errors.push('The maximum length for an application in Titus is 250 characters.');
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (name.length > 240) {
|
|
18
|
+
if (name.length >= 248) {
|
|
19
|
+
warnings.push(
|
|
20
|
+
`You will not be able to include a stack or detail field for clusters or ${FirewallLabels.get('firewalls')}.`,
|
|
21
|
+
);
|
|
22
|
+
} else {
|
|
23
|
+
const remaining = 248 - name.length;
|
|
24
|
+
warnings.push(`If you plan to include a stack or detail field for clusters, you will only
|
|
25
|
+
have ~${remaining} characters to do so.`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public validate(name = '') {
|
|
31
|
+
const warnings: string[] = [];
|
|
32
|
+
const errors: string[] = [];
|
|
33
|
+
|
|
34
|
+
if (name && name.length) {
|
|
35
|
+
this.validateSpecialCharacters(name, errors);
|
|
36
|
+
this.validateLength(name, warnings, errors);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return { warnings, errors };
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
ApplicationNameValidator.registerValidator('titus', new TitusApplicationNameValidator());
|