Skip to content

Commit

Permalink
Begin working on flagger integration (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino authored Dec 15, 2023
1 parent ba2296c commit 4305b47
Show file tree
Hide file tree
Showing 27 changed files with 1,795 additions and 11 deletions.
1 change: 1 addition & 0 deletions assets/src/components/cd/pipelines/nodes/StageNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const serviceStateToCardStatus = {
[ServiceDeploymentStatus.Synced]: 'ok',
[ServiceDeploymentStatus.Stale]: 'pending',
[ServiceDeploymentStatus.Failed]: 'closed',
[ServiceDeploymentStatus.Paused]: 'pending',
} as const satisfies Record<ServiceDeploymentStatus, CardStatus>

export enum StageStatus {
Expand Down
2 changes: 2 additions & 0 deletions assets/src/components/cd/services/ServiceStatusChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const serviceStatusToLabel = createMapperWithFallback<
HEALTHY: 'Healthy',
STALE: 'Stale',
SYNCED: 'Synced',
PAUSED: 'Paused',
},
'Unknown'
)
Expand All @@ -25,6 +26,7 @@ export const serviceStatusToSeverity = createMapperWithFallback<
HEALTHY: 'success',
STALE: 'warning',
SYNCED: 'info',
PAUSED: 'info',
},
'neutral'
)
Expand Down
3 changes: 3 additions & 0 deletions assets/src/components/cd/services/ServicesFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export const statusTabs = Object.entries({
[ServiceDeploymentStatus.Stale]: {
label: serviceStatusToLabel(ServiceDeploymentStatus.Stale),
},
[ServiceDeploymentStatus.Paused]: {
label: serviceStatusToLabel(ServiceDeploymentStatus.Paused),
},
[ServiceDeploymentStatus.Failed]: {
label: serviceStatusToLabel(ServiceDeploymentStatus.Failed),
},
Expand Down
66 changes: 66 additions & 0 deletions assets/src/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,47 @@ export enum BuildType {
Install = 'INSTALL'
}

export type Canary = {
__typename?: 'Canary';
canaryDeployment?: Maybe<Deployment>;
events?: Maybe<Array<Maybe<Event>>>;
ingress?: Maybe<Ingress>;
ingressPrimary?: Maybe<Ingress>;
metadata: Metadata;
primaryDeployment?: Maybe<Deployment>;
raw: Scalars['String']['output'];
spec: CanarySpec;
status: CanaryStatus;
};

export type CanaryAnalysis = {
__typename?: 'CanaryAnalysis';
interval?: Maybe<Scalars['String']['output']>;
maxWeight?: Maybe<Scalars['Int']['output']>;
stepWeight?: Maybe<Scalars['Int']['output']>;
stepWeights?: Maybe<Array<Maybe<Scalars['Int']['output']>>>;
threshold?: Maybe<Scalars['Int']['output']>;
};

export type CanarySpec = {
__typename?: 'CanarySpec';
analysis?: Maybe<CanaryAnalysis>;
autoscalerRef?: Maybe<TargetRef>;
ingressRef?: Maybe<TargetRef>;
provider?: Maybe<Scalars['String']['output']>;
targetRef?: Maybe<TargetRef>;
};

export type CanaryStatus = {
__typename?: 'CanaryStatus';
canaryWeight?: Maybe<Scalars['Int']['output']>;
conditions?: Maybe<Array<Maybe<StatusCondition>>>;
failedChecks?: Maybe<Scalars['Int']['output']>;
iterations?: Maybe<Scalars['Int']['output']>;
lastTransitionTime?: Maybe<Scalars['String']['output']>;
phase?: Maybe<Scalars['String']['output']>;
};

export type Certificate = {
__typename?: 'Certificate';
events?: Maybe<Array<Maybe<Event>>>;
Expand Down Expand Up @@ -2464,6 +2505,8 @@ export type RootMutationType = {
overlayConfiguration?: Maybe<Build>;
/** a regular status ping to be sent by the deploy operator */
pingCluster?: Maybe<Cluster>;
/** marks a service as being able to proceed to the next stage of a canary rollout */
proceed?: Maybe<ServiceDeployment>;
readNotifications?: Maybe<User>;
/** registers a list of runtime services discovered for the current cluster */
registerRuntimeServices?: Maybe<Scalars['Int']['output']>;
Expand Down Expand Up @@ -2770,6 +2813,13 @@ export type RootMutationTypePingClusterArgs = {
};


export type RootMutationTypeProceedArgs = {
cluster?: InputMaybe<Scalars['String']['input']>;
id?: InputMaybe<Scalars['ID']['input']>;
name?: InputMaybe<Scalars['String']['input']>;
};


export type RootMutationTypeRegisterRuntimeServicesArgs = {
serviceId?: InputMaybe<Scalars['ID']['input']>;
services?: InputMaybe<Array<InputMaybe<RuntimeServiceAttributes>>>;
Expand Down Expand Up @@ -2916,6 +2966,7 @@ export type RootQueryType = {
buildInfo?: Maybe<BuildInfo>;
builds?: Maybe<BuildConnection>;
cachedPods?: Maybe<Array<Maybe<Pod>>>;
canary?: Maybe<Canary>;
certificate?: Maybe<Certificate>;
/** fetches an individual cluster */
cluster?: Maybe<Cluster>;
Expand Down Expand Up @@ -3060,6 +3111,13 @@ export type RootQueryTypeCachedPodsArgs = {
};


export type RootQueryTypeCanaryArgs = {
name: Scalars['String']['input'];
namespace: Scalars['String']['input'];
serviceId?: InputMaybe<Scalars['ID']['input']>;
};


export type RootQueryTypeCertificateArgs = {
name: Scalars['String']['input'];
namespace: Scalars['String']['input'];
Expand Down Expand Up @@ -3802,6 +3860,7 @@ export type ServiceDeploymentEdge = {
export enum ServiceDeploymentStatus {
Failed = 'FAILED',
Healthy = 'HEALTHY',
Paused = 'PAUSED',
Stale = 'STALE',
Synced = 'SYNCED'
}
Expand Down Expand Up @@ -4002,6 +4061,13 @@ export type TaintAttributes = {
value: Scalars['String']['input'];
};

export type TargetRef = {
__typename?: 'TargetRef';
apiVersion?: Maybe<Scalars['String']['output']>;
kind?: Maybe<Scalars['String']['output']>;
name?: Maybe<Scalars['String']['output']>;
};

export type TerminatedState = {
__typename?: 'TerminatedState';
exitCode?: Maybe<Scalars['Int']['output']>;
Expand Down
Loading

0 comments on commit 4305b47

Please sign in to comment.