Files
seaweedfs/seaweed-block/deploy/k8s/alpha/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

100 lines
2.9 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: sw-block-cluster-spec
namespace: kube-system
data:
cluster-spec.yaml: |
# __CLUSTER_SPEC_NODES__
---
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:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: sw-block-master
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"
- "--launcher-loop-interval=100ms"
- "--launcher-manifest-dir=/manifests"
- "--launcher-master-addr=blockmaster.kube-system.svc.cluster.local:9333"
- "--launcher-image=sw-block:local"
- "--launcher-namespace=kube-system"
- "--launcher-durable-root=/var/lib/sw-block"
- "--launcher-status"
- "--launcher-replication-ack=__REPLICATION_ACK__"
- "--launcher-iscsi-port-base=3260"
- "--launcher-kubernetes-apply"
- "--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"
- "--launcher-master-tls-secret-prefix=sw-block-node-tls"
- "--expected-slots-per-volume=__EXPECTED_SLOTS_PER_VOLUME__"
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
- name: manifests
mountPath: /manifests
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: {}
- name: manifests
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: blockmaster
namespace: kube-system
spec:
selector:
app: sw-blockmaster
ports:
- name: grpc
port: 9333
targetPort: 9333