@blastz/kx

0.10.0 • Public • Published

kx

Kubernetes application generator.

Installation

npm install -g @blastz/kx

Usage

Create new workspace(chart)

kx create [workspace-name]

Update sdk(templates)

kx update .

Create new app(values yaml file)

kx g values [app-name]

Canary deployment

Canary deployment depend on istio, check your kubernetes environment before use this feature.

Basic traffic routing based on header

Add below config into your values file

canaryDeployment:
  enable: true
  token:
    key: canary-token
    value: abc123
  image:
    tag: 20220923-6a11d0f

This will create Canary Deployment, VirtualService and DestinationRule, when the request with header canary-token and the value is abc123 the traffic will route to the canary pod otherwise it will goto stable pod.

Use ingress gateway

Add below config into values file

gateway:
  hosts:
    - "*.yourdomain.com"

Full configuration list

interface Config {
  canaryDeployment?: {
    enable: boolean;
    token: {
      key: string;
      value: string;
    };
    image: {
      tag: string;
    };
    config?: {
      path: string;
      version: string;
    };
  };
}

Readme

Keywords

none

Package Sidebar

Install

npm i @blastz/kx

Weekly Downloads

0

Version

0.10.0

License

ISC

Unpacked Size

104 kB

Total Files

229

Last publish

Collaborators

  • blastz