@spinnaker/cloudrun 0.1.6
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 +70 -0
- package/LICENSE.txt +203 -0
- package/dist/cloudrun.module.d.ts +4 -0
- package/dist/cloudrun.settings.d.ts +7 -0
- package/dist/common/cloudrunHealth.d.ts +3 -0
- package/dist/common/componentUrlDetails.component.d.ts +1 -0
- package/dist/common/conditionalDescriptionListItem.component.d.ts +1 -0
- package/dist/common/domain/ICloudrunInstance.d.ts +20 -0
- package/dist/common/domain/ICloudrunLoadBalancer.d.ts +18 -0
- package/dist/common/domain/index.d.ts +2 -0
- package/dist/common/loadBalancerMessage.component.d.ts +1 -0
- package/dist/help/cloudrun.help.d.ts +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/details/details.controller.d.ts +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/infrastructure.types.d.ts +18 -0
- package/dist/loadBalancer/configure/wizard/allocationConfigurationRow.component.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/basicSettings.component.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/wizard.controller.d.ts +2 -0
- package/dist/loadBalancer/details/details.controller.d.ts +1 -0
- package/dist/loadBalancer/index.d.ts +3 -0
- package/dist/loadBalancer/loadBalancerTransformer.d.ts +38 -0
- package/dist/manifest/ManifestSource.d.ts +4 -0
- package/dist/manifest/index.d.ts +2 -0
- package/dist/manifest/manifest.service.d.ts +25 -0
- package/dist/manifest/manifestCommandBuilder.service.d.ts +30 -0
- package/dist/manifest/wizard/BasicSettings.d.ts +17 -0
- package/dist/pipeline/pipeline.module.d.ts +1 -0
- package/dist/pipeline/stages/deployManifest/DeployStageConfig.d.ts +15 -0
- package/dist/pipeline/stages/deployManifest/DeployStageForm.d.ts +23 -0
- package/dist/pipeline/stages/deployManifest/ManifestBindArtifactsSelector.d.ts +17 -0
- package/dist/pipeline/stages/deployManifest/deploy.validator.d.ts +2 -0
- package/dist/pipeline/stages/deployManifest/deployStage.d.ts +1 -0
- package/dist/pipeline/stages/deployManifest/manifestStatus/DeployStatus.d.ts +22 -0
- package/dist/pipeline/stages/deployManifest/manifestStatus/DeployStatusPills.d.ts +8 -0
- package/dist/pipeline/stages/deployManifest/manifestStatus/ManifestDetailsLink.d.ts +20 -0
- package/dist/pipeline/stages/deployManifest/manifestStatus/ManifestEvents.d.ts +9 -0
- package/dist/pipeline/stages/deployManifest/manifestStatus/ManifestStatus.d.ts +8 -0
- package/dist/pipeline/stages/deployManifest/serverGroupNamePreview.d.ts +9 -0
- package/dist/pipeline/stages/editLoadBalancer/cloudrunEditLoadBalancerStage.d.ts +1 -0
- package/dist/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.controller.d.ts +1 -0
- package/dist/rolloutStrategy/redblack.strategy.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +74 -0
- package/dist/serverGroup/configure/wizard/BasicSettings.d.ts +29 -0
- package/dist/serverGroup/configure/wizard/ConfigFiles.d.ts +15 -0
- package/dist/serverGroup/configure/wizard/serverGroupWizard.d.ts +25 -0
- package/dist/serverGroup/details/details.controller.d.ts +1 -0
- package/dist/serverGroup/index.d.ts +3 -0
- package/dist/serverGroup/serverGroupTransformer.service.d.ts +31 -0
- package/package.json +57 -0
- package/src/cloudrun.module.ts +73 -0
- package/src/cloudrun.settings.ts +14 -0
- package/src/common/cloudrunHealth.ts +3 -0
- package/src/common/componentUrlDetails.component.ts +22 -0
- package/src/common/conditionalDescriptionListItem.component.ts +37 -0
- package/src/common/domain/ICloudrunInstance.ts +21 -0
- package/src/common/domain/ICloudrunLoadBalancer.ts +18 -0
- package/src/common/domain/index.ts +2 -0
- package/src/common/loadBalancerMessage.component.html +11 -0
- package/src/common/loadBalancerMessage.component.ts +13 -0
- package/src/help/cloudrun.help.ts +99 -0
- package/src/index.ts +3 -0
- package/src/instance/details/details.controller.ts +84 -0
- package/src/instance/details/details.html +68 -0
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/infrastructure.types.ts +23 -0
- package/src/loadBalancer/configure/wizard/allocationConfigurationRow.component.ts +70 -0
- package/src/loadBalancer/configure/wizard/basicSettings.component.html +44 -0
- package/src/loadBalancer/configure/wizard/basicSettings.component.ts +86 -0
- package/src/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.html +45 -0
- package/src/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.ts +84 -0
- package/src/loadBalancer/configure/wizard/wizard.controller.ts +157 -0
- package/src/loadBalancer/configure/wizard/wizard.html +39 -0
- package/src/loadBalancer/configure/wizard/wizard.less +9 -0
- package/src/loadBalancer/details/details.controller.ts +140 -0
- package/src/loadBalancer/details/details.html +89 -0
- package/src/loadBalancer/index.ts +3 -0
- package/src/loadBalancer/loadBalancerTransformer.ts +168 -0
- package/src/logo/cloudrun.icon.svg +27 -0
- package/src/logo/cloudrun.logo.less +6 -0
- package/src/logo/cloudrun.logo.png +0 -0
- package/src/manifest/ManifestSource.ts +4 -0
- package/src/manifest/index.ts +2 -0
- package/src/manifest/manifest.service.ts +89 -0
- package/src/manifest/manifestCommandBuilder.service.ts +116 -0
- package/src/manifest/wizard/BasicSettings.tsx +57 -0
- package/src/pipeline/pipeline.module.ts +6 -0
- package/src/pipeline/stages/deployManifest/DeployStageConfig.tsx +73 -0
- package/src/pipeline/stages/deployManifest/DeployStageForm.tsx +185 -0
- package/src/pipeline/stages/deployManifest/ManifestBindArtifactsSelector.tsx +69 -0
- package/src/pipeline/stages/deployManifest/deploy.validator.ts +38 -0
- package/src/pipeline/stages/deployManifest/deployStage.ts +28 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/DeployStatus.tsx +108 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/DeployStatusPills.tsx +47 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/ManifestDetailsLink.tsx +92 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/ManifestEvents.tsx +87 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/ManifestStatus.less +24 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/ManifestStatus.tsx +46 -0
- package/src/pipeline/stages/deployManifest/serverGroupNamePreview.tsx +28 -0
- package/src/pipeline/stages/editLoadBalancer/cloudrunEditLoadBalancerStage.ts +74 -0
- package/src/pipeline/stages/editLoadBalancer/editLoadBalancerExecutionDetails.html +33 -0
- package/src/pipeline/stages/editLoadBalancer/editLoadBalancerStage.html +51 -0
- package/src/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.controller.ts +65 -0
- package/src/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.html +53 -0
- package/src/rolloutStrategy/redblack.strategy.ts +7 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +254 -0
- package/src/serverGroup/configure/wizard/BasicSettings.tsx +160 -0
- package/src/serverGroup/configure/wizard/ConfigFiles.tsx +75 -0
- package/src/serverGroup/configure/wizard/serverGroupWizard.tsx +150 -0
- package/src/serverGroup/details/details.controller.ts +134 -0
- package/src/serverGroup/details/details.html +94 -0
- package/src/serverGroup/index.ts +3 -0
- package/src/serverGroup/serverGroupTransformer.service.ts +61 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IAccountDetails, IFormikStageConfigInjectedProps } from '@spinnaker/core';
|
|
3
|
+
interface IDeployManifestStageConfigFormProps {
|
|
4
|
+
accounts: IAccountDetails[];
|
|
5
|
+
}
|
|
6
|
+
interface IDeployManifestStageConfigFormState {
|
|
7
|
+
rawManifest: string;
|
|
8
|
+
application: string;
|
|
9
|
+
stack: string;
|
|
10
|
+
details: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class DeployStageForm extends React.Component<IDeployManifestStageConfigFormProps & IFormikStageConfigInjectedProps, IDeployManifestStageConfigFormState> {
|
|
13
|
+
private readonly excludedManifestArtifactTypes;
|
|
14
|
+
constructor(props: IDeployManifestStageConfigFormProps & IFormikStageConfigInjectedProps);
|
|
15
|
+
private getSourceOptions;
|
|
16
|
+
private handleRawManifestChange;
|
|
17
|
+
private onManifestArtifactSelected;
|
|
18
|
+
private onManifestArtifactEdited;
|
|
19
|
+
private getRequiredArtifacts;
|
|
20
|
+
private onRequiredArtifactsChanged;
|
|
21
|
+
render(): JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IArtifact, IPipeline, IStage } from '@spinnaker/core';
|
|
3
|
+
export interface IManifestBindArtifact {
|
|
4
|
+
expectedArtifactId?: string;
|
|
5
|
+
artifact?: IArtifact;
|
|
6
|
+
}
|
|
7
|
+
export interface IManifestBindArtifactsSelectorProps {
|
|
8
|
+
pipeline: IPipeline;
|
|
9
|
+
stage: IStage;
|
|
10
|
+
bindings?: IManifestBindArtifact[];
|
|
11
|
+
onChangeBindings: (_: IManifestBindArtifact[]) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare class ManifestBindArtifactsSelector extends React.Component<IManifestBindArtifactsSelectorProps> {
|
|
14
|
+
private onChangeBinding;
|
|
15
|
+
private onRemoveBinding;
|
|
16
|
+
render(): JSX.Element;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IExecutionDetailsSectionProps, IManifest } from '@spinnaker/core';
|
|
3
|
+
export interface IManifestSubscription {
|
|
4
|
+
id: string;
|
|
5
|
+
unsubscribe: () => void;
|
|
6
|
+
manifest: IManifest;
|
|
7
|
+
}
|
|
8
|
+
export interface IDeployStatusState {
|
|
9
|
+
subscriptions: IManifestSubscription[];
|
|
10
|
+
manifestIds: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare class DeployStatus extends React.Component<IExecutionDetailsSectionProps, IDeployStatusState> {
|
|
13
|
+
static title: string;
|
|
14
|
+
constructor(props: IExecutionDetailsSectionProps);
|
|
15
|
+
componentDidMount(): void;
|
|
16
|
+
componentWillUnmount(): void;
|
|
17
|
+
componentDidUpdate(_prevProps: IExecutionDetailsSectionProps, prevState: IDeployStatusState): void;
|
|
18
|
+
private subscribeToManifestUpdates;
|
|
19
|
+
private unsubscribeAll;
|
|
20
|
+
private stageManifestToIManifest;
|
|
21
|
+
render(): JSX.Element;
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IManifest } from '@spinnaker/core';
|
|
3
|
+
export interface IDeployManifestStatusProps {
|
|
4
|
+
manifest: IManifest;
|
|
5
|
+
}
|
|
6
|
+
export declare class DeployManifestStatusPills extends React.Component<IDeployManifestStatusProps> {
|
|
7
|
+
render(): JSX.Element[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IManifest } from '@spinnaker/core';
|
|
3
|
+
export interface IManifestDetailsProps {
|
|
4
|
+
manifest: IManifest;
|
|
5
|
+
linkName: string;
|
|
6
|
+
accountId: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IManifestDetailsState {
|
|
9
|
+
url: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class ManifestDetailsLink extends React.Component<IManifestDetailsProps, IManifestDetailsState> {
|
|
12
|
+
private spinnakerKindStateMap;
|
|
13
|
+
constructor(props: IManifestDetailsProps);
|
|
14
|
+
private canOpen;
|
|
15
|
+
private spinnakerKindFromCloudrunKind;
|
|
16
|
+
private resourceRegion;
|
|
17
|
+
private getStateParams;
|
|
18
|
+
private loadUrl;
|
|
19
|
+
render(): JSX.Element;
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IManifest } from '@spinnaker/core';
|
|
3
|
+
export interface IManifestEventsProps {
|
|
4
|
+
manifest: IManifest;
|
|
5
|
+
}
|
|
6
|
+
export declare class ManifestEvents extends React.Component<IManifestEventsProps> {
|
|
7
|
+
private pillStyle;
|
|
8
|
+
render(): JSX.Element | JSX.Element[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { IManifest } from '@spinnaker/core';
|
|
3
|
+
import './ManifestStatus.less';
|
|
4
|
+
export interface IManifestStatusProps {
|
|
5
|
+
account: string;
|
|
6
|
+
manifest: IManifest;
|
|
7
|
+
}
|
|
8
|
+
export declare function ManifestStatus({ account, manifest }: IManifestStatusProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IServerGroupNamePreviewProps {
|
|
3
|
+
application: string;
|
|
4
|
+
stack: string;
|
|
5
|
+
details: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class ServerGroupNamePreview extends React.Component<IServerGroupNamePreviewProps> {
|
|
8
|
+
render(): JSX.Element;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLOUDRUN_EDIT_LOAD_BALANCER_STAGE = "spinnaker.cloudrun.pipeline.stage.editLoadBalancerStage";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLOUDRUN_LOAD_BALANCER_CHOICE_MODAL_CTRL = "spinnaker.Cloudrun.loadBalancerChoiceModal.controller";
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { Application, IAccountDetails, IMoniker, IPipeline, IServerGroupCommand, IServerGroupCommandViewState, IStage } from '@spinnaker/core';
|
|
2
|
+
import type { CloudrunDeployDescription } from '../serverGroupTransformer.service';
|
|
3
|
+
export declare enum ServerGroupSource {
|
|
4
|
+
TEXT = "text",
|
|
5
|
+
ARTIFACT = "artifact"
|
|
6
|
+
}
|
|
7
|
+
export interface ICloudrunServerGroupCommandData {
|
|
8
|
+
command: ICloudrunServerGroupCommand;
|
|
9
|
+
metadata: ICloudrunServerGroupCommandMetadata;
|
|
10
|
+
stack: string;
|
|
11
|
+
freeFormDetails: string;
|
|
12
|
+
configFiles: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface ICloudrunServerGroupCommand extends Omit<IServerGroupCommand, 'source' | 'application'> {
|
|
15
|
+
application?: string;
|
|
16
|
+
stack?: string;
|
|
17
|
+
detail?: string;
|
|
18
|
+
account: string;
|
|
19
|
+
configFiles: string[];
|
|
20
|
+
freeFormDetails: string;
|
|
21
|
+
region: string;
|
|
22
|
+
regions: [];
|
|
23
|
+
isNew?: boolean;
|
|
24
|
+
cloudProvider: string;
|
|
25
|
+
provider: string;
|
|
26
|
+
selectedProvider: string;
|
|
27
|
+
manifest: any;
|
|
28
|
+
manifests: any[];
|
|
29
|
+
relationships: ICloudrunServerGroupSpinnakerRelationships;
|
|
30
|
+
moniker: IMoniker;
|
|
31
|
+
manifestArtifactId?: string;
|
|
32
|
+
manifestArtifactAccount?: string;
|
|
33
|
+
source: ServerGroupSource;
|
|
34
|
+
versioned?: boolean;
|
|
35
|
+
gitCredentialType?: string;
|
|
36
|
+
viewState: IServerGroupCommandViewState;
|
|
37
|
+
mode: string;
|
|
38
|
+
credentials: string;
|
|
39
|
+
sourceType: string;
|
|
40
|
+
configArtifacts: any[];
|
|
41
|
+
interestingHealthProviderNames: [];
|
|
42
|
+
fromArtifact: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface IViewState {
|
|
45
|
+
mode: string;
|
|
46
|
+
submitButtonLabel: string;
|
|
47
|
+
disableStrategySelection: boolean;
|
|
48
|
+
stage?: IStage;
|
|
49
|
+
pipeline?: IPipeline;
|
|
50
|
+
}
|
|
51
|
+
export interface ICloudrunServerGroupCommandMetadata {
|
|
52
|
+
backingData: any;
|
|
53
|
+
}
|
|
54
|
+
export interface ICloudrunServerGroupSpinnakerRelationships {
|
|
55
|
+
loadBalancers?: string[];
|
|
56
|
+
securityGroups?: string[];
|
|
57
|
+
}
|
|
58
|
+
export declare class CloudrunV2ServerGroupCommandBuilder {
|
|
59
|
+
buildNewServerGroupCommand(app: Application): PromiseLike<ICloudrunServerGroupCommandData>;
|
|
60
|
+
buildNewServerGroupCommandForPipeline(_stage: IStage, pipeline: IPipeline): any;
|
|
61
|
+
buildServerGroupCommandFromPipeline(app: Application, cluster: CloudrunDeployDescription, _stage: IStage, pipeline: IPipeline): PromiseLike<ICloudrunServerGroupCommandData>;
|
|
62
|
+
}
|
|
63
|
+
export declare class CloudrunServerGroupCommandBuilder {
|
|
64
|
+
static $inject: string[];
|
|
65
|
+
static ServerGroupCommandIsValid(command: ICloudrunServerGroupCommand): boolean;
|
|
66
|
+
static copyAndCleanCommand(input: ICloudrunServerGroupCommand): ICloudrunServerGroupCommand;
|
|
67
|
+
static buildNewServerGroupCommandForPipeline(stage: IStage, pipeline: IPipeline): any;
|
|
68
|
+
private static getExpectedArtifacts;
|
|
69
|
+
static buildServerGroupCommandFromPipeline(app: Application, cluster: CloudrunDeployDescription, _stage: IStage, pipeline: IPipeline): PromiseLike<ICloudrunServerGroupCommandData>;
|
|
70
|
+
static getCredentials(accounts: IAccountDetails[]): string;
|
|
71
|
+
static getRegion(accounts: any[], credentials: string): string;
|
|
72
|
+
static buildNewServerGroupCommand(app: Application, sourceAccount: string, mode: string): PromiseLike<ICloudrunServerGroupCommandData>;
|
|
73
|
+
}
|
|
74
|
+
export declare const CLOUDRUN_SERVER_GROUP_COMMAND_BUILDER = "spinnaker.cloudrun.serverGroup.commandBuilder.service";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { FormikProps } from 'formik';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { Application, IAccount, IServerGroup } from '@spinnaker/core';
|
|
4
|
+
import type { ICloudrunServerGroupCommandData } from '../serverGroupCommandBuilder.service';
|
|
5
|
+
export interface IServerGroupBasicSettingsProps {
|
|
6
|
+
accounts: IAccount[];
|
|
7
|
+
onAccountSelect: (account: string) => void;
|
|
8
|
+
selectedAccount: string;
|
|
9
|
+
formik: IWizardServerGroupBasicSettingsProps['formik'];
|
|
10
|
+
onEnterStack: (stack: string) => void;
|
|
11
|
+
detailsChanged: (detail: string) => void;
|
|
12
|
+
app: Application;
|
|
13
|
+
}
|
|
14
|
+
export interface IServerGroupBasicSettingsState {
|
|
15
|
+
namePreview: string;
|
|
16
|
+
createsNewCluster: boolean;
|
|
17
|
+
latestServerGroup: IServerGroup;
|
|
18
|
+
}
|
|
19
|
+
export declare function ServerGroupBasicSettings({ accounts, onAccountSelect, selectedAccount, formik, onEnterStack, detailsChanged, app, }: IServerGroupBasicSettingsProps): JSX.Element;
|
|
20
|
+
export interface IWizardServerGroupBasicSettingsProps {
|
|
21
|
+
formik: FormikProps<ICloudrunServerGroupCommandData>;
|
|
22
|
+
app: Application;
|
|
23
|
+
}
|
|
24
|
+
export declare class WizardServerGroupBasicSettings extends React.Component<IWizardServerGroupBasicSettingsProps> {
|
|
25
|
+
private accountUpdated;
|
|
26
|
+
private stackChanged;
|
|
27
|
+
private freeFormDetailsChanged;
|
|
28
|
+
render(): JSX.Element;
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FormikProps } from 'formik';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ICloudrunServerGroupCommandData } from '../serverGroupCommandBuilder.service';
|
|
4
|
+
export interface IServerGroupConfigFilesSettingsProps {
|
|
5
|
+
configFiles: string[];
|
|
6
|
+
onEnterConfig: (file: string[]) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function ServerGroupConfigFilesSettings({ configFiles, onEnterConfig }: IServerGroupConfigFilesSettingsProps): JSX.Element;
|
|
9
|
+
export interface IWizardServerGroupConfigFilesSettingsProps {
|
|
10
|
+
formik: FormikProps<ICloudrunServerGroupCommandData>;
|
|
11
|
+
}
|
|
12
|
+
export declare class WizardServerGroupConfigFilesSettings extends React.Component<IWizardServerGroupConfigFilesSettingsProps> {
|
|
13
|
+
private configUpdated;
|
|
14
|
+
render(): JSX.Element;
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Application, IModalComponentProps } from '@spinnaker/core';
|
|
3
|
+
import { TaskMonitor } from '@spinnaker/core';
|
|
4
|
+
import type { ICloudrunServerGroupCommandData } from '../serverGroupCommandBuilder.service';
|
|
5
|
+
export interface ICloudrunServerGroupModalProps extends IModalComponentProps {
|
|
6
|
+
title: string;
|
|
7
|
+
application: Application;
|
|
8
|
+
command: ICloudrunServerGroupCommandData;
|
|
9
|
+
isNew?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ICloudrunServerGroupModalState {
|
|
12
|
+
command: ICloudrunServerGroupCommandData;
|
|
13
|
+
loaded: boolean;
|
|
14
|
+
taskMonitor: TaskMonitor;
|
|
15
|
+
}
|
|
16
|
+
export declare class ServerGroupWizard extends React.Component<ICloudrunServerGroupModalProps, ICloudrunServerGroupModalState> {
|
|
17
|
+
static defaultProps: Partial<ICloudrunServerGroupModalProps>;
|
|
18
|
+
private _isUnmounted;
|
|
19
|
+
static show(props: ICloudrunServerGroupModalProps): Promise<ICloudrunServerGroupCommandData>;
|
|
20
|
+
constructor(props: ICloudrunServerGroupModalProps);
|
|
21
|
+
private onTaskComplete;
|
|
22
|
+
protected onApplicationRefresh: () => void;
|
|
23
|
+
private submit;
|
|
24
|
+
render(): JSX.Element;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLOUDRUN_SERVER_GROUP_DETAILS_CTRL = "spinnaker.cloudrun.serverGroup.details.controller";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { IServerGroup } from '@spinnaker/core';
|
|
2
|
+
import type { ICloudrunServerGroupCommand } from '../serverGroup/configure/serverGroupCommandBuilder.service';
|
|
3
|
+
export declare class CloudrunV2ServerGroupTransformer {
|
|
4
|
+
private $q;
|
|
5
|
+
static $inject: string[];
|
|
6
|
+
constructor($q: ng.IQService);
|
|
7
|
+
normalizeServerGroup(serverGroup: IServerGroup): PromiseLike<IServerGroup>;
|
|
8
|
+
convertServerGroupCommandToDeployConfiguration(command: ICloudrunServerGroupCommand): any;
|
|
9
|
+
}
|
|
10
|
+
export declare class CloudrunDeployDescription {
|
|
11
|
+
cloudProvider: string;
|
|
12
|
+
provider: string;
|
|
13
|
+
credentials: string;
|
|
14
|
+
account: string;
|
|
15
|
+
application: string;
|
|
16
|
+
stack?: string;
|
|
17
|
+
freeFormDetails?: string;
|
|
18
|
+
configFiles: string[];
|
|
19
|
+
region: string;
|
|
20
|
+
strategy?: string;
|
|
21
|
+
type?: string;
|
|
22
|
+
fromArtifact: boolean;
|
|
23
|
+
configArtifacts: string[];
|
|
24
|
+
strategyApplication?: string;
|
|
25
|
+
strategyPipeline?: string;
|
|
26
|
+
gitCredentialType: string;
|
|
27
|
+
interestingHealthProviderNames: string[];
|
|
28
|
+
sourceType: string;
|
|
29
|
+
constructor(command: ICloudrunServerGroupCommand);
|
|
30
|
+
}
|
|
31
|
+
export declare const CLOUDRUN_SERVER_GROUP_TRANSFORMER = "spinnaker.cloudrun.serverGroup.transformer.service";
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@spinnaker/cloudrun",
|
|
3
|
+
"license": "Apache-2.0",
|
|
4
|
+
"version": "0.1.6",
|
|
5
|
+
"module": "dist/index.js",
|
|
6
|
+
"typings": "dist/index.d.ts",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"clean": "shx rm -rf dist",
|
|
12
|
+
"prepublishOnly": "npm run build",
|
|
13
|
+
"build": "npm run clean && spinnaker-scripts build",
|
|
14
|
+
"dev": "spinnaker-scripts start",
|
|
15
|
+
"dev:push": "spinnaker-scripts start --push",
|
|
16
|
+
"lib": "npm run build"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@spinnaker/core": "^0.27.0",
|
|
20
|
+
"@uirouter/angularjs": "1.0.26",
|
|
21
|
+
"@uirouter/react": "1.0.7",
|
|
22
|
+
"angular": "1.8.3",
|
|
23
|
+
"angular-ui-bootstrap": "2.5.0",
|
|
24
|
+
"brace": "0.11.1",
|
|
25
|
+
"dompurify": "^2.3.10",
|
|
26
|
+
"enzyme": "3.11.0",
|
|
27
|
+
"formik": "1.5.1",
|
|
28
|
+
"js-yaml": "3.13.1",
|
|
29
|
+
"lodash": "4.17.21",
|
|
30
|
+
"luxon": "1.28.1",
|
|
31
|
+
"ngimport": "0.6.1",
|
|
32
|
+
"react": "16.14.0",
|
|
33
|
+
"react-ace": "6.4.0",
|
|
34
|
+
"react-bootstrap": "0.32.1",
|
|
35
|
+
"react-ga": "2.4.1",
|
|
36
|
+
"react-select": "1.2.1",
|
|
37
|
+
"react2angular": "3.2.1",
|
|
38
|
+
"rxjs": "6.6.7"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@spinnaker/eslint-plugin": "^3.0.2",
|
|
42
|
+
"@spinnaker/scripts": "^0.3.1",
|
|
43
|
+
"@types/angular": "1.8.5",
|
|
44
|
+
"@types/angular-ui-bootstrap": "0.13.41",
|
|
45
|
+
"@types/dompurify": "^2.3.3",
|
|
46
|
+
"@types/enzyme": "3.10.3",
|
|
47
|
+
"@types/js-yaml": "3.5.30",
|
|
48
|
+
"@types/lodash": "4.14.64",
|
|
49
|
+
"@types/luxon": "1.11.1",
|
|
50
|
+
"@types/react": "16.14.10",
|
|
51
|
+
"@types/react-bootstrap": "0.32.5",
|
|
52
|
+
"@types/react-select": "1.3.4",
|
|
53
|
+
"shx": "0.3.3",
|
|
54
|
+
"typescript": "4.3.5"
|
|
55
|
+
},
|
|
56
|
+
"gitHead": "217b75396c5ec25d9b2019a849593b0b8d52e916"
|
|
57
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { module } from 'angular';
|
|
2
|
+
|
|
3
|
+
import { CloudProviderRegistry, DeploymentStrategyRegistry } from '@spinnaker/core';
|
|
4
|
+
|
|
5
|
+
import { CLOUDRUN_COMPONENT_URL_DETAILS } from './common/componentUrlDetails.component';
|
|
6
|
+
import { CLOUDRUN_LOAD_BALANCER_CREATE_MESSAGE } from './common/loadBalancerMessage.component';
|
|
7
|
+
import './help/cloudrun.help';
|
|
8
|
+
import { CLOUDRUN_INSTANCE_DETAILS_CTRL } from './instance/details/details.controller';
|
|
9
|
+
import { CLOUDRUN_ALLOCATION_CONFIGURATION_ROW } from './loadBalancer/configure/wizard/allocationConfigurationRow.component';
|
|
10
|
+
import { CLOUDRUN_LOAD_BALANCER_BASIC_SETTINGS } from './loadBalancer/configure/wizard/basicSettings.component';
|
|
11
|
+
import { CLOUDRUN_STAGE_ALLOCATION_CONFIGURATION_ROW } from './loadBalancer/configure/wizard/stageAllocationConfigurationRow.component';
|
|
12
|
+
import { CLOUDRUN_LOAD_BALANCER_WIZARD_CTRL } from './loadBalancer/configure/wizard/wizard.controller';
|
|
13
|
+
import { CLOUDRUN_LOAD_BALANCER_DETAILS_CTRL } from './loadBalancer/details/details.controller';
|
|
14
|
+
import { CLOUDRUN_LOAD_BALANCER_TRANSFORMER } from './loadBalancer/loadBalancerTransformer';
|
|
15
|
+
import logo from './logo/cloudrun.logo.png';
|
|
16
|
+
import { CLOUDRUN_PIPELINE_MODULE } from './pipeline/pipeline.module';
|
|
17
|
+
import './pipeline/stages/deployManifest/deployStage';
|
|
18
|
+
import { CLOUDRUN_SERVER_GROUP_COMMAND_BUILDER } from './serverGroup/configure/serverGroupCommandBuilder.service';
|
|
19
|
+
import { ServerGroupWizard } from './serverGroup/configure/wizard/serverGroupWizard';
|
|
20
|
+
import { CLOUDRUN_SERVER_GROUP_DETAILS_CTRL } from './serverGroup/details/details.controller';
|
|
21
|
+
import { CLOUDRUN_SERVER_GROUP_TRANSFORMER } from './serverGroup/serverGroupTransformer.service';
|
|
22
|
+
|
|
23
|
+
import './logo/cloudrun.logo.less';
|
|
24
|
+
|
|
25
|
+
export const CLOUDRUN_MODULE = 'spinnaker.cloudrun';
|
|
26
|
+
|
|
27
|
+
const requires = [
|
|
28
|
+
CLOUDRUN_COMPONENT_URL_DETAILS,
|
|
29
|
+
CLOUDRUN_SERVER_GROUP_COMMAND_BUILDER,
|
|
30
|
+
CLOUDRUN_SERVER_GROUP_DETAILS_CTRL,
|
|
31
|
+
CLOUDRUN_SERVER_GROUP_TRANSFORMER,
|
|
32
|
+
CLOUDRUN_LOAD_BALANCER_TRANSFORMER,
|
|
33
|
+
CLOUDRUN_LOAD_BALANCER_DETAILS_CTRL,
|
|
34
|
+
CLOUDRUN_LOAD_BALANCER_WIZARD_CTRL,
|
|
35
|
+
CLOUDRUN_LOAD_BALANCER_CREATE_MESSAGE,
|
|
36
|
+
CLOUDRUN_ALLOCATION_CONFIGURATION_ROW,
|
|
37
|
+
CLOUDRUN_LOAD_BALANCER_BASIC_SETTINGS,
|
|
38
|
+
CLOUDRUN_STAGE_ALLOCATION_CONFIGURATION_ROW,
|
|
39
|
+
CLOUDRUN_PIPELINE_MODULE,
|
|
40
|
+
CLOUDRUN_INSTANCE_DETAILS_CTRL,
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
module(CLOUDRUN_MODULE, requires).config(() => {
|
|
44
|
+
CloudProviderRegistry.registerProvider('cloudrun', {
|
|
45
|
+
name: 'cloudrun',
|
|
46
|
+
logo: {
|
|
47
|
+
path: logo,
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
instance: {
|
|
51
|
+
detailsTemplateUrl: require('./instance/details/details.html'),
|
|
52
|
+
detailsController: 'cloudrunInstanceDetailsCtrl',
|
|
53
|
+
},
|
|
54
|
+
serverGroup: {
|
|
55
|
+
CloneServerGroupModal: ServerGroupWizard,
|
|
56
|
+
commandBuilder: 'cloudrunV2ServerGroupCommandBuilder',
|
|
57
|
+
detailsController: 'cloudrunV2ServerGroupDetailsCtrl',
|
|
58
|
+
detailsTemplateUrl: require('./serverGroup/details/details.html'),
|
|
59
|
+
transformer: 'cloudrunV2ServerGroupTransformer',
|
|
60
|
+
skipUpstreamStageCheck: true,
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
loadBalancer: {
|
|
64
|
+
transformer: 'cloudrunLoadBalancerTransformer',
|
|
65
|
+
createLoadBalancerTemplateUrl: require('./loadBalancer/configure/wizard/wizard.html'),
|
|
66
|
+
createLoadBalancerController: 'cloudrunLoadBalancerWizardCtrl',
|
|
67
|
+
detailsTemplateUrl: require('./loadBalancer/details/details.html'),
|
|
68
|
+
detailsController: 'cloudrunLoadBalancerDetailsCtrl',
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
DeploymentStrategyRegistry.registerProvider('cloudrun', ['custom', 'redblack', 'rollingpush', 'rollingredblack']);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IProviderSettings } from '@spinnaker/core';
|
|
2
|
+
import { SETTINGS } from '@spinnaker/core';
|
|
3
|
+
|
|
4
|
+
export interface ICloudrunProviderSettings extends IProviderSettings {
|
|
5
|
+
defaults: {
|
|
6
|
+
account?: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const CloudrunProviderSettings: ICloudrunProviderSettings = (SETTINGS.providers
|
|
11
|
+
.cloudrun as ICloudrunProviderSettings) || { defaults: {} };
|
|
12
|
+
if (CloudrunProviderSettings) {
|
|
13
|
+
CloudrunProviderSettings.resetToOriginal = SETTINGS.resetProvider('cloudrun');
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IComponentOptions } from 'angular';
|
|
2
|
+
import { module } from 'angular';
|
|
3
|
+
|
|
4
|
+
const cloudrunComponentUrlDetailsComponent: IComponentOptions = {
|
|
5
|
+
bindings: { component: '<' },
|
|
6
|
+
template: `
|
|
7
|
+
<dt>HTTPS</dt>
|
|
8
|
+
<dl class="small">
|
|
9
|
+
<a href="{{$ctrl.component.url}}" target="_blank">{{$ctrl.component.url}}</a>
|
|
10
|
+
<copy-to-clipboard class="copy-to-clipboard copy-to-clipboard-sm"
|
|
11
|
+
tool-tip="'Copy URL to clipboard'"
|
|
12
|
+
text="$ctrl.component.httpsUrl"></copy-to-clipboard>
|
|
13
|
+
</dl>
|
|
14
|
+
`,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const CLOUDRUN_COMPONENT_URL_DETAILS = 'spinnaker.cloudrun.componentUrlDetails.component';
|
|
18
|
+
|
|
19
|
+
module(CLOUDRUN_COMPONENT_URL_DETAILS, []).component(
|
|
20
|
+
'cloudrunComponentUrlDetails',
|
|
21
|
+
cloudrunComponentUrlDetailsComponent,
|
|
22
|
+
);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IComponentOptions, IController, IFilterService } from 'angular';
|
|
2
|
+
import { module } from 'angular';
|
|
3
|
+
|
|
4
|
+
class CloudrunConditionalDescriptionListItemCtrl implements IController {
|
|
5
|
+
public label: string;
|
|
6
|
+
public key: string;
|
|
7
|
+
public component: any;
|
|
8
|
+
|
|
9
|
+
public static $inject = ['$filter'];
|
|
10
|
+
constructor(private $filter: IFilterService) {}
|
|
11
|
+
|
|
12
|
+
public $onInit(): void {
|
|
13
|
+
if (!this.label) {
|
|
14
|
+
this.label = this.$filter<Function>('robotToHuman')(this.key);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const cloudrunConditionalDescriptionListItem: IComponentOptions = {
|
|
20
|
+
bindings: { label: '@', key: '@', component: '<' },
|
|
21
|
+
transclude: {
|
|
22
|
+
keyLabel: '?keyText',
|
|
23
|
+
valueLabel: '?valueLabel',
|
|
24
|
+
},
|
|
25
|
+
template: `
|
|
26
|
+
<dt ng-if="$ctrl.component[$ctrl.key]">{{$ctrl.label}}<span ng-transclude="keyLabel"></span></dt>
|
|
27
|
+
<dd ng-if="$ctrl.component[$ctrl.key]">{{$ctrl.component[$ctrl.key]}}<span ng-transclude="valueLabel"></span></dd>
|
|
28
|
+
`,
|
|
29
|
+
controller: CloudrunConditionalDescriptionListItemCtrl,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const CLOUDRUN_CONDITIONAL_DESCRIPTION_LIST_ITEM = 'spinnaker.cloudrun.conditionalDescriptionListItem';
|
|
33
|
+
|
|
34
|
+
module(CLOUDRUN_CONDITIONAL_DESCRIPTION_LIST_ITEM, []).component(
|
|
35
|
+
'cloudrunConditionalDtDd',
|
|
36
|
+
cloudrunConditionalDescriptionListItem,
|
|
37
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IInstance } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
export interface ICloudrunInstance extends IInstance {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
account?: string;
|
|
7
|
+
region?: string;
|
|
8
|
+
instanceStatus: 'DYNAMIC' | 'RESIDENT' | 'UNKNOWN';
|
|
9
|
+
launchTime: number;
|
|
10
|
+
loadBalancers: string[];
|
|
11
|
+
serverGroup: string;
|
|
12
|
+
vmDebugEnabled: boolean;
|
|
13
|
+
vmName: string;
|
|
14
|
+
vmStatus: string;
|
|
15
|
+
vmZoneName: string;
|
|
16
|
+
qps: number;
|
|
17
|
+
healthState: string;
|
|
18
|
+
cloudProvider: string;
|
|
19
|
+
errors: number;
|
|
20
|
+
averageLatency: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ILoadBalancer } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
export interface ICloudrunLoadBalancer extends ILoadBalancer {
|
|
4
|
+
credentials?: string;
|
|
5
|
+
split?: ICloudrunTrafficSplit;
|
|
6
|
+
migrateTraffic: boolean;
|
|
7
|
+
dispatchRules?: ICloudrunDispatchRule[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ICloudrunTrafficSplit {
|
|
11
|
+
trafficTargets: [{ revisionName: string; percent: number }];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ICloudrunDispatchRule {
|
|
15
|
+
domain: string;
|
|
16
|
+
path: string;
|
|
17
|
+
service: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-md-offset-{{ $ctrl.columnOffset || 0 }} col-md-{{ $ctrl.columns || 12 }}">
|
|
3
|
+
<div class="well">
|
|
4
|
+
<p>
|
|
5
|
+
<span ng-if="$ctrl.showCreateMessage">Spinnaker cannot create a load balancer for Cloud Run.</span>
|
|
6
|
+
A Spinnaker load balancer maps to an Cloud Run Service, which will be created automatically alongside a
|
|
7
|
+
Revision. Once created, the Service can be edited as a Load Balancer.
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { module } from 'angular';
|
|
2
|
+
|
|
3
|
+
const cloudRunLoadBalancerMessageComponent: ng.IComponentOptions = {
|
|
4
|
+
bindings: { showCreateMessage: '<', columnOffset: '@', columns: '@' },
|
|
5
|
+
templateUrl: require('./loadBalancerMessage.component.html'),
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const CLOUDRUN_LOAD_BALANCER_CREATE_MESSAGE = 'spinnaker.cloudrun.loadBalancer.createMessage.component';
|
|
9
|
+
|
|
10
|
+
module(CLOUDRUN_LOAD_BALANCER_CREATE_MESSAGE, []).component(
|
|
11
|
+
'cloudrunLoadBalancerMessage',
|
|
12
|
+
cloudRunLoadBalancerMessageComponent,
|
|
13
|
+
);
|