@soft-stech/smi
v0.1.0
Published
Service Mesh Interface (SMI) models
Downloads
6
Readme
@kubernetes-models/smi
Service Mesh Interface (SMI) models.
Installation
Install with npm.
npm install @kubernetes-models/smi
Usage
import { TrafficSplit } from "@kubernetes-models/smi/split.smi-spec.io/v1alpha4/TrafficSplit";
// Create a new TrafficSplit
const split = new TrafficSplit({
metadata: { name: "example" },
spec: {
service: "example",
backends: [
{ service: "example-v1", weight: 90 },
{ service: "example-v2", weight: 10 }
]
}
});
// Validate against JSON schema
split.validate();
License
MIT