mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-25 22:29:26 +08:00
Added Traffic split annotations (#215)
* Added Traffic split annotations * traffic split - blueGreen deployment * traffic split - canary deployment * Traffic split annotations - canary deployment * updated Readme and action.yml * Traffic split - canary deployment * clean code * Clean code * Clean code * Create annotation object * Updated Readme and action.yml * Spelling correction Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com>
This commit is contained in:
+7
-3
@@ -6,6 +6,7 @@ import {reject} from './actions/reject'
|
||||
import {Action, parseAction} from './types/action'
|
||||
import {parseDeploymentStrategy} from './types/deploymentStrategy'
|
||||
import {getFilesFromDirectories} from './utilities/fileUtils'
|
||||
import {parseAnnotations} from './types/annotations'
|
||||
|
||||
export async function run() {
|
||||
// verify kubeconfig is set
|
||||
@@ -18,6 +19,9 @@ export async function run() {
|
||||
const action: Action | undefined = parseAction(
|
||||
core.getInput('action', {required: true})
|
||||
)
|
||||
const annotations = parseAnnotations(
|
||||
core.getInput('annotations', {required: false})
|
||||
)
|
||||
const strategy = parseDeploymentStrategy(core.getInput('strategy'))
|
||||
const manifestsInput = core.getInput('manifests', {required: true})
|
||||
const manifestFilePaths = manifestsInput
|
||||
@@ -34,15 +38,15 @@ export async function run() {
|
||||
// run action
|
||||
switch (action) {
|
||||
case Action.DEPLOY: {
|
||||
await deploy(kubectl, fullManifestFilePaths, strategy)
|
||||
await deploy(kubectl, fullManifestFilePaths, strategy, annotations)
|
||||
break
|
||||
}
|
||||
case Action.PROMOTE: {
|
||||
await promote(kubectl, fullManifestFilePaths, strategy)
|
||||
await promote(kubectl, fullManifestFilePaths, strategy, annotations)
|
||||
break
|
||||
}
|
||||
case Action.REJECT: {
|
||||
await reject(kubectl, fullManifestFilePaths, strategy)
|
||||
await reject(kubectl, fullManifestFilePaths, strategy, annotations)
|
||||
break
|
||||
}
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user