Blue/Green Refactor (#229)

* fresh new branch

* Added coverage to gitignore

Signed-off-by: Jaiveer Katariya <jaiveerkatariya@Jaiveers-MBP.lan>

* reverted package-lock.json

Signed-off-by: Jaiveer Katariya <jaiveerkatariya@Jaiveers-MBP.lan>
Co-authored-by: Jaiveer Katariya <jaiveerkatariya@Jaiveers-MBP.lan>
This commit is contained in:
Jaiveer Katariya
2022-08-12 15:47:05 -04:00
committed by GitHub
parent 531cfdcc3d
commit 01a65512ea
31 changed files with 1758 additions and 828 deletions
@@ -8,6 +8,7 @@ import * as kubectlUtils from '../../utilities/trafficSplitUtils'
import * as canaryDeploymentHelper from './canaryHelper'
import {isDeploymentEntity, isServiceEntity} from '../../types/kubernetesTypes'
import {checkForErrors} from '../../utilities/kubectlUtils'
import {inputAnnotations} from '../../inputUtils'
const TRAFFIC_SPLIT_OBJECT_NAME_SUFFIX = '-workflow-rollout'
const TRAFFIC_SPLIT_OBJECT = 'TrafficSplit'
@@ -288,8 +289,7 @@ async function getTrafficSplitObject(
name: string,
stableWeight: number,
baselineWeight: number,
canaryWeight: number,
annotations: {[key: string]: string} = {}
canaryWeight: number
): Promise<string> {
// cached version
if (!trafficSplitAPIVersion) {
@@ -303,7 +303,7 @@ async function getTrafficSplitObject(
kind: 'TrafficSplit',
metadata: {
name: getTrafficSplitResourceName(name),
annotations: annotations
annotations: inputAnnotations
},
spec: {
backends: [