Cilium CRD.
Install with npm.
npm install @kubernetes-models/cilium
import { CiliumLocalRedirectPolicy } from "@kubernetes-models/cilium/cilium.io/v2/CiliumLocalRedirectPolicy";
const lrp = new CiliumLocalRedirectPolicy({
metadata: {
name: "lrp"
},
spec: {
redirectFrontend: {
serviceMatcher: {
serviceName: "my-service",
namespace: "default"
}
},
redirectBackend: {
localEndpointSelector: {
matchLabels: {
name: "proxy"
}
},
toPorts: [
{
port: "8080",
protocol: "TCP"
}
]
}
}
});
// Validate against JSON schema
lrp.validate();
MIT