Files
seaweedfs/seaweed-block/deploy/k8s/g15b/block-stack.yaml
T
pingqiuandClaude Opus 5.5 e82abea6b8 k8s: Kubernetes installs run blockmaster with mutual TLS; the plaintext off-host bind flag is refused
blockmaster refuses --insecure-external-bind (a non-loopback --listen needs
mutual TLS; the runtime HTTP listener stays on loopback), and
--launcher-master-tls-secret-prefix makes each generated volume mount its
server's node certificate Secret and dial with it. The chart, the launcher
renderer, the alpha/g15b/g15d manifests and gate scripts mount the Secrets
and pass the TLS flags; network.externalStatus and the frontend runtime
HTTP option fail the render. scripts/k8s-alpha-certs.sh issues development
certificates and the role file. The systemd startup gate runs its
off-loopback master with mutual TLS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 00:20:11 -08:00

198 lines
5.6 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: sw-block-cluster-spec
namespace: kube-system
data:
cluster-spec.yaml: |
volumes:
- id: v1
size_bytes: 1048576
replication_factor: 2
placements:
- server_id: s1
replica_id: r1
source: existing_replica
- server_id: s2
replica_id: r2
source: existing_replica
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sw-blockmaster
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: sw-blockmaster
template:
metadata:
labels:
app: sw-blockmaster
spec:
containers:
- name: blockmaster
image: sw-block:local
imagePullPolicy: Never
command: ["/usr/local/bin/blockmaster"]
args:
- "--authority-store=/var/lib/sw-block/authority"
- "--lifecycle-store=/var/lib/sw-block/lifecycle"
- "--cluster-spec=/config/cluster-spec.yaml"
- "--lifecycle-product-loop-interval=100ms"
- "--listen=0.0.0.0:9333"
- "--tls-cert=/etc/sw-block/tls/tls.crt"
- "--tls-key=/etc/sw-block/tls/tls.key"
- "--tls-client-ca=/etc/sw-block/tls/ca.crt"
- "--role-file=/etc/sw-block/roles/roles"
- "--audit-log=/var/lib/sw-block/audit.log"
- "--expected-slots-per-volume=2"
ports:
- name: grpc
containerPort: 9333
volumeMounts:
- name: tls
mountPath: /etc/sw-block/tls
readOnly: true
- name: roles
mountPath: /etc/sw-block/roles
readOnly: true
- name: cluster-spec
mountPath: /config
readOnly: true
- name: state
mountPath: /var/lib/sw-block
volumes:
- name: tls
secret:
secretName: sw-block-master-tls
- name: roles
secret:
secretName: sw-block-roles
- name: cluster-spec
configMap:
name: sw-block-cluster-spec
- name: state
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: blockmaster
namespace: kube-system
spec:
selector:
app: sw-blockmaster
ports:
- name: grpc
port: 9333
targetPort: 9333
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sw-blockvolume-r1
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: sw-blockvolume-r1
template:
metadata:
labels:
app: sw-blockvolume-r1
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: blockvolume
image: sw-block:local
imagePullPolicy: Never
command: ["/usr/local/bin/blockvolume"]
args:
- "--master=blockmaster.kube-system.svc.cluster.local:9333"
- "--server-id=s1"
- "--master-tls-cert=/etc/sw-block/master-tls/tls.crt"
- "--master-tls-key=/etc/sw-block/master-tls/tls.key"
- "--master-ca=/etc/sw-block/master-tls/ca.crt"
- "--volume-id=v1"
- "--replica-id=r1"
- "--data-addr=127.0.0.1:19101"
- "--ctrl-addr=127.0.0.1:19102"
- "--durable-root=/var/lib/sw-block/volume"
- "--durable-impl=walstore"
- "--durable-blocks=256"
- "--durable-blocksize=4096"
- "--heartbeat-interval=200ms"
- "--t1-readiness"
- "--recovery-mode=dual-lane"
- "--iscsi-listen=127.0.0.1:3260"
- "--iscsi-iqn=iqn.2026-05.io.seaweedfs:g15b-v1"
volumeMounts:
- name: master-tls
mountPath: /etc/sw-block/master-tls
readOnly: true
- name: state
mountPath: /var/lib/sw-block
volumes:
- name: master-tls
secret:
secretName: sw-block-node-tls-s1
- name: state
emptyDir: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sw-blockvolume-r2
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: sw-blockvolume-r2
template:
metadata:
labels:
app: sw-blockvolume-r2
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: blockvolume
image: sw-block:local
imagePullPolicy: Never
command: ["/usr/local/bin/blockvolume"]
args:
- "--master=blockmaster.kube-system.svc.cluster.local:9333"
- "--server-id=s2"
- "--master-tls-cert=/etc/sw-block/master-tls/tls.crt"
- "--master-tls-key=/etc/sw-block/master-tls/tls.key"
- "--master-ca=/etc/sw-block/master-tls/ca.crt"
- "--volume-id=v1"
- "--replica-id=r2"
- "--data-addr=127.0.0.1:19201"
- "--ctrl-addr=127.0.0.1:19202"
- "--durable-root=/var/lib/sw-block/volume"
- "--durable-impl=walstore"
- "--durable-blocks=256"
- "--durable-blocksize=4096"
- "--heartbeat-interval=200ms"
- "--t1-readiness"
- "--recovery-mode=dual-lane"
volumeMounts:
- name: master-tls
mountPath: /etc/sw-block/master-tls
readOnly: true
- name: state
mountPath: /var/lib/sw-block
volumes:
- name: master-tls
secret:
secretName: sw-block-node-tls-s2
- name: state
emptyDir: {}