0.3.1 • Published 1 month ago

@kubernetes-models/flagger v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@kubernetes-models/flagger

Flagger models.

Installation

Install with npm.

npm install @kubernetes-models/flagger

Usage

import { Canary } from "@kubernetes-models/flagger/flagger.app/v1beta1/Canary";

// Create a new Canary
const canary = new Canary({
  metadata: {
    name: "example"
  },
  spec: {
    targetRef: {
      apiVersion: "apps/v1",
      kind: "Deployment",
      name: "example"
    },
    service: { port: 9898 },
    analysis: {
      interval: "1m",
      threshold: 10,
      maxWeight: 50,
      stepWeight: 5
    }
  }
});

// Validate against JSON schema
canary.validate();

License

MIT