feat(istio): fixes and add simple test

This commit is contained in:
Jaka Hudoklin 2019-02-27 14:18:38 +01:00
parent 33a344119b
commit e1e6173a2c
No known key found for this signature in database
GPG key ID: 6A08896BFD32BD95
6 changed files with 1112 additions and 1040 deletions

View file

@ -32,6 +32,7 @@ let
./k8s/1.13/crd.nix
./k8s/submodule.nix
./k8s/defaults.nix
./istio/bookinfo.nix
./submodules/simple.nix
./submodules/defaults.nix
];

55
tests/istio/bookinfo.nix Normal file
View file

@ -0,0 +1,55 @@
{ config, test, kubenix, k8s, ... }:
with k8s;
{
imports = [
kubenix.k8s
kubenix.istio
];
test = {
name = "istio-bookinfo";
description = "Simple istio bookinfo application (WIP)";
};
kubernetes.api."networking.istio.io"."v1alpha3" = {
Gateway."bookinfo-gateway" = {
spec = {
selector.istio = "ingressgateway";
servers = [{
port = {
number = 80;
name = "http";
protocol = "HTTP";
};
hosts = ["*"];
}];
};
};
VirtualService.bookinfo = {
spec = {
hosts = ["*"];
gateways = ["bookinfo-gateway"];
http = [{
match = [{
uri.exact = "/productpage";
} {
uri.exact = "/login";
} {
uri.exact = "/logout";
} {
uri.prefix = "/api/v1/products";
}];
route = [{
destination = {
host = "productpage";
port.number = 9080;
};
}];
}];
};
};
};
}