deploy(updater): contain public UpdateCenter on GX10
This commit is contained in:
@@ -43,5 +43,6 @@ shared origin cert must exist in every namespace that serves a
|
||||
```powershell
|
||||
kubectl.exe --kubeconfig C:\Users\AndrewStoltz\.kube\rke2.yaml -n argocd get application infra-fc-updater
|
||||
kubectl.exe --kubeconfig C:\Users\AndrewStoltz\.kube\rke2.yaml -n fc-updater get deploy,svc,ingressroute,certificate,pvc
|
||||
curl.exe -sk https://update.flowercore.io/api/v1/manifests/_schema
|
||||
curl.exe -sk https://update.flowercore.io/
|
||||
curl.exe -sk -o NUL -w "%{http_code}`n" https://update.flowercore.io/login
|
||||
```
|
||||
|
||||
@@ -61,7 +61,7 @@ spec:
|
||||
nodeName: rke2-server
|
||||
containers:
|
||||
- name: web
|
||||
image: localhost/fc-updater-web:v20260614-regroup-bdf4a4a
|
||||
image: localhost/fc-updater-web:v20260618-public-containment-8c5386e
|
||||
imagePullPolicy: Never
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
@@ -266,7 +266,7 @@ spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: (Host(`update.flowercore.io`) || Host(`updates.flowercore.io`)) && (Method(`GET`) || Method(`HEAD`) || Method(`POST`) || Method(`OPTIONS`))
|
||||
- match: (Host(`update.flowercore.io`) || Host(`updates.flowercore.io`)) && (Method(`GET`) || Method(`HEAD`))
|
||||
kind: Rule
|
||||
services:
|
||||
- name: updatecenter-web
|
||||
|
||||
@@ -1223,6 +1223,22 @@ public sealed class FleetManifestLintTests
|
||||
match.Should().NotContain("Method(`POST`)");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void UpdateCenterPublicIngress_KeepsDeliveryOnlyGetHeadMethodAllowlist()
|
||||
{
|
||||
var publicIngress = AppDocuments("fc-updater")
|
||||
.Single(document => document.Kind == "IngressRoute" && document.Name == "updatecenter-web-public");
|
||||
var route = publicIngress.MappingSequence("spec", "routes").Should().ContainSingle().Subject;
|
||||
var match = ManifestNodeExtensions.Scalar(route, "match");
|
||||
|
||||
match.Should().Contain("Host(`update.flowercore.io`)");
|
||||
match.Should().Contain("Host(`updates.flowercore.io`)");
|
||||
match.Should().Contain("Method(`GET`)");
|
||||
match.Should().Contain("Method(`HEAD`)");
|
||||
match.Should().NotContain("Method(`POST`)");
|
||||
match.Should().NotContain("Method(`OPTIONS`)");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DnsAndMediaIngressRoutes_MatchLiveInternalHosts()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user