@spinnaker/cloudfoundry 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.
- package/CHANGELOG.md +1085 -0
- package/LICENSE.txt +203 -0
- package/dist/cf.module.d.ts +24 -0
- package/dist/cf.settings.d.ts +7 -0
- package/dist/common/applicationName.validator.d.ts +1 -0
- package/dist/deploymentStrategy/CloudFoundryDeploymentStrategySelector.d.ts +21 -0
- package/dist/deploymentStrategy/strategies/redblack/redblack.strategy.d.ts +10 -0
- package/dist/deploymentStrategy/strategies/rollingredblack/AdditionalFields.d.ts +22 -0
- package/dist/domain/ICloudFoundryAccount.d.ts +7 -0
- package/dist/domain/ICloudFoundryApplication.d.ts +4 -0
- package/dist/domain/ICloudFoundryCluster.d.ts +5 -0
- package/dist/domain/ICloudFoundryDroplet.d.ts +19 -0
- package/dist/domain/ICloudFoundryInstance.d.ts +4 -0
- package/dist/domain/ICloudFoundryLoadBalancer.d.ts +25 -0
- package/dist/domain/ICloudFoundryServerGroup.d.ts +41 -0
- package/dist/domain/ICloudFoundrySpace.d.ts +9 -0
- package/dist/domain/index.d.ts +8 -0
- package/dist/help/cloudfoundry.help.d.ts +1 -0
- package/dist/image/image.reader.cf.d.ts +4 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5929 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/details/CloudFoundryInstanceActions.d.ts +11 -0
- package/dist/instance/details/CloudFoundryInstanceDetails.d.ts +23 -0
- package/dist/instance/details/index.d.ts +1 -0
- package/dist/instance/details/sections/CloudFoundryInstanceDetailsSection.d.ts +9 -0
- package/dist/instance/details/sections/index.d.ts +1 -0
- package/dist/loadBalancer/configure/CloudFoundryMapLoadBalancerModal.d.ts +33 -0
- package/dist/loadBalancer/configure/loadBalancerDetails.d.ts +32 -0
- package/dist/loadBalancer/details/CloudFoundryLoadBalancerActions.d.ts +10 -0
- package/dist/loadBalancer/details/CloudFoundryLoadBalancerDetails.d.ts +26 -0
- package/dist/loadBalancer/details/index.d.ts +1 -0
- package/dist/loadBalancer/details/sections/CloudFoundryLoadBalancerDetailsSection.d.ts +9 -0
- package/dist/loadBalancer/details/sections/CloudFoundryLoadBalancerLinksSection.d.ts +9 -0
- package/dist/loadBalancer/details/sections/CloudFoundryLoadBalancerStatusSection.d.ts +9 -0
- package/dist/loadBalancer/details/sections/index.d.ts +3 -0
- package/dist/loadBalancer/index.d.ts +3 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +25 -0
- package/dist/pipeline/config/validation/cfTargetImpedance.validator.d.ts +9 -0
- package/dist/pipeline/config/validation/instanceSize.validator.d.ts +15 -0
- package/dist/pipeline/config/validation/requiredRoutes.validator.d.ts +4 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfig.d.ts +7 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfigForm.d.ts +13 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestDetailsTab.d.ts +6 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/bakeCloudFoundryManifestStage.d.ts +1 -0
- package/dist/pipeline/stages/cloneServerGroup/CloudFoundryCloneServerGroupStageConfig.d.ts +11 -0
- package/dist/pipeline/stages/cloneServerGroup/cloudFoundryCloneServerGroupStage.module.d.ts +1 -0
- package/dist/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsConfig.d.ts +9 -0
- package/dist/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsStageConfigForm.d.ts +26 -0
- package/dist/pipeline/stages/createServiceBindings/cloudFoundryCreateServiceBindingsStage.d.ts +1 -0
- package/dist/pipeline/stages/createServiceKey/CloudFoundryCreateServiceKeyStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/createServiceKey/cloudFoundryCreateServiceKeyStage.module.d.ts +1 -0
- package/dist/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsConfig.d.ts +10 -0
- package/dist/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsStageConfigForm.d.ts +20 -0
- package/dist/pipeline/stages/deleteServiceBindings/cloudFoundryDeleteServiceBindingsStage.d.ts +1 -0
- package/dist/pipeline/stages/deleteServiceKey/CloudFoundryDeleteServiceKeyStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/deleteServiceKey/cloudFoundryDeleteServiceKeyStage.module.d.ts +1 -0
- package/dist/pipeline/stages/deployService/CloudFoundryDeployServiceStageConfig.d.ts +24 -0
- package/dist/pipeline/stages/deployService/CreateServiceInstanceDirectInput.d.ts +29 -0
- package/dist/pipeline/stages/deployService/CreateUserProvidedInput.d.ts +19 -0
- package/dist/pipeline/stages/deployService/ICloudFoundryServiceManifestSource.d.ts +24 -0
- package/dist/pipeline/stages/deployService/ServiceTagsInput.d.ts +17 -0
- package/dist/pipeline/stages/deployService/cloudFoundryDeployServiceStage.module.d.ts +1 -0
- package/dist/pipeline/stages/destroyAsg/cloudFoundryDestroyAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfig.d.ts +5 -0
- package/dist/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfigForm.d.ts +19 -0
- package/dist/pipeline/stages/destroyService/cloudFoundryDestroyServiceStage.module.d.ts +1 -0
- package/dist/pipeline/stages/disableAsg/cloudFoundryDisableAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/enableAsg/cloudFoundryEnableAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/mapLoadBalancers/cloudFoundryMapLoadBalancersStage.module.d.ts +1 -0
- package/dist/pipeline/stages/resizeAsg/CloudFoundryResizeAsgStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/resizeAsg/cloudFoundryResizeAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/rollbackCluster/CloudFoundryRollbackClusterStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/rollbackCluster/cloudFoundryRollbackClusterStage.module.d.ts +1 -0
- package/dist/pipeline/stages/runJob/CloudFoundryRunJobStageConfig.d.ts +14 -0
- package/dist/pipeline/stages/runJob/RunJobExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/runJob/cloudFoundryRunJob.module.d.ts +1 -0
- package/dist/pipeline/stages/shareService/CloudFoundryShareServiceExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/shareService/CloudFoundryShareServiceStageConfig.d.ts +21 -0
- package/dist/pipeline/stages/shareService/cloudFoundryShareServiceStage.module.d.ts +1 -0
- package/dist/pipeline/stages/unmapLoadBalancers/cloudFoundryUnmapLoadBalancersStage.module.d.ts +1 -0
- package/dist/pipeline/stages/unshareService/CloudFoundryUnshareServiceExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/unshareService/CloudFoundryUnshareServiceStageConfig.d.ts +18 -0
- package/dist/pipeline/stages/unshareService/cloudFoundryUnshareServiceStage.module.d.ts +1 -0
- package/dist/presentation/forms/index.d.ts +2 -0
- package/dist/presentation/forms/inputs/FormikConfigField.d.ts +10 -0
- package/dist/presentation/forms/inputs/index.d.ts +1 -0
- package/dist/presentation/forms/serverGroup/Buildpacks.d.ts +8 -0
- package/dist/presentation/forms/serverGroup/EnvironmentVariables.d.ts +8 -0
- package/dist/presentation/forms/serverGroup/HealthCheck.d.ts +12 -0
- package/dist/presentation/forms/serverGroup/InstanceParameters.d.ts +12 -0
- package/dist/presentation/forms/serverGroup/Routes.d.ts +10 -0
- package/dist/presentation/forms/serverGroup/Services.d.ts +5 -0
- package/dist/presentation/forms/serverGroup/index.d.ts +6 -0
- package/dist/presentation/index.d.ts +3 -0
- package/dist/presentation/pipeline/index.d.ts +1 -0
- package/dist/presentation/pipeline/stages/CloudFoundryAsgStageConfig.d.ts +14 -0
- package/dist/presentation/pipeline/stages/CloudFoundryLoadBalancersExecutionDetails.d.ts +6 -0
- package/dist/presentation/pipeline/stages/CloudFoundryLoadBalancersStageConfig.d.ts +25 -0
- package/dist/presentation/pipeline/stages/CloudFoundryServiceExecutionDetails.d.ts +6 -0
- package/dist/presentation/pipeline/stages/CloudFoundryServiceKeyExecutionDetails.d.ts +6 -0
- package/dist/presentation/pipeline/stages/index.d.ts +5 -0
- package/dist/presentation/widgets/accountRegionClusterSelector/AccountRegionClusterSelector.d.ts +33 -0
- package/dist/presentation/widgets/accountRegionClusterSelector/FormikAccountRegionClusterSelector.d.ts +32 -0
- package/dist/presentation/widgets/accountRegionClusterSelector/index.d.ts +2 -0
- package/dist/presentation/widgets/index.d.ts +1 -0
- package/dist/presentation/widgets/recentLogs/CloudFoundryRecentLogs.d.ts +27 -0
- package/dist/routeDomains/index.d.ts +1 -0
- package/dist/routeDomains/routeDomainSelectField.d.ts +15 -0
- package/dist/serverGroup/configure/index.d.ts +4 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.cf.d.ts +12 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilderShim.service.cf.d.ts +14 -0
- package/dist/serverGroup/configure/serverGroupConfigurationModel.cf.d.ts +65 -0
- package/dist/serverGroup/configure/wizard/CreateServerGroupModal.d.ts +31 -0
- package/dist/serverGroup/configure/wizard/ServerGroupTemplateSelection.d.ts +16 -0
- package/dist/serverGroup/configure/wizard/sections/artifactSettings/ArtifactSettings.cf.d.ts +17 -0
- package/dist/serverGroup/configure/wizard/sections/artifactSettings/ConstantArtifactSettings.cf.d.ts +11 -0
- package/dist/serverGroup/configure/wizard/sections/basicSettings/BasicSettings.cf.d.ts +24 -0
- package/dist/serverGroup/configure/wizard/sections/cloneSettings/CloneSettings.cf.d.ts +21 -0
- package/dist/serverGroup/configure/wizard/sections/configurationSettings/ConfigurationSettings.cf.d.ts +22 -0
- package/dist/serverGroup/details/cfServerGroupDetailsGetter.d.ts +4 -0
- package/dist/serverGroup/details/cloudFoundryServerGroupActions.d.ts +24 -0
- package/dist/serverGroup/details/mapLoadBalancers/CloudFoundryMapLoadBalancersModal.d.ts +28 -0
- package/dist/serverGroup/details/mapLoadBalancers/CloudFoundryUnmapLoadBalancersModal.d.ts +28 -0
- package/dist/serverGroup/details/resize/CloudFoundryResizeServerGroupModal.d.ts +37 -0
- package/dist/serverGroup/details/rollback/CloudFoundryRollbackServerGroupModal.d.ts +36 -0
- package/dist/serverGroup/details/sections/ApplicationManagerSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/BoundServicesSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/BuildSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/EnvironmentVariablesSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/HealthCheckSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/ICloudFoundryServerGroupDetailsSectionProps.d.ts +5 -0
- package/dist/serverGroup/details/sections/MetricsSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/PackageSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/ServerGroupInformationSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/ServerGroupSizingSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/index.d.ts +9 -0
- package/dist/serverGroup/index.d.ts +5 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +10 -0
- package/package.json +52 -0
- package/src/cf.module.ts +85 -0
- package/src/cf.settings.ts +14 -0
- package/src/common/applicationName.validator.ts +43 -0
- package/src/common/cloudFoundry.less +16 -0
- package/src/deploymentStrategy/CloudFoundryDeploymentStrategySelector.tsx +175 -0
- package/src/deploymentStrategy/strategies/redblack/redblack.strategy.ts +11 -0
- package/src/deploymentStrategy/strategies/rollingredblack/AdditionalFields.tsx +161 -0
- package/src/domain/ICloudFoundryAccount.ts +9 -0
- package/src/domain/ICloudFoundryApplication.ts +5 -0
- package/src/domain/ICloudFoundryCluster.ts +6 -0
- package/src/domain/ICloudFoundryDroplet.ts +22 -0
- package/src/domain/ICloudFoundryInstance.ts +5 -0
- package/src/domain/ICloudFoundryLoadBalancer.ts +29 -0
- package/src/domain/ICloudFoundryServerGroup.ts +47 -0
- package/src/domain/ICloudFoundrySpace.ts +10 -0
- package/src/domain/index.ts +8 -0
- package/src/help/cloudfoundry.help.ts +31 -0
- package/src/image/image.reader.cf.ts +17 -0
- package/src/index.ts +7 -0
- package/src/instance/details/CloudFoundryInstanceActions.tsx +59 -0
- package/src/instance/details/CloudFoundryInstanceDetails.tsx +154 -0
- package/src/instance/details/index.ts +1 -0
- package/src/instance/details/sections/CloudFoundryInstanceDetailsSection.tsx +49 -0
- package/src/instance/details/sections/index.ts +1 -0
- package/src/loadBalancer/configure/CloudFoundryMapLoadBalancerModal.tsx +210 -0
- package/src/loadBalancer/configure/loadBalancerDetails.tsx +228 -0
- package/src/loadBalancer/details/CloudFoundryLoadBalancerActions.tsx +61 -0
- package/src/loadBalancer/details/CloudFoundryLoadBalancerDetails.tsx +148 -0
- package/src/loadBalancer/details/index.ts +1 -0
- package/src/loadBalancer/details/sections/CloudFoundryLoadBalancerDetailsSection.tsx +63 -0
- package/src/loadBalancer/details/sections/CloudFoundryLoadBalancerLinksSection.tsx +34 -0
- package/src/loadBalancer/details/sections/CloudFoundryLoadBalancerStatusSection.tsx +27 -0
- package/src/loadBalancer/details/sections/index.ts +3 -0
- package/src/loadBalancer/index.ts +3 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +144 -0
- package/src/logo/cf.icon.svg +12 -0
- package/src/logo/cf.logo.less +5 -0
- package/src/logo/cf.logo.svg +12 -0
- package/src/pipeline/config/validation/cfTargetImpedance.validator.ts +60 -0
- package/src/pipeline/config/validation/instanceSize.validator.ts +66 -0
- package/src/pipeline/config/validation/requiredRoutes.validator.ts +26 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfig.tsx +62 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfigForm.tsx +174 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestDetailsTab.tsx +35 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/bakeCloudFoundryManifestConfig.spec.tsx +80 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/bakeCloudFoundryManifestStage.ts +35 -0
- package/src/pipeline/stages/cloneServerGroup/CloudFoundryCloneServerGroupStageConfig.tsx +113 -0
- package/src/pipeline/stages/cloneServerGroup/cloudFoundryCloneServerGroupStage.module.ts +14 -0
- package/src/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsConfig.spec.tsx +35 -0
- package/src/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsConfig.tsx +69 -0
- package/src/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsStageConfigForm.tsx +230 -0
- package/src/pipeline/stages/createServiceBindings/cloudFoundryCreateServiceBindingsStage.ts +19 -0
- package/src/pipeline/stages/createServiceBindings/cloudFoundryCreateServiceBindingsStageForm.spec.tsx +50 -0
- package/src/pipeline/stages/createServiceKey/CloudFoundryCreateServiceKeyStageConfig.tsx +116 -0
- package/src/pipeline/stages/createServiceKey/cloudFoundryCreateServiceKeyStage.module.ts +21 -0
- package/src/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsConfig.tsx +69 -0
- package/src/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsStageConfigForm.tsx +158 -0
- package/src/pipeline/stages/deleteServiceBindings/cloudFoundryDeleteServiceBindingsStage.ts +19 -0
- package/src/pipeline/stages/deleteServiceBindings/cloudFoundryDeleteServiceBindingsStageForm.spec.tsx +49 -0
- package/src/pipeline/stages/deleteServiceKey/CloudFoundryDeleteServiceKeyStageConfig.tsx +116 -0
- package/src/pipeline/stages/deleteServiceKey/cloudFoundryDeleteServiceKeyStage.module.ts +22 -0
- package/src/pipeline/stages/deployService/CloudFoundryDeployServiceStageConfig.tsx +198 -0
- package/src/pipeline/stages/deployService/CreateServiceInstanceDirectInput.tsx +164 -0
- package/src/pipeline/stages/deployService/CreateUserProvidedInput.tsx +116 -0
- package/src/pipeline/stages/deployService/ICloudFoundryServiceManifestSource.ts +27 -0
- package/src/pipeline/stages/deployService/ServiceTagsInput.tsx +89 -0
- package/src/pipeline/stages/deployService/cloudFoundryDeployServiceStage.module.ts +153 -0
- package/src/pipeline/stages/deployService/cloudfoundryDeployServiceStage.less +12 -0
- package/src/pipeline/stages/destroyAsg/cloudFoundryDestroyAsgStage.module.ts +23 -0
- package/src/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfig.tsx +46 -0
- package/src/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfigForm.tsx +134 -0
- package/src/pipeline/stages/destroyService/cloudFoundryDestroyServiceStage.module.ts +20 -0
- package/src/pipeline/stages/disableAsg/cloudFoundryDisableAsgStage.module.ts +18 -0
- package/src/pipeline/stages/enableAsg/cloudFoundryEnableAsgStage.module.ts +18 -0
- package/src/pipeline/stages/mapLoadBalancers/cloudFoundryMapLoadBalancersStage.module.ts +21 -0
- package/src/pipeline/stages/resizeAsg/CloudFoundryResizeAsgStageConfig.tsx +148 -0
- package/src/pipeline/stages/resizeAsg/cloudFoundryResizeAsgStage.module.ts +52 -0
- package/src/pipeline/stages/rollbackCluster/CloudFoundryRollbackClusterStageConfig.tsx +90 -0
- package/src/pipeline/stages/rollbackCluster/cloudFoundryRollbackClusterStage.module.ts +19 -0
- package/src/pipeline/stages/runJob/CloudFoundryRunJobStageConfig.tsx +100 -0
- package/src/pipeline/stages/runJob/RunJobExecutionDetails.tsx +62 -0
- package/src/pipeline/stages/runJob/cloudFoundryRunJob.module.ts +24 -0
- package/src/pipeline/stages/shareService/CloudFoundryShareServiceExecutionDetails.tsx +52 -0
- package/src/pipeline/stages/shareService/CloudFoundryShareServiceStageConfig.tsx +141 -0
- package/src/pipeline/stages/shareService/cloudFoundryShareServiceStage.module.ts +21 -0
- package/src/pipeline/stages/unmapLoadBalancers/cloudFoundryUnmapLoadBalancersStage.module.ts +21 -0
- package/src/pipeline/stages/unshareService/CloudFoundryUnshareServiceExecutionDetails.tsx +46 -0
- package/src/pipeline/stages/unshareService/CloudFoundryUnshareServiceStageConfig.tsx +114 -0
- package/src/pipeline/stages/unshareService/cloudFoundryUnshareServiceStage.module.ts +21 -0
- package/src/presentation/forms/index.ts +2 -0
- package/src/presentation/forms/inputs/FormikConfigField.tsx +28 -0
- package/src/presentation/forms/inputs/index.ts +1 -0
- package/src/presentation/forms/serverGroup/Buildpacks.tsx +69 -0
- package/src/presentation/forms/serverGroup/EnvironmentVariables.tsx +94 -0
- package/src/presentation/forms/serverGroup/HealthCheck.tsx +57 -0
- package/src/presentation/forms/serverGroup/InstanceParameters.tsx +63 -0
- package/src/presentation/forms/serverGroup/Routes.tsx +74 -0
- package/src/presentation/forms/serverGroup/Services.tsx +62 -0
- package/src/presentation/forms/serverGroup/index.ts +6 -0
- package/src/presentation/index.ts +3 -0
- package/src/presentation/pipeline/index.ts +1 -0
- package/src/presentation/pipeline/stages/CloudFoundryAsgStageConfig.tsx +67 -0
- package/src/presentation/pipeline/stages/CloudFoundryLoadBalancersExecutionDetails.tsx +53 -0
- package/src/presentation/pipeline/stages/CloudFoundryLoadBalancersStageConfig.tsx +116 -0
- package/src/presentation/pipeline/stages/CloudFoundryServiceExecutionDetails.tsx +46 -0
- package/src/presentation/pipeline/stages/CloudFoundryServiceKeyExecutionDetails.tsx +52 -0
- package/src/presentation/pipeline/stages/index.ts +5 -0
- package/src/presentation/widgets/accountRegionClusterSelector/AccountRegionClusterSelector.spec.tsx +385 -0
- package/src/presentation/widgets/accountRegionClusterSelector/AccountRegionClusterSelector.tsx +231 -0
- package/src/presentation/widgets/accountRegionClusterSelector/FormikAccountRegionClusterSelector.tsx +164 -0
- package/src/presentation/widgets/accountRegionClusterSelector/index.ts +2 -0
- package/src/presentation/widgets/index.ts +1 -0
- package/src/presentation/widgets/recentLogs/CloudFoundryRecentLogs.tsx +112 -0
- package/src/routeDomains/index.ts +1 -0
- package/src/routeDomains/routeDomainSelectField.tsx +48 -0
- package/src/serverGroup/configure/index.ts +4 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.cf.ts +168 -0
- package/src/serverGroup/configure/serverGroupCommandBuilderShim.service.cf.ts +64 -0
- package/src/serverGroup/configure/serverGroupConfigurationModel.cf.ts +77 -0
- package/src/serverGroup/configure/wizard/CreateServerGroupModal.tsx +194 -0
- package/src/serverGroup/configure/wizard/ServerGroupTemplateSelection.tsx +55 -0
- package/src/serverGroup/configure/wizard/sections/artifactSettings/ArtifactSettings.cf.tsx +78 -0
- package/src/serverGroup/configure/wizard/sections/artifactSettings/ConstantArtifactSettings.cf.tsx +49 -0
- package/src/serverGroup/configure/wizard/sections/basicSettings/BasicSettings.cf.tsx +163 -0
- package/src/serverGroup/configure/wizard/sections/cloneSettings/CloneSettings.cf.tsx +101 -0
- package/src/serverGroup/configure/wizard/sections/configurationSettings/ConfigurationSettings.cf.tsx +230 -0
- package/src/serverGroup/configure/wizard/serverGroup.less +3 -0
- package/src/serverGroup/details/cfServerGroupDetailsGetter.ts +60 -0
- package/src/serverGroup/details/cloudFoundryServerGroupActions.tsx +365 -0
- package/src/serverGroup/details/mapLoadBalancers/CloudFoundryMapLoadBalancersModal.tsx +137 -0
- package/src/serverGroup/details/mapLoadBalancers/CloudFoundryUnmapLoadBalancersModal.tsx +137 -0
- package/src/serverGroup/details/resize/CloudFoundryResizeServerGroupModal.tsx +232 -0
- package/src/serverGroup/details/rollback/CloudFoundryRollbackServerGroupModal.tsx +179 -0
- package/src/serverGroup/details/sections/ApplicationManagerSection.tsx +28 -0
- package/src/serverGroup/details/sections/BoundServicesSection.tsx +39 -0
- package/src/serverGroup/details/sections/BuildSection.tsx +61 -0
- package/src/serverGroup/details/sections/EnvironmentVariablesSection.tsx +34 -0
- package/src/serverGroup/details/sections/HealthCheckSection.tsx +28 -0
- package/src/serverGroup/details/sections/ICloudFoundryServerGroupDetailsSectionProps.ts +6 -0
- package/src/serverGroup/details/sections/MetricsSection.tsx +28 -0
- package/src/serverGroup/details/sections/PackageSection.tsx +27 -0
- package/src/serverGroup/details/sections/ServerGroupInformationSection.tsx +58 -0
- package/src/serverGroup/details/sections/ServerGroupSizingSection.tsx +27 -0
- package/src/serverGroup/details/sections/index.ts +9 -0
- package/src/serverGroup/index.ts +5 -0
- package/src/serverGroup/serverGroup.transformer.ts +42 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { defaultsDeep, unset } from 'lodash';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { Option } from 'react-select';
|
|
4
|
+
import Select from 'react-select';
|
|
5
|
+
|
|
6
|
+
import type {
|
|
7
|
+
IDeploymentStrategy,
|
|
8
|
+
IDeploymentStrategyAdditionalFieldsProps,
|
|
9
|
+
IServerGroupCommand,
|
|
10
|
+
} from '@spinnaker/core';
|
|
11
|
+
import { CoreRedBlackAdditionalFields, HelpField, Markdown } from '@spinnaker/core';
|
|
12
|
+
|
|
13
|
+
import type { IRedBlackCommand } from './strategies/redblack/redblack.strategy';
|
|
14
|
+
import type { IRollingRedBlackCommand } from './strategies/rollingredblack/AdditionalFields';
|
|
15
|
+
import { AdditionalFields as AdditionalRollingRedBlackFields } from './strategies/rollingredblack/AdditionalFields';
|
|
16
|
+
|
|
17
|
+
export interface ICloudFoundryDeploymentStrategySelectorProps {
|
|
18
|
+
command: IServerGroupCommand;
|
|
19
|
+
onFieldChange: (key: string, value: any) => void;
|
|
20
|
+
onStrategyChange: (command: IServerGroupCommand, strategy: IDeploymentStrategy) => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ICloudFoundryDeploymentStrategySelectorState {
|
|
24
|
+
strategies: IDeploymentStrategy[];
|
|
25
|
+
currentStrategy: string;
|
|
26
|
+
AdditionalFieldsComponent: React.ComponentType<IDeploymentStrategyAdditionalFieldsProps>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export class CloudFoundryDeploymentStrategySelector extends React.Component<
|
|
30
|
+
ICloudFoundryDeploymentStrategySelectorProps,
|
|
31
|
+
ICloudFoundryDeploymentStrategySelectorState
|
|
32
|
+
> {
|
|
33
|
+
public state: ICloudFoundryDeploymentStrategySelectorState = {
|
|
34
|
+
strategies: [
|
|
35
|
+
{
|
|
36
|
+
label: 'None',
|
|
37
|
+
description: 'Creates the next server group with no impact on existing server groups',
|
|
38
|
+
key: '',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: 'Highlander',
|
|
42
|
+
description:
|
|
43
|
+
'Destroys <i>all</i> previous server groups in the cluster as soon as new server group passes health checks',
|
|
44
|
+
key: 'highlander',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: 'Red/Black',
|
|
48
|
+
description:
|
|
49
|
+
'Disables <i>all</i> previous server groups in the cluster as soon as new server group passes health checks',
|
|
50
|
+
key: 'redblack',
|
|
51
|
+
additionalFields: ['maxRemainingAsgs'],
|
|
52
|
+
AdditionalFieldsComponent: CoreRedBlackAdditionalFields,
|
|
53
|
+
initializationMethod: (command: IRedBlackCommand) => {
|
|
54
|
+
defaultsDeep(command, {
|
|
55
|
+
rollback: {
|
|
56
|
+
onFailure: false,
|
|
57
|
+
},
|
|
58
|
+
maxRemainingAsgs: 2,
|
|
59
|
+
delayBeforeDisableSec: 0,
|
|
60
|
+
delayBeforeScaleDownSec: 0,
|
|
61
|
+
scaleDown: false,
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
label: 'Rolling Red/Black',
|
|
67
|
+
description:
|
|
68
|
+
'Gradually replaces <i>all</i> previous server group instances in the cluster as soon as new server group instances pass health checks',
|
|
69
|
+
key: 'cfrollingredblack',
|
|
70
|
+
additionalFields: ['targetPercentages'],
|
|
71
|
+
AdditionalFieldsComponent: AdditionalRollingRedBlackFields,
|
|
72
|
+
initializationMethod: (command: IRollingRedBlackCommand) => {
|
|
73
|
+
defaultsDeep(command, {
|
|
74
|
+
rollback: {
|
|
75
|
+
onFailure: false,
|
|
76
|
+
},
|
|
77
|
+
targetPercentages: command.targetPercentages ? command.targetPercentages : [50, 100], // defaultsDeep does not work with arrays
|
|
78
|
+
delayBeforeDisableSec: 0,
|
|
79
|
+
delayBeforeScaleDownSec: 0,
|
|
80
|
+
maxRemainingAsgs: 2,
|
|
81
|
+
scaleDown: false,
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
currentStrategy: null,
|
|
87
|
+
AdditionalFieldsComponent: undefined,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
public selectStrategy(strategy: string): void {
|
|
91
|
+
const { command, onStrategyChange } = this.props;
|
|
92
|
+
const oldStrategy = this.state.strategies.find((s) => s.key === this.state.currentStrategy);
|
|
93
|
+
const newStrategy = this.state.strategies.find((s) => s.key === strategy);
|
|
94
|
+
|
|
95
|
+
if (oldStrategy && oldStrategy.additionalFields) {
|
|
96
|
+
oldStrategy.additionalFields.forEach((field) => {
|
|
97
|
+
if (!newStrategy || !newStrategy.additionalFields || !newStrategy.additionalFields.includes(field)) {
|
|
98
|
+
unset(command, field);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
let AdditionalFieldsComponent;
|
|
104
|
+
if (newStrategy) {
|
|
105
|
+
AdditionalFieldsComponent = newStrategy.AdditionalFieldsComponent;
|
|
106
|
+
if (newStrategy.initializationMethod) {
|
|
107
|
+
newStrategy.initializationMethod(command);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
command.strategy = strategy;
|
|
111
|
+
if (onStrategyChange && newStrategy) {
|
|
112
|
+
onStrategyChange(command, newStrategy);
|
|
113
|
+
}
|
|
114
|
+
this.setState({ currentStrategy: strategy, AdditionalFieldsComponent });
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
public strategyChanged = (option: Option<IDeploymentStrategy>) => {
|
|
118
|
+
this.selectStrategy(option.key);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
public componentDidMount() {
|
|
122
|
+
this.selectStrategy(this.props.command.strategy);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
public render() {
|
|
126
|
+
const { command, onFieldChange } = this.props;
|
|
127
|
+
const { AdditionalFieldsComponent, currentStrategy, strategies } = this.state;
|
|
128
|
+
const hasAdditionalFields = Boolean(AdditionalFieldsComponent);
|
|
129
|
+
if (strategies && strategies.length) {
|
|
130
|
+
return (
|
|
131
|
+
<div>
|
|
132
|
+
<div className="StandardFieldLayout flex-container-h baseline margin-between-lg">
|
|
133
|
+
<div className={`sm-label-right`} style={{ paddingLeft: '13px' }}>
|
|
134
|
+
Strategy
|
|
135
|
+
<HelpField id="core.serverGroup.strategy" />
|
|
136
|
+
</div>
|
|
137
|
+
<div className="flex-grow">
|
|
138
|
+
<Select
|
|
139
|
+
clearable={false}
|
|
140
|
+
required={true}
|
|
141
|
+
options={strategies}
|
|
142
|
+
placeholder="None"
|
|
143
|
+
valueKey="key"
|
|
144
|
+
value={currentStrategy}
|
|
145
|
+
optionRenderer={this.strategyOptionRenderer}
|
|
146
|
+
valueRenderer={(o) => <>{o.label}</>}
|
|
147
|
+
onChange={this.strategyChanged}
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
{hasAdditionalFields && (
|
|
152
|
+
<div className="form-group col-md-9 col-md-offset-3" style={{ marginTop: '5px', float: 'right' }}>
|
|
153
|
+
<AdditionalFieldsComponent command={command} onChange={onFieldChange} />
|
|
154
|
+
</div>
|
|
155
|
+
)}
|
|
156
|
+
</div>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
private strategyOptionRenderer = (option: IDeploymentStrategy) => {
|
|
164
|
+
return (
|
|
165
|
+
<div className="body-regular">
|
|
166
|
+
<strong>
|
|
167
|
+
<Markdown tag="span" message={option.label} />
|
|
168
|
+
</strong>
|
|
169
|
+
<div>
|
|
170
|
+
<Markdown tag="span" message={option.description} />
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
);
|
|
174
|
+
};
|
|
175
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IServerGroupCommand } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
export interface IRedBlackCommand extends IServerGroupCommand {
|
|
4
|
+
maxRemainingAsgs: number;
|
|
5
|
+
delayBeforeDisableSec: number;
|
|
6
|
+
delayBeforeScaleDownSec: number;
|
|
7
|
+
rollback: {
|
|
8
|
+
onFailure: boolean;
|
|
9
|
+
};
|
|
10
|
+
scaleDown: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { set } from 'lodash';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { IDeploymentStrategyAdditionalFieldsProps, IServerGroupCommand } from '@spinnaker/core';
|
|
5
|
+
import { HelpField } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export interface IRollingRedBlackCommand extends IServerGroupCommand {
|
|
8
|
+
targetPercentages: number[];
|
|
9
|
+
delayBeforeDisableSec: number;
|
|
10
|
+
delayBeforeScaleDownSec: number;
|
|
11
|
+
maxRemainingAsgs: number;
|
|
12
|
+
rollback: {
|
|
13
|
+
onFailure: boolean;
|
|
14
|
+
};
|
|
15
|
+
scaleDown: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IRollingRedBlackStrategyAdditionalFieldsProps extends IDeploymentStrategyAdditionalFieldsProps {
|
|
19
|
+
command: IRollingRedBlackCommand;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class AdditionalFields extends React.Component<IRollingRedBlackStrategyAdditionalFieldsProps> {
|
|
23
|
+
private handlePercentChange = (key: string, value: any, index: number) => {
|
|
24
|
+
const percentages = this.props.command.targetPercentages;
|
|
25
|
+
percentages[index] = value;
|
|
26
|
+
set(this.props.command, key, percentages);
|
|
27
|
+
this.forceUpdate();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
private onDelete = (index: number) => {
|
|
31
|
+
const percentages = this.props.command.targetPercentages;
|
|
32
|
+
percentages.splice(index, 1);
|
|
33
|
+
set(this.props.command, 'targetPercentages', percentages);
|
|
34
|
+
this.forceUpdate();
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
private addPercent = () => {
|
|
38
|
+
const percentages = this.props.command.targetPercentages;
|
|
39
|
+
percentages.push(100);
|
|
40
|
+
set(this.props.command, 'targetPercentages', percentages);
|
|
41
|
+
this.forceUpdate();
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
private handleChange = (key: string, value: any) => {
|
|
45
|
+
set(this.props.command, key, value);
|
|
46
|
+
this.forceUpdate();
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
public render() {
|
|
50
|
+
const { command } = this.props;
|
|
51
|
+
return (
|
|
52
|
+
<div className="form-group">
|
|
53
|
+
<div className="col-md-12">
|
|
54
|
+
<div className="col-md-12 checkbox">
|
|
55
|
+
<label>
|
|
56
|
+
<input
|
|
57
|
+
type="checkbox"
|
|
58
|
+
checked={command.rollback.onFailure}
|
|
59
|
+
onChange={(e) => this.handleChange('rollback.onFailure', e.target.checked)}
|
|
60
|
+
/>
|
|
61
|
+
Rollback to previous server group if deployment fails <HelpField id="strategy.rollingRedBlack.rollback" />
|
|
62
|
+
</label>
|
|
63
|
+
</div>
|
|
64
|
+
<div className="col-md-12 form-inline sp-margin-m-bottom sp-margin-m-top">
|
|
65
|
+
<label>
|
|
66
|
+
Wait Before Scale Down
|
|
67
|
+
<HelpField content="Time to wait before scaling down source server group" />
|
|
68
|
+
</label>
|
|
69
|
+
<div>
|
|
70
|
+
<input
|
|
71
|
+
className="form-control input-sm"
|
|
72
|
+
style={{ width: '60px' }}
|
|
73
|
+
min="0"
|
|
74
|
+
type="number"
|
|
75
|
+
value={command.delayBeforeDisableSec}
|
|
76
|
+
onChange={(e) => this.handleChange('delayBeforeDisableSec', e.target.value)}
|
|
77
|
+
placeholder="0"
|
|
78
|
+
/>
|
|
79
|
+
seconds
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div className="col-md-12 form-inline sp-margin-m-bottom">
|
|
83
|
+
<label>
|
|
84
|
+
Maximum number of server groups to leave
|
|
85
|
+
<HelpField id="strategy.redblack.maxRemainingAsgs" />
|
|
86
|
+
</label>
|
|
87
|
+
<div>
|
|
88
|
+
<input
|
|
89
|
+
className="form-control input-sm"
|
|
90
|
+
style={{ width: '60px' }}
|
|
91
|
+
min="2"
|
|
92
|
+
type="number"
|
|
93
|
+
value={command.maxRemainingAsgs}
|
|
94
|
+
onChange={(e) => this.handleChange('maxRemainingAsgs', e.target.value)}
|
|
95
|
+
/>
|
|
96
|
+
server groups
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
<div className="col-md-12 form-inline sp-margin-m-bottom">
|
|
100
|
+
<label>
|
|
101
|
+
Wait Before Cluster Scale Down
|
|
102
|
+
<HelpField content="Time to wait before scaling down the cluster after deployment" />
|
|
103
|
+
</label>
|
|
104
|
+
<div>
|
|
105
|
+
<input
|
|
106
|
+
className="form-control input-sm"
|
|
107
|
+
style={{ width: '60px' }}
|
|
108
|
+
min="0"
|
|
109
|
+
type="number"
|
|
110
|
+
value={command.delayBeforeScaleDownSec}
|
|
111
|
+
onChange={(e) => this.handleChange('delayBeforeScaleDownSec', e.target.value)}
|
|
112
|
+
placeholder="0"
|
|
113
|
+
/>
|
|
114
|
+
seconds
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
<label>
|
|
118
|
+
Scale by percentages
|
|
119
|
+
<HelpField content="Steps to get to full capacity in percent" />
|
|
120
|
+
</label>
|
|
121
|
+
<table className="table table-condensed packed metadata">
|
|
122
|
+
<tbody>
|
|
123
|
+
{command.targetPercentages.map((percentage: number, index: number) => {
|
|
124
|
+
return (
|
|
125
|
+
<tr key={index}>
|
|
126
|
+
<td>
|
|
127
|
+
<div className="sp-margin-m-bottom">
|
|
128
|
+
<input
|
|
129
|
+
className="form-control"
|
|
130
|
+
min="0"
|
|
131
|
+
type="number"
|
|
132
|
+
value={percentage}
|
|
133
|
+
onChange={(e) => this.handlePercentChange('targetPercentages', e.target.value, index)}
|
|
134
|
+
placeholder="100"
|
|
135
|
+
/>
|
|
136
|
+
</div>
|
|
137
|
+
</td>
|
|
138
|
+
<td>
|
|
139
|
+
<a className="btn btn-link sm-label" onClick={() => this.onDelete(index)}>
|
|
140
|
+
<span className="glyphicon glyphicon-trash" />
|
|
141
|
+
</a>
|
|
142
|
+
</td>
|
|
143
|
+
</tr>
|
|
144
|
+
);
|
|
145
|
+
})}
|
|
146
|
+
</tbody>
|
|
147
|
+
<tfoot>
|
|
148
|
+
<tr>
|
|
149
|
+
<td colSpan={2}>
|
|
150
|
+
<button type="button" className="add-new col-md-12" onClick={() => this.addPercent()}>
|
|
151
|
+
<span className="glyphicon glyphicon-plus-sign" /> Add percentage
|
|
152
|
+
</button>
|
|
153
|
+
</td>
|
|
154
|
+
</tr>
|
|
155
|
+
</tfoot>
|
|
156
|
+
</table>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IAccountDetails } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
import type { ICloudFoundryDomain } from './ICloudFoundryLoadBalancer';
|
|
4
|
+
import type { ICloudFoundrySpace } from './ICloudFoundrySpace';
|
|
5
|
+
|
|
6
|
+
export interface ICloudFoundryAccount extends IAccountDetails {
|
|
7
|
+
domains?: ICloudFoundryDomain[];
|
|
8
|
+
spaces?: ICloudFoundrySpace[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ICloudFoundrySpace } from './ICloudFoundrySpace';
|
|
2
|
+
|
|
3
|
+
export interface ICloudFoundryDroplet {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
space: ICloudFoundrySpace;
|
|
7
|
+
stack: string;
|
|
8
|
+
buildpacks: ICloudFoundryBuildpack[];
|
|
9
|
+
sourcePackage?: ICloudFoundryPackage;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ICloudFoundryBuildpack {
|
|
13
|
+
name: string;
|
|
14
|
+
detectOutput: string;
|
|
15
|
+
version: string;
|
|
16
|
+
buildpackName: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ICloudFoundryPackage {
|
|
20
|
+
checksum: string;
|
|
21
|
+
downloadUrl: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ILoadBalancer, ILoadBalancerUpsertCommand } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
import type { ICloudFoundryServerGroup } from './ICloudFoundryServerGroup';
|
|
4
|
+
import type { ICloudFoundryOrganization, ICloudFoundrySpace } from './ICloudFoundrySpace';
|
|
5
|
+
|
|
6
|
+
export interface ICloudFoundryDomain {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
organization: ICloudFoundryOrganization;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ICloudFoundryLoadBalancer extends ILoadBalancer {
|
|
13
|
+
id: string;
|
|
14
|
+
host?: string;
|
|
15
|
+
path?: string;
|
|
16
|
+
port?: string;
|
|
17
|
+
space: ICloudFoundrySpace;
|
|
18
|
+
serverGroups: ICloudFoundryServerGroup[];
|
|
19
|
+
domain?: ICloudFoundryDomain;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ICloudFoundryLoadBalancerUpsertCommand extends ILoadBalancerUpsertCommand {
|
|
23
|
+
id?: string;
|
|
24
|
+
host: string;
|
|
25
|
+
path?: string;
|
|
26
|
+
port?: string;
|
|
27
|
+
serverGroups?: ICloudFoundryServerGroup[];
|
|
28
|
+
domain: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { IServerGroup } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
import type { ICloudFoundryDroplet } from './ICloudFoundryDroplet';
|
|
4
|
+
import type { ICloudFoundryInstance } from './ICloudFoundryInstance';
|
|
5
|
+
import type { ICloudFoundrySpace } from './ICloudFoundrySpace';
|
|
6
|
+
|
|
7
|
+
export interface ICloudFoundryServerGroup extends IServerGroup {
|
|
8
|
+
appsManagerUri?: string;
|
|
9
|
+
diskQuota: number;
|
|
10
|
+
healthCheckType: string;
|
|
11
|
+
healthCheckHttpEndpoint: string;
|
|
12
|
+
state: 'STARTED' | 'STOPPED';
|
|
13
|
+
instances: ICloudFoundryInstance[];
|
|
14
|
+
metricsUri?: string;
|
|
15
|
+
memory: number;
|
|
16
|
+
space: ICloudFoundrySpace;
|
|
17
|
+
droplet?: ICloudFoundryDroplet;
|
|
18
|
+
serviceInstances: ICloudFoundryServiceInstance[];
|
|
19
|
+
env: ICloudFoundryEnvVar[];
|
|
20
|
+
ciBuild: ICloudFoundryBuildInfo;
|
|
21
|
+
appArtifact: ICloudFoundryArtifactInfo;
|
|
22
|
+
pipelineId: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ICloudFoundryServiceInstance {
|
|
26
|
+
name: string;
|
|
27
|
+
plan: string;
|
|
28
|
+
service: string;
|
|
29
|
+
tags?: string[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ICloudFoundryEnvVar {
|
|
33
|
+
key: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ICloudFoundryBuildInfo {
|
|
38
|
+
jobName: string;
|
|
39
|
+
jobNumber: string;
|
|
40
|
+
jobUrl: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ICloudFoundryArtifactInfo {
|
|
44
|
+
name: string;
|
|
45
|
+
version: string;
|
|
46
|
+
url: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './ICloudFoundryAccount';
|
|
2
|
+
export * from './ICloudFoundryApplication';
|
|
3
|
+
export * from './ICloudFoundryDroplet';
|
|
4
|
+
export * from './ICloudFoundryInstance';
|
|
5
|
+
export * from './ICloudFoundrySpace';
|
|
6
|
+
export * from './ICloudFoundryLoadBalancer';
|
|
7
|
+
export * from './ICloudFoundryServerGroup';
|
|
8
|
+
export * from './ICloudFoundryCluster';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HelpContentsRegistry } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
const helpContents: { [key: string]: string } = {
|
|
4
|
+
'cf.service.deploy.timeout':
|
|
5
|
+
'(Optional) <b>Override Deploy Timeout</b> is the maximum amount of time allowed for service deployment before Spinnaker reports a timeout error (default: 450 seconds). If a timeout error is reported by Spinnaker, the request may still be processed and a service may still be created.',
|
|
6
|
+
'cf.service.destroy.timeout':
|
|
7
|
+
'(Optional) <b>Override Destroy Timeout</b> is the maximum amount of time allowed for service destruction before Spinnaker reports a timeout error (default: 450 seconds). If a timeout error is reported by Spinnaker, the request may still be processed and the service may be deleted.',
|
|
8
|
+
'cf.serverGroup.stack':
|
|
9
|
+
'(Optional) <b>Stack</b> is one of the core naming components of a cluster, used to create vertical stacks of dependent services for integration testing.',
|
|
10
|
+
'cf.serverGroup.detail':
|
|
11
|
+
'(Optional) <b>Detail</b> is a string of free-form alphanumeric characters and hyphens to describe any other variables.',
|
|
12
|
+
'cf.serverGroup.startApplication':
|
|
13
|
+
'<b>Start on creation</b> is a boolean value that determines if the server group is started upon creation. Default value is <code>true</code>.',
|
|
14
|
+
'cf.serverGroup.requiredRoutes':
|
|
15
|
+
'<b>Route</b> is a URI in the form of <code>some.host.some.domain[:9999][/some/path]</code> (port and path are optional). The domain has to be a valid domain in the CloudFoundry Org (Region) that this server group runs in.',
|
|
16
|
+
'cf.serverGroup.routes':
|
|
17
|
+
'(Optional) <b>Route</b> is a URI in the form of <code>some.host.some.domain[:9999][/some/path]</code> (port and path are optional). The domain has to be a valid domain in the CloudFoundry Org (Region) that this server group runs in.',
|
|
18
|
+
'cf.artifact.package': `<p>This option allows you to create a new server group from an existing Droplet. You can use this to relocate an existing Cloud Foundry application from one space to another or to launch a clone of an application with different root filesystem or resource settings.</p>`,
|
|
19
|
+
'cf.artifact.trigger.account': `<p>Specify an artifact account if the trigger source produces an artifact that requires authentication credentials to retrieve. Otherwise, leave blank.</p>`,
|
|
20
|
+
'cf.runJob.logsUrl':
|
|
21
|
+
'<p>(Optional) A templated URL to an external logging system. The URL is used in the pipeline execution stage task details.</p>' +
|
|
22
|
+
'<p><a href="http://spinnaker.github.io/guides/user/pipeline-expressions" target="_blank">Pipeline expressions</a> can be used to interpolate values from the stage context, for example:' +
|
|
23
|
+
'<ul>' +
|
|
24
|
+
'<li><code>${appGuid}</code> the selected cluster CF app GUID.</li>' +
|
|
25
|
+
'<li><code>${name}</code> the task name.</li>' +
|
|
26
|
+
'</ul>' +
|
|
27
|
+
'</p>',
|
|
28
|
+
'cf.runJob.jobName': '(Optional) If left empty, a random string will be generated.',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
Object.keys(helpContents).forEach((key) => HelpContentsRegistry.register(key, helpContents[key]));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { REST } from '@spinnaker/core';
|
|
2
|
+
import type { ICloudFoundryCluster } from '../domain';
|
|
3
|
+
|
|
4
|
+
export class CloudFoundryImageReader {
|
|
5
|
+
public static findImages(account: string): PromiseLike<ICloudFoundryCluster[]> {
|
|
6
|
+
return REST('/images/find')
|
|
7
|
+
.query({
|
|
8
|
+
account,
|
|
9
|
+
provider: 'cloudfoundry',
|
|
10
|
+
})
|
|
11
|
+
.get()
|
|
12
|
+
.then(function (results: any) {
|
|
13
|
+
return results;
|
|
14
|
+
})
|
|
15
|
+
.catch((): any[] => []);
|
|
16
|
+
}
|
|
17
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cloneDeep } from 'lodash';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Dropdown } from 'react-bootstrap';
|
|
4
|
+
|
|
5
|
+
import type { Application } from '@spinnaker/core';
|
|
6
|
+
import { ConfirmationModalService, InstanceWriter, ReactInjector } from '@spinnaker/core';
|
|
7
|
+
import type { ICloudFoundryInstance } from '../../domain';
|
|
8
|
+
|
|
9
|
+
export interface ICloudFoundryInstanceActionsProps {
|
|
10
|
+
application: Application;
|
|
11
|
+
instance: ICloudFoundryInstance;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class CloudFoundryInstanceActions extends React.Component<ICloudFoundryInstanceActionsProps> {
|
|
15
|
+
private terminateInstance = () => {
|
|
16
|
+
const { application, instance } = this.props;
|
|
17
|
+
const instanceClone = cloneDeep(instance) as any;
|
|
18
|
+
instanceClone.placement = {};
|
|
19
|
+
instanceClone.id = instance.name;
|
|
20
|
+
const taskMonitor = {
|
|
21
|
+
application: application,
|
|
22
|
+
title: 'Terminating ' + instance.name,
|
|
23
|
+
onTaskComplete() {
|
|
24
|
+
if (ReactInjector.$state.includes('**.serverGroup', { instanceId: instance.name })) {
|
|
25
|
+
ReactInjector.$state.go('^');
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const submitMethod = () => {
|
|
31
|
+
return InstanceWriter.terminateInstance(instance, application, { cloudProvider: 'cloudfoundry' });
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
ConfirmationModalService.confirm({
|
|
35
|
+
header: 'Really terminate ' + instance.name + '?',
|
|
36
|
+
buttonText: 'Terminate',
|
|
37
|
+
account: instance.account,
|
|
38
|
+
taskMonitorConfig: taskMonitor,
|
|
39
|
+
submitMethod,
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
public render(): JSX.Element {
|
|
44
|
+
return (
|
|
45
|
+
<div className="actions">
|
|
46
|
+
<Dropdown className="dropdown" id="instance-actions-dropdown">
|
|
47
|
+
<Dropdown.Toggle className="btn btn-sm btn-primary dropdown-toggle">Instance Actions</Dropdown.Toggle>
|
|
48
|
+
<Dropdown.Menu className="dropdown-menu">
|
|
49
|
+
<li>
|
|
50
|
+
<a className="clickable" onClick={this.terminateInstance}>
|
|
51
|
+
Terminate
|
|
52
|
+
</a>
|
|
53
|
+
</li>
|
|
54
|
+
</Dropdown.Menu>
|
|
55
|
+
</Dropdown>
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
}
|