Throttle disk write to prevent etcd puking during upgrade

This commit is contained in:
2026-04-07 17:34:38 +08:00
parent 11e2c96173
commit bc4b124246
17 changed files with 639 additions and 25 deletions

View File

@@ -7,6 +7,7 @@ import (
"path/filepath"
monov1alpha1 "example.com/monok8s/pkg/apis/monok8s/v1alpha1"
"example.com/monok8s/pkg/controller/osimage"
)
func EngageControlGate(ctx context.Context, nctx *NodeContext) error {
@@ -30,3 +31,7 @@ func ReleaseControlGate(ctx context.Context, nctx *NodeContext) error {
return nil
}
func DiagTestDiskWrite(ctx context.Context, nctx *NodeContext) error {
return osimage.TestStreamToTarget(ctx, monov1alpha1.AltPartDeviceLink)
}