@spinnaker/titus 0.0.0-main-2

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.
Files changed (185) hide show
  1. package/CHANGELOG.md +2661 -0
  2. package/LICENSE.txt +203 -0
  3. package/dist/domain/IJobDisruptionBudget.d.ts +35 -0
  4. package/dist/domain/ITitusCredentials.d.ts +5 -0
  5. package/dist/domain/ITitusInstance.d.ts +28 -0
  6. package/dist/domain/ITitusScalingPolicy.d.ts +4 -0
  7. package/dist/domain/ITitusServerGroup.d.ts +52 -0
  8. package/dist/domain/ITitusServiceJobProcesses.d.ts +3 -0
  9. package/dist/domain/index.d.ts +5 -0
  10. package/dist/help/titus.help.d.ts +1 -0
  11. package/dist/index.d.ts +6 -0
  12. package/dist/index.js +12828 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/instance/details/TitusInstanceDetails.d.ts +25 -0
  15. package/dist/instance/details/TitusInstanceDns.d.ts +8 -0
  16. package/dist/instance/details/TitusInstanceInformation.d.ts +7 -0
  17. package/dist/instance/details/index.d.ts +4 -0
  18. package/dist/instance/details/titusInstanceDetailsUtils.d.ts +14 -0
  19. package/dist/pipeline/stages/cloneServerGroup/cloneServerGroupExecutionDetails.controller.d.ts +2 -0
  20. package/dist/pipeline/stages/cloneServerGroup/titusCloneServerGroupStage.d.ts +2 -0
  21. package/dist/pipeline/stages/destroyAsg/titusDestroyAsgStage.d.ts +2 -0
  22. package/dist/pipeline/stages/disableAsg/titusDisableAsgStage.d.ts +2 -0
  23. package/dist/pipeline/stages/disableCluster/titusDisableClusterStage.d.ts +2 -0
  24. package/dist/pipeline/stages/enableAsg/titusEnableAsgStage.d.ts +2 -0
  25. package/dist/pipeline/stages/findAmi/titusFindAmiStage.d.ts +2 -0
  26. package/dist/pipeline/stages/resizeAsg/titusResizeAsgStage.d.ts +2 -0
  27. package/dist/pipeline/stages/runJob/RunJobExecutionDetails.d.ts +16 -0
  28. package/dist/pipeline/stages/runJob/TitusRunJobStageConfig.d.ts +25 -0
  29. package/dist/pipeline/stages/runJob/TitusSecurityGroupPicker.d.ts +34 -0
  30. package/dist/pipeline/stages/runJob/titusRunJobStage.d.ts +1 -0
  31. package/dist/pipeline/stages/scaleDownCluster/titusScaleDownClusterStage.d.ts +2 -0
  32. package/dist/pipeline/stages/shrinkCluster/titusShrinkClusterStage.d.ts +2 -0
  33. package/dist/reactShims/index.d.ts +1 -0
  34. package/dist/reactShims/titus.react.injector.d.ts +11 -0
  35. package/dist/reactShims/titus.react.module.d.ts +1 -0
  36. package/dist/securityGroup/securityGroup.read.service.d.ts +2 -0
  37. package/dist/serverGroup/configure/ServerGroupCommandBuilder.d.ts +2 -0
  38. package/dist/serverGroup/configure/serverGroup.configure.titus.module.d.ts +2 -0
  39. package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +89 -0
  40. package/dist/serverGroup/configure/wizard/TitusCloneServerGroupModal.d.ts +31 -0
  41. package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +28 -0
  42. package/dist/serverGroup/configure/wizard/pages/ServerGroupParameters.d.ts +15 -0
  43. package/dist/serverGroup/configure/wizard/pages/ServerGroupResources.d.ts +11 -0
  44. package/dist/serverGroup/configure/wizard/pages/TitusMapLayout.d.ts +4 -0
  45. package/dist/serverGroup/configure/wizard/pages/disruptionBudget/JobDisruptionBudget.d.ts +40 -0
  46. package/dist/serverGroup/configure/wizard/pages/disruptionBudget/PolicyOptions.d.ts +2 -0
  47. package/dist/serverGroup/configure/wizard/pages/disruptionBudget/RateOptions.d.ts +2 -0
  48. package/dist/serverGroup/configure/wizard/pages/disruptionBudget/WindowPicker.d.ts +23 -0
  49. package/dist/serverGroup/configure/wizard/pages/index.d.ts +4 -0
  50. package/dist/serverGroup/details/TitusCapacityDetailsSection.d.ts +11 -0
  51. package/dist/serverGroup/details/TitusLaunchConfigSection.d.ts +9 -0
  52. package/dist/serverGroup/details/TitusPackageDetailsSection.d.ts +6 -0
  53. package/dist/serverGroup/details/TitusSecurityGroups.d.ts +17 -0
  54. package/dist/serverGroup/details/capacityDetailsSection.component.d.ts +1 -0
  55. package/dist/serverGroup/details/disruptionBudget/DisruptionBudgetSection.d.ts +19 -0
  56. package/dist/serverGroup/details/disruptionBudget/EditDisruptionBudgetModal.d.ts +14 -0
  57. package/dist/serverGroup/details/index.d.ts +5 -0
  58. package/dist/serverGroup/details/launchConfigSection.component.d.ts +1 -0
  59. package/dist/serverGroup/details/resize/TitusResizeServerGroupModal.d.ts +8 -0
  60. package/dist/serverGroup/details/resize/useTaskMonitor.d.ts +25 -0
  61. package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +2 -0
  62. package/dist/serverGroup/details/scalingActivity/TitusScalingActivitiesModal.d.ts +7 -0
  63. package/dist/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.d.ts +21 -0
  64. package/dist/serverGroup/details/scalingPolicy/TitusCustomScalingPolicy.d.ts +7 -0
  65. package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +1 -0
  66. package/dist/serverGroup/details/scalingPolicy/index.d.ts +3 -0
  67. package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +1 -0
  68. package/dist/serverGroup/details/scalingPolicy/targetTracking/TitusTargetTrackingChart.d.ts +9 -0
  69. package/dist/serverGroup/details/scalingPolicy/targetTracking/UpsertTargetTrackingModal.d.ts +10 -0
  70. package/dist/serverGroup/details/scalingPolicy/titusCustomScalingPolicy.component.d.ts +1 -0
  71. package/dist/serverGroup/details/scalingPolicy/upsert/TitusScalingPolicyCommandBuilderService.d.ts +10 -0
  72. package/dist/serverGroup/details/scalingPolicy/upsert/UpsertScalingPolicyModal.d.ts +10 -0
  73. package/dist/serverGroup/details/sections/ITitusServerGroupDetailsSectionProps.d.ts +5 -0
  74. package/dist/serverGroup/details/serverGroupDetails.titus.controller.d.ts +2 -0
  75. package/dist/serverGroup/details/serviceJobProcesses/ServiceJobProcesses.d.ts +3 -0
  76. package/dist/serverGroup/details/serviceJobProcesses/ServiceJobProcessesSection.d.ts +7 -0
  77. package/dist/serverGroup/details/titusPackageDetailsSection.component.d.ts +1 -0
  78. package/dist/serverGroup/details/titusSecurityGroups.component.d.ts +1 -0
  79. package/dist/serverGroup/serverGroup.transformer.d.ts +2 -0
  80. package/dist/titus.module.d.ts +5 -0
  81. package/dist/titus.settings.d.ts +14 -0
  82. package/dist/validation/ApplicationNameValidator.d.ts +1 -0
  83. package/package.json +52 -0
  84. package/src/domain/IJobDisruptionBudget.ts +19 -0
  85. package/src/domain/ITitusCredentials.ts +6 -0
  86. package/src/domain/ITitusInstance.ts +30 -0
  87. package/src/domain/ITitusScalingPolicy.ts +5 -0
  88. package/src/domain/ITitusServerGroup.ts +56 -0
  89. package/src/domain/ITitusServiceJobProcesses.ts +3 -0
  90. package/src/domain/index.ts +5 -0
  91. package/src/help/titus.help.ts +99 -0
  92. package/src/index.ts +6 -0
  93. package/src/instance/details/TitusInstanceDetails.tsx +234 -0
  94. package/src/instance/details/TitusInstanceDns.tsx +40 -0
  95. package/src/instance/details/TitusInstanceInformation.tsx +42 -0
  96. package/src/instance/details/index.ts +4 -0
  97. package/src/instance/details/titusInstanceDetailsUtils.spec.ts +124 -0
  98. package/src/instance/details/titusInstanceDetailsUtils.ts +181 -0
  99. package/src/logo/titus.logo.less +5 -0
  100. package/src/logo/titus.logo.png +0 -0
  101. package/src/logo/titus.logo.svg +7 -0
  102. package/src/pipeline/stages/cloneServerGroup/cloneServerGroupExecutionDetails.controller.js +66 -0
  103. package/src/pipeline/stages/cloneServerGroup/cloneServerGroupExecutionDetails.html +46 -0
  104. package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +106 -0
  105. package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +1 -0
  106. package/src/pipeline/stages/cloneServerGroup/titusCloneServerGroupStage.js +104 -0
  107. package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +9 -0
  108. package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +1 -0
  109. package/src/pipeline/stages/destroyAsg/titusDestroyAsgStage.js +65 -0
  110. package/src/pipeline/stages/disableAsg/disableAsgStage.html +11 -0
  111. package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +1 -0
  112. package/src/pipeline/stages/disableAsg/titusDisableAsgStage.js +69 -0
  113. package/src/pipeline/stages/disableCluster/disableClusterStage.html +26 -0
  114. package/src/pipeline/stages/disableCluster/titusDisableClusterStage.js +85 -0
  115. package/src/pipeline/stages/enableAsg/enableAsgStage.html +11 -0
  116. package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +1 -0
  117. package/src/pipeline/stages/enableAsg/titusEnableAsgStage.js +73 -0
  118. package/src/pipeline/stages/findAmi/findAmiStage.html +24 -0
  119. package/src/pipeline/stages/findAmi/titusFindAmiStage.js +79 -0
  120. package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +99 -0
  121. package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +1 -0
  122. package/src/pipeline/stages/resizeAsg/titusResizeAsgStage.js +125 -0
  123. package/src/pipeline/stages/runJob/RunJobExecutionDetails.tsx +165 -0
  124. package/src/pipeline/stages/runJob/TitusRunJobStageConfig.tsx +466 -0
  125. package/src/pipeline/stages/runJob/TitusSecurityGroupPicker.tsx +170 -0
  126. package/src/pipeline/stages/runJob/titusRunJobStage.ts +30 -0
  127. package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +35 -0
  128. package/src/pipeline/stages/scaleDownCluster/titusScaleDownClusterStage.js +79 -0
  129. package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +34 -0
  130. package/src/pipeline/stages/shrinkCluster/titusShrinkClusterStage.js +73 -0
  131. package/src/reactShims/index.ts +1 -0
  132. package/src/reactShims/titus.react.injector.ts +17 -0
  133. package/src/reactShims/titus.react.module.ts +10 -0
  134. package/src/securityGroup/securityGroup.read.service.js +15 -0
  135. package/src/serverGroup/configure/ServerGroupCommandBuilder.js +247 -0
  136. package/src/serverGroup/configure/serverGroup.configure.titus.module.js +9 -0
  137. package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +63 -0
  138. package/src/serverGroup/configure/serverGroupConfiguration.service.ts +410 -0
  139. package/src/serverGroup/configure/wizard/TitusCloneServerGroupModal.tsx +293 -0
  140. package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +339 -0
  141. package/src/serverGroup/configure/wizard/pages/ServerGroupParameters.less +5 -0
  142. package/src/serverGroup/configure/wizard/pages/ServerGroupParameters.tsx +217 -0
  143. package/src/serverGroup/configure/wizard/pages/ServerGroupResources.tsx +200 -0
  144. package/src/serverGroup/configure/wizard/pages/TitusMapLayout.less +3 -0
  145. package/src/serverGroup/configure/wizard/pages/TitusMapLayout.tsx +29 -0
  146. package/src/serverGroup/configure/wizard/pages/disruptionBudget/JobDisruptionBudget.tsx +285 -0
  147. package/src/serverGroup/configure/wizard/pages/disruptionBudget/PolicyOptions.tsx +112 -0
  148. package/src/serverGroup/configure/wizard/pages/disruptionBudget/RateOptions.tsx +89 -0
  149. package/src/serverGroup/configure/wizard/pages/disruptionBudget/WindowPicker.tsx +202 -0
  150. package/src/serverGroup/configure/wizard/pages/index.ts +4 -0
  151. package/src/serverGroup/details/TitusCapacityDetailsSection.tsx +66 -0
  152. package/src/serverGroup/details/TitusLaunchConfigSection.tsx +35 -0
  153. package/src/serverGroup/details/TitusPackageDetailsSection.tsx +40 -0
  154. package/src/serverGroup/details/TitusSecurityGroups.tsx +107 -0
  155. package/src/serverGroup/details/capacityDetailsSection.component.ts +12 -0
  156. package/src/serverGroup/details/disruptionBudget/DisruptionBudgetSection.tsx +226 -0
  157. package/src/serverGroup/details/disruptionBudget/EditDisruptionBudgetModal.tsx +92 -0
  158. package/src/serverGroup/details/index.ts +5 -0
  159. package/src/serverGroup/details/launchConfigSection.component.ts +12 -0
  160. package/src/serverGroup/details/resize/TitusResizeServerGroupModal.tsx +302 -0
  161. package/src/serverGroup/details/resize/useTaskMonitor.ts +30 -0
  162. package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +149 -0
  163. package/src/serverGroup/details/rollback/rollbackServerGroup.html +133 -0
  164. package/src/serverGroup/details/scalingActivity/TitusScalingActivitiesModal.tsx +81 -0
  165. package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +102 -0
  166. package/src/serverGroup/details/scalingPolicy/TitusCustomScalingPolicy.tsx +13 -0
  167. package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +15 -0
  168. package/src/serverGroup/details/scalingPolicy/index.js +3 -0
  169. package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +7 -0
  170. package/src/serverGroup/details/scalingPolicy/targetTracking/TitusTargetTrackingChart.tsx +57 -0
  171. package/src/serverGroup/details/scalingPolicy/targetTracking/UpsertTargetTrackingModal.tsx +82 -0
  172. package/src/serverGroup/details/scalingPolicy/titusCustomScalingPolicy.component.ts +17 -0
  173. package/src/serverGroup/details/scalingPolicy/upsert/TitusScalingPolicyCommandBuilderService.ts +115 -0
  174. package/src/serverGroup/details/scalingPolicy/upsert/UpsertScalingPolicyModal.tsx +157 -0
  175. package/src/serverGroup/details/sections/ITitusServerGroupDetailsSectionProps.ts +6 -0
  176. package/src/serverGroup/details/serverGroupDetails.html +191 -0
  177. package/src/serverGroup/details/serverGroupDetails.titus.controller.js +457 -0
  178. package/src/serverGroup/details/serviceJobProcesses/ServiceJobProcesses.ts +12 -0
  179. package/src/serverGroup/details/serviceJobProcesses/ServiceJobProcessesSection.tsx +136 -0
  180. package/src/serverGroup/details/titusPackageDetailsSection.component.ts +12 -0
  181. package/src/serverGroup/details/titusSecurityGroups.component.ts +12 -0
  182. package/src/serverGroup/serverGroup.transformer.js +90 -0
  183. package/src/titus.module.ts +95 -0
  184. package/src/titus.settings.ts +22 -0
  185. 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());