一文读懂容器存储接口 CSI

  • 更新 PVC 的 .Status.Conditions,表明此时处于 Resizing 状态。

  • 通过特定的 Unix Domain Socket 调用外部 CSI 插件ControllerExpandVolume 接口

  • 更新 PV 的 .Spec.Capacity。

  • 若 CSI 支持文件系统在线扩容,ControllerExpandVolume 接口返回值中 NodeExpansionRequired 字段为 true,External-Resizer更新 PVC 的 .Status.Conditions 为 FileSystemResizePending 状态;若不支持则扩容成功,External-Resizer更新 PVC 的 .Status.Conditions 为空,且更新 PVC 的 .Status.Capacity。

Volume Manager(Kubelet 组件)观察到存储卷需在线扩容,于是通过特定的 Unix Domain Socket 调用外部 CSI 插件NodeExpandVolume 接口实现文件系统扩容。

[](()5. livenessprobe


[](()1)功能

检查 CSI 插件是否正常。

[](()2)原理

通过对外暴露一个 / healthz HTTP 端口以服务 kubelet 的探针探测器,内部是通过特定的 Unix Domain Socket 调用外部 CSI 插件Probe 接口

[](()CSI 接口介绍

=============================================================================

三方存储厂商需实现 CSI 插件的三大接口:IdentityServer、ControllerServer、NodeServer

[](()1. IdentityServer


IdentityServer 主要用于认证 CSI 插件的身份信息。

// IdentityServer is the server API for Identity service.

type IdentityServer interface {

// 获取CSI插件的信息,比如名称、版本号

GetPluginInfo(context.Context, *GetPluginInfoRequest) (*GetPluginInfoResponse, error)

// 获取CSI插件提供的能力,比如是否提供ControllerService能力

GetPluginCapabilities(context.Context, *GetPluginCapabilitiesRequest) (*GetPluginCapabilitiesResponse, error)

// 获取CSI插件健康状况

Probe(context.Context, *ProbeRequest) (*ProbeResponse, error)

}

[](()2. ControllerServer


ControllerServer 主要负责存储卷及快照的创建/删除以及挂接/摘除操作。

// ControllerServer is the server API for Controller service.

type ControllerServer interface {

// 创建存储卷

CreateVolume(context.Context, *CreateVolumeRequest) (*CreateVolumeResponse, error)

// 删除存储卷

DeleteVolume(context.Context, *DeleteVolumeRequest) (*DeleteVolumeResponse, error)

// 挂接存储卷到特定节点

ControllerPublishVolume(context.Context, *ControllerPublishVolumeRequest) (*ControllerPublishVolumeResponse, error)

// 从特定节点摘除存储卷

ControllerUnpublishVolume(context.Context, *ControllerUnpublishVolumeRequest) (*ControllerUnpublishVolumeResponse, error)

// 验证存储卷能力是否满足要求,比如是否支持跨节点多读多写

ValidateVolumeCapabilities(context.Context, *ValidateVolumeCapabilitiesRequest) (*V

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值