Skip to content

Agent Mesh

Add helm-template make target. Reduce comments

Tomas Tormoe356126b0cd2
diff --git a/Makefile b/Makefile
index aa965981..39afef81 100644
--- a/Makefile
+++ b/Makefile
@@ -194,6 +194,12 @@ helm-lint:
fi; \
$$HELM_BIN lint ./charts/sam-mesh
+# render the chart to bin/chart/ for inspection; pass extra flags via ARGS, e.g. ARGS="--set gateway.enabled=true"
+.PHONY: helm-template
+helm-template:
+ rm -rf bin/chart
+ helm template sam-mesh ./charts/sam-mesh --output-dir bin/chart $(ARGS)
+
lint: fmt helm-lint
hack/lint.sh
diff --git a/charts/sam-mesh/README.md b/charts/sam-mesh/README.md
index 4399b93e..600e7330 100644
--- a/charts/sam-mesh/README.md
+++ b/charts/sam-mesh/README.md
@@ -2,7 +2,7 @@
Deploys a self-contained SAM mesh (control plane, router, console, and an
in-cluster Postgres) for local development, testing, or self-hosting your
-own hub.
+own mesh.
> For large-scale production deployments (GKE/EKS/AKS) using externally
> managed Postgres/DNS/OIDC, see the
@@ -81,11 +81,11 @@ The route exposes only the control plane's enrollment surface (`/register`,
including `/admin` and `/user`, is unrouted. `gateway.adminRoute: true`
additionally routes `/admin` — a dev convenience, leave it off in production.
-The console rules mirror the cloud deployment exactly: the bare prefix
-(`/console`) is answered with a 302 to `/console/`, and a `URLRewrite` filter
-strips the prefix before the request reaches the console. `URLRewrite` is
-**Extended** (not core) Gateway API conformance, so the provider must support
-it. Set `gateway.consolePath: ""` to leave the console unrouted.
+For the console, the bare prefix (`/console`) is answered with a 302 to
+`/console/`, and a `URLRewrite` filter strips the prefix before the request
+reaches the console. `URLRewrite` is **Extended** (not core) Gateway API
+conformance, so the provider must support it. Set `gateway.consolePath: ""`
+to leave the console unrouted.
`listeners`, `hostnames`, `addresses` and `annotations` are passed through to
the Gateway API objects verbatim, so anything the spec allows is expressible.
@@ -106,14 +106,14 @@ gateway:
allowedRoutes:
namespaces:
from: Same
- hostnames: [hub.example.com]
+ hostnames: [sam.example.com]
addresses:
- type: NamedAddress
- value: sam-hub-ip
+ value: sam-cp-ip
```
## OIDC login for the console
There is no bundled Dex. Point `controlPlane.oidcIssuer` at your identity
-provider and register `https://<hub-hostname><consolePath>/auth/callback` as
+provider and register `https://<control-plane-hostname><consolePath>/auth/callback` as
a redirect URI for the OIDC client the control plane reports.
diff --git a/charts/sam-mesh/values.yaml b/charts/sam-mesh/values.yaml
index 1a82c2d3..75f11b5e 100644
--- a/charts/sam-mesh/values.yaml
+++ b/charts/sam-mesh/values.yaml
@@ -3,21 +3,16 @@ global:
imagePullPolicy: IfNotPresent
# One Gateway fronting the mesh: the control plane's enrollment surface plus the console
-# under gateway.consolePath, mirroring the cloud deployment.
+# under gateway.consolePath.
gateway:
enabled: false
# Required when enabled. No default: the GatewayClass is provider-specific, e.g.
# cloud-provider-kind in kind, gke-l7-global-external-managed on GKE.
className: ""
- # Routes the control plane's /admin API. Dev only; the cloud leaves it unrouted.
+ # Routes the control plane's /admin API. Dev only.
adminRoute: false
- # External prefix the console is served under. The bare prefix 302s to <prefix>/ and a
- # URLRewrite filter (Extended conformance) strips it before the console sees the
- # request, as on the cloud. Empty leaves the console unrouted.
+ # External prefix the console is served under. Empty leaves the console unrouted.
consolePath: /console
- # listeners, hostnames, addresses and annotations pass through to the Gateway API
- # objects verbatim, so anything the spec allows is expressible. Plain HTTP on 80
- # matching any host suits a local cluster.
listeners:
- name: http
protocol: HTTP
diff --git a/development/kind/run.sh b/development/kind/run.sh
index 35b94939..e8f1e178 100755
--- a/development/kind/run.sh
+++ b/development/kind/run.sh
@@ -15,8 +15,6 @@ HELM="helm"
# cloud-provider-kind GatewayClass itself, so the cluster needs no CRD step.
CPK_CONTAINER="cloud-provider-kind"
CPK_IMAGE="registry.k8s.io/cloud-provider-kind/cloud-controller-manager:v0.11.1"
-# The console shares the control plane's gateway under this prefix, as it does on the
-# cloud: the route rewrites the prefix away before the console sees the request.
CONSOLE_BASE_PATH="/console"