mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-26 14:49:26 +08:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user