added blue green strategy (#47)

* added blue green strategy

* Addressed review comments

* addressed pr comments

* updated names in test

* addressed final pr comments
This commit is contained in:
Sundar
2020-07-13 08:59:05 +05:30
committed by GitHub
parent c9b54fdae2
commit b4bc3003e8
26 changed files with 2893 additions and 175 deletions
+9
View File
@@ -5,6 +5,7 @@ import * as yaml from 'js-yaml';
import { Resource } from '../kubectl-object-model';
import { KubernetesWorkload, deploymentTypes, workloadTypes } from '../constants';
import { StringComparer, isEqual } from './string-comparison';
const INGRESS = "Ingress";
export function isDeploymentEntity(kind: string): boolean {
if (!kind) {
@@ -34,6 +35,14 @@ export function isServiceEntity(kind: string): boolean {
return isEqual("Service", kind, StringComparer.OrdinalIgnoreCase);
}
export function isIngressEntity(kind: string): boolean {
if (!kind) {
throw('ResourceKindNotDefined');
}
return isEqual(INGRESS, kind, StringComparer.OrdinalIgnoreCase);
}
export function getReplicaCount(inputObject: any): any {
if (!inputObject) {
throw ('NullInputObject');