deploy(tenant): add bluejay.dev edge controls

This commit is contained in:
Andrew Stoltz
2026-06-18 12:56:41 -05:00
parent b015c8a8e1
commit 6e0d33b5b9
5 changed files with 94 additions and 10 deletions

View File

@@ -1110,9 +1110,10 @@ public sealed class FleetManifestLintTests
servicePort.GetProperty("targetPort").GetInt32().Should().Be(8080);
using var ingressRoute = JsonDocument.Parse(File.ReadAllText(Path.Combine(appRoot, "ingressroute-andrew-web.json")));
var serviceRef = ingressRoute.RootElement
var route = ingressRoute.RootElement
.GetProperty("spec")
.GetProperty("routes")[0]
.GetProperty("routes")[0];
var serviceRef = route
.GetProperty("services")
.EnumerateArray()
.Should()
@@ -1120,6 +1121,31 @@ public sealed class FleetManifestLintTests
.Subject;
serviceRef.GetProperty("name").GetString().Should().Be("andrew-web-waf");
serviceRef.GetProperty("port").GetInt32().Should().Be(8080);
route.GetProperty("middlewares")
.EnumerateArray()
.Select(item => item.GetProperty("name").GetString())
.Should()
.Equal("andrew-tenant-rate-limit", "andrew-tenant-secure-headers");
using var rateLimit = JsonDocument.Parse(File.ReadAllText(Path.Combine(appRoot, "middleware-andrew-tenant-rate-limit.json")));
rateLimit.RootElement.GetProperty("spec").GetProperty("rateLimit").GetProperty("average").GetInt32().Should().Be(120);
using var headers = JsonDocument.Parse(File.ReadAllText(Path.Combine(appRoot, "middleware-andrew-tenant-secure-headers.json")));
var headerSpec = headers.RootElement.GetProperty("spec").GetProperty("headers");
headerSpec.GetProperty("contentTypeNosniff").GetBoolean().Should().BeTrue();
headerSpec.GetProperty("stsSeconds").GetInt32().Should().Be(31536000);
using var tlsOption = JsonDocument.Parse(File.ReadAllText(Path.Combine(appRoot, "tlsoption-andrew-tenant-tls13.json")));
tlsOption.RootElement.GetProperty("spec").GetProperty("minVersion").GetString().Should().Be("VersionTLS13");
ingressRoute.RootElement
.GetProperty("spec")
.GetProperty("tls")
.GetProperty("options")
.GetProperty("name")
.GetString()
.Should()
.Be("andrew-tenant-tls13");
}
[Fact]