in src/strategyHelpers/canary/smiCanaryHelper.ts [289:318]
throw Error('Percentage must be between 0 and 100')
const percentageWithMuliplier = percentage * 10
const baselineAndCanaryWeight = percentageWithMuliplier / 2
const stableDeploymentWeight = 1000 - percentageWithMuliplier
core.debug(
'Creating the traffic object with canary weight: ' +
baselineAndCanaryWeight +
', baseline weight: ' +
baselineAndCanaryWeight +
', stable weight: ' +
stableDeploymentWeight
)
return await createTrafficSplitManifestFile(
kubectl,
serviceName,
stableDeploymentWeight,
baselineAndCanaryWeight,
baselineAndCanaryWeight
)
}
async function createTrafficSplitManifestFile(
kubectl: Kubectl,
serviceName: string,
stableWeight: number,
baselineWeight: number,
canaryWeight: number
): Promise<string> {