mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-29 16:29:27 +08:00
Make annotating resources optional (#287)
* Make annotating resources optional * Clarify descriptions * Update README * Refactor retrieving pods * Remove annotating resources check in deploy.ts * Add resource annotation integration test * Move resource annotation integration test to seperate file * Lint code * Remove temporary debugging statements * Fix integration test name * Fix test * Abstracting out repeated logic between verifyDeployment and verifyService * Fix formattin * Fix reference * Fix test * Refactor test * Update ubuntu version to latest on canary SMI test * Update ubuntu version to latest on canary SMI test * Make annotating resources optional Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Clarify descriptions Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Update README Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Refactor retrieving pods Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Remove annotating resources check in deploy.ts Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Add resource annotation integration test Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Move resource annotation integration test to seperate file Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Lint code Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Remove temporary debugging statements Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Fix integration test name Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Fix test Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Abstracting out repeated logic between verifyDeployment and verifyService Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Fix formattin Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Fix reference Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Fix test Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Refactor test Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> * Update ubuntu version to latest on canary SMI test Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl> --------- Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>
This commit is contained in:
+2
-19
@@ -129,19 +129,13 @@ async function promoteCanary(kubectl: Kubectl, manifests: string[]) {
|
||||
|
||||
// annotate resources
|
||||
core.startGroup('Annotating resources')
|
||||
let allPods
|
||||
try {
|
||||
allPods = JSON.parse((await kubectl.getAllPods()).stdout)
|
||||
} catch (e) {
|
||||
core.debug(`Unable to parse pods: ${e}`)
|
||||
}
|
||||
const resources: Resource[] = getResources(
|
||||
filesToAnnotate,
|
||||
models.DEPLOYMENT_TYPES.concat([
|
||||
models.DiscoveryAndLoadBalancerResource.SERVICE
|
||||
])
|
||||
)
|
||||
await annotateAndLabelResources(filesToAnnotate, kubectl, resources, allPods)
|
||||
await annotateAndLabelResources(filesToAnnotate, kubectl, resources)
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
@@ -219,17 +213,6 @@ async function promoteBlueGreen(kubectl: Kubectl, manifests: string[]) {
|
||||
|
||||
// annotate resources
|
||||
core.startGroup('Annotating resources')
|
||||
let allPods
|
||||
try {
|
||||
allPods = JSON.parse((await kubectl.getAllPods()).stdout)
|
||||
} catch (e) {
|
||||
core.debug(`Unable to parse pods: ${e}`)
|
||||
}
|
||||
await annotateAndLabelResources(
|
||||
deployedManifestFiles,
|
||||
kubectl,
|
||||
resources,
|
||||
allPods
|
||||
)
|
||||
await annotateAndLabelResources(deployedManifestFiles, kubectl, resources)
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user