@kubernetes-models/argo-rollouts
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

@kubernetes-models/argo-rollouts

Argo Rollouts models.

Installation

Install with npm.

npm install @kubernetes-models/argo-rollouts

Usage

import { Rollout } from "@kubernetes-models/argo-rollouts/argoproj.io/v1alpha1/Rollout";

// Create a new Rollout
const rollout = new Rollout({
  metadata: {
    name: "rollouts-demo"
  },
  spec: {
    replicas: 5,
    strategy: {
      canary: {
        steps: [
          { setWeight: 20 },
          { pause: {} },
          { setWeight: 40 },
          { pause: { duration: 10 } }
        ]
      }
    },
    revisionHistoryLimit: 2,
    selector: {
      matchLabels: {
        app: "rollouts-demo"
      }
    },
    template: {
      metadata: {
        labels: {
          app: "rollouts-demo"
        }
      },
      spec: {
        containers: [
          {
            name: "rollouts-demo",
            image: "argoproj/rollouts-demo:blue"
          }
        ]
      }
    }
  }
});

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

License

MIT

Package Sidebar

Install

npm i @kubernetes-models/argo-rollouts

Weekly Downloads

609

Version

0.4.0

License

MIT

Unpacked Size

2 MB

Total Files

37

Last publish

Collaborators

  • tommy351