in src/strategyHelpers/blueGreen/deploy.ts [99:131]
export async function deployBlueGreenIngress(
kubectl: Kubectl,
filePaths: string[]
): Promise<BlueGreenDeployment> {
// get all kubernetes objects defined in manifest files
const manifestObjects: BlueGreenManifests = getManifestObjects(filePaths)
// create deployments with green label value
const servicesAndDeployments = [].concat(
manifestObjects.deploymentEntityList,
manifestObjects.serviceEntityList
)
const workloadDeployment: BlueGreenDeployment = await deployWithLabel(
kubectl,
servicesAndDeployments,
GREEN_LABEL_VALUE
)
const otherObjects = [].concat(
manifestObjects.otherObjects,
manifestObjects.unroutedServiceEntityList
)
await deployObjects(kubectl, otherObjects)
core.debug(
`new objects after processing services and other objects: \n
${JSON.stringify(servicesAndDeployments)}`
)
return {
deployResult: workloadDeployment.deployResult,
objects: [].concat(workloadDeployment.objects, otherObjects)
}
}