mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-07-01 01:39:26 +08:00
Add timeout to the rollout status (#425)
* Added timeout to the rollout status and tests for it * Fixed integration test errors * Fix for blue green integration test * Probable fix for integration errors * No jobs run error fixed * Changed timeout to file level constant * Added parsing logic for timeout * Made tests more concise * implemented timeout validation check in an extracted utils mod * Changed function name to parseDuration * Removed timeout parameter from getResource --------- Co-authored-by: David Gamero <david340804@gmail.com> Co-authored-by: Suneha Bose <123775811+bosesuneha@users.noreply.github.com>
This commit is contained in:
@@ -11,7 +11,8 @@ import {validateTrafficSplitsState} from './smiBlueGreenHelper'
|
||||
|
||||
export async function promoteBlueGreenIngress(
|
||||
kubectl: Kubectl,
|
||||
manifestObjects
|
||||
manifestObjects,
|
||||
timeout?: string
|
||||
): Promise<BlueGreenDeployment> {
|
||||
//checking if anything to promote
|
||||
const {areValid, invalidIngresses} = await validateIngresses(
|
||||
@@ -32,7 +33,8 @@ export async function promoteBlueGreenIngress(
|
||||
manifestObjects.deploymentEntityList,
|
||||
manifestObjects.serviceEntityList
|
||||
),
|
||||
NONE_LABEL_VALUE
|
||||
NONE_LABEL_VALUE,
|
||||
timeout
|
||||
)
|
||||
|
||||
// create stable services with new configuration
|
||||
@@ -41,7 +43,8 @@ export async function promoteBlueGreenIngress(
|
||||
|
||||
export async function promoteBlueGreenService(
|
||||
kubectl: Kubectl,
|
||||
manifestObjects
|
||||
manifestObjects,
|
||||
timeout?: string
|
||||
): Promise<BlueGreenDeployment> {
|
||||
// checking if services are in the right state ie. targeting green deployments
|
||||
if (
|
||||
@@ -54,13 +57,15 @@ export async function promoteBlueGreenService(
|
||||
return await deployWithLabel(
|
||||
kubectl,
|
||||
manifestObjects.deploymentEntityList,
|
||||
NONE_LABEL_VALUE
|
||||
NONE_LABEL_VALUE,
|
||||
timeout
|
||||
)
|
||||
}
|
||||
|
||||
export async function promoteBlueGreenSMI(
|
||||
kubectl: Kubectl,
|
||||
manifestObjects
|
||||
manifestObjects,
|
||||
timeout?: string
|
||||
): Promise<BlueGreenDeployment> {
|
||||
// checking if there is something to promote
|
||||
if (
|
||||
@@ -76,6 +81,7 @@ export async function promoteBlueGreenSMI(
|
||||
return await deployWithLabel(
|
||||
kubectl,
|
||||
manifestObjects.deploymentEntityList,
|
||||
NONE_LABEL_VALUE
|
||||
NONE_LABEL_VALUE,
|
||||
timeout
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user