mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 10:37:23 +01:00
sw-block ops failover is the operator's failover of a standalone deployment: one call to blockmaster's admin-only FailbackService over mutual TLS with the expected current line, after the operator confirms the old node is off or cut from its clients. blockmaster decides the move. The alpha stack now deploys what its notes describe: blockmaster serves the failback RPC, and the failback executor (admin client Secret, execution on) runs in kube-system; install applies the CRD and executor, uninstall removes both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
101 lines
3.0 KiB
YAML
101 lines
3.0 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__"
|
|
- "--failback-runtime-rpc"
|
|
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
|