This commit is contained in:
GTrunSec 2022-04-02 12:40:35 -07:00
parent a0ce293db8
commit 60592d3096
No known key found for this signature in database
GPG key ID: 2368FAFA4ABDD2A0
55 changed files with 23668 additions and 30925 deletions

View file

@ -1,7 +1,9 @@
{ config, kubenix, ... }:
{
imports = with kubenix.modules; [ test k8s istio ];
config,
kubenix,
...
}: {
imports = with kubenix.modules; [test k8s istio];
test = {
name = "istio-bookinfo";
@ -12,61 +14,72 @@
Gateway."bookinfo-gateway" = {
spec = {
selector.istio = "ingressgateway";
servers = [{
port = {
number = 80;
name = "http";
protocol = "HTTP";
};
hosts = [ "*" ];
}];
servers = [
{
port = {
number = 80;
name = "http";
protocol = "HTTP";
};
hosts = ["*"];
}
];
};
};
VirtualService.bookinfo = {
spec = {
hosts = [ "*" ];
gateways = [ "bookinfo-gateway" ];
http = [{
match = [{
uri.exact = "/productpage";
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;
};
}
];
}
{
uri.exact = "/login";
}
{
uri.exact = "/logout";
}
{
uri.prefix = "/api/v1/products";
}];
route = [{
destination = {
host = "productpage";
port.number = 9080;
};
}];
}];
];
};
};
DestinationRule.productpage = {
spec = {
host = "productpage";
subsets = [{
name = "v1";
labels.version = "v1";
}];
subsets = [
{
name = "v1";
labels.version = "v1";
}
];
};
};
DestinationRule.reviews = {
spec = {
host = "reviews";
subsets = [{
name = "v1";
labels.version = "v1";
}
subsets = [
{
name = "v1";
labels.version = "v1";
}
{
name = "v2";
labels.version = "v2";
@ -74,17 +87,19 @@
{
name = "v3";
labels.version = "v3";
}];
}
];
};
};
DestinationRule.ratings = {
spec = {
host = "ratings";
subsets = [{
name = "v1";
labels.version = "v1";
}
subsets = [
{
name = "v1";
labels.version = "v1";
}
{
name = "v2";
labels.version = "v2";
@ -96,21 +111,24 @@
{
name = "v2-mysql-vm";
labels.version = "v2-mysql-vm";
}];
}
];
};
};
DestinationRule.details = {
spec = {
host = "details";
subsets = [{
name = "v1";
labels.version = "v1";
}
subsets = [
{
name = "v1";
labels.version = "v1";
}
{
name = "v2";
labels.version = "v2";
}];
}
];
};
};
};