Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
charts: derive announced router port from service.port; optional PVC storageClass
Tomas Tormo54618a8fbbd2
diff --git a/charts/sam-mesh/templates/router-statefulset.yaml b/charts/sam-mesh/templates/router-statefulset.yamlindex 3a11b95a..b4c51f39 100644--- a/charts/sam-mesh/templates/router-statefulset.yaml+++ b/charts/sam-mesh/templates/router-statefulset.yaml@@ -124,7 +124,7 @@ spec:- "--external-addr=/ip4/$(HOST_IP)/tcp/{{ .Values.router.hostPort }}"- "--external-addr=/ip4/$(HOST_IP)/udp/{{ .Values.router.hostPort }}/quic-v1"{{- else }}- - "--external-addr=/dns4/{{ include "sam-mesh.fullname" . }}-router/tcp/4501"+ - "--external-addr=/dns4/{{ include "sam-mesh.fullname" . }}-router/tcp/{{ .Values.router.service.port }}"{{- end }}- "--keys-path=/data/router.key"{{- if .Values.router.allowLoopback }}@@ -159,6 +159,9 @@ spec:name: router-dataspec:accessModes: [ "ReadWriteOnce" ]+ {{- if .Values.router.storageClass }}+ storageClassName: {{ .Values.router.storageClass | quote }}+ {{- end }}resources:requests:storage: {{ .Values.router.storageSize | quote }}diff --git a/charts/sam-mesh/tests/router-statefulset_test.yaml b/charts/sam-mesh/tests/router-statefulset_test.yamlindex eb54ee90..a29bc394 100644--- a/charts/sam-mesh/tests/router-statefulset_test.yaml+++ b/charts/sam-mesh/tests/router-statefulset_test.yaml@@ -31,6 +31,17 @@ tests:- notExists:path: spec.template.spec.containers[0].ports[0].hostPort+ - it: announced DNS address follows router.service.port+ set:+ router.service.port: 9999+ documentSelector:+ path: kind+ value: StatefulSet+ asserts:+ - contains:+ path: spec.template.spec.containers[0].args+ content: --external-addr=/dns4/sam-mesh-router/tcp/9999+- it: hostPort binds both protocols and announces the node IPset:router.hostPort: 4501@@ -78,9 +89,22 @@ tests:- equal:path: spec.volumeClaimTemplates[0].spec.resources.requests.storagevalue: 1Gi+ - notExists:+ path: spec.volumeClaimTemplates[0].spec.storageClassName- notExists:path: spec.template.spec.volumes+ - it: storageClass sets the PVC storageClassName+ set:+ router.storageClass: fast-ssd+ documentSelector:+ path: kind+ value: StatefulSet+ asserts:+ - equal:+ path: spec.volumeClaimTemplates[0].spec.storageClassName+ value: fast-ssd+- it: useOidcToken swaps the bootstrap token for a projected JWTset:router.useOidcToken: truediff --git a/charts/sam-mesh/values.yaml b/charts/sam-mesh/values.yamlindex 75f11b5e..4ae7afc2 100644--- a/charts/sam-mesh/values.yaml+++ b/charts/sam-mesh/values.yaml@@ -127,6 +127,8 @@ router:allowLoopback: false# PVC for /data/router.key, so the libp2p peer ID survives rescheduling.storageSize: 1Gi+ # PVC StorageClass; cluster default when null.+ storageClass: nullresources:requests:cpu: 100m