Skip to content

Commit

Permalink
Healer: add auto-generated proto file
Browse files Browse the repository at this point in the history
Fixes: #20
Signed-off-by: Prasanna Kumar Kalever <[email protected]>
  • Loading branch information
Prasanna Kumar Kalever committed Mar 15, 2022
1 parent b33a71b commit 09d55dd
Show file tree
Hide file tree
Showing 5 changed files with 779 additions and 82 deletions.
73 changes: 73 additions & 0 deletions healer/healer.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Code generated by make; DO NOT EDIT.
syntax = "proto3";
package healer;

import "github.com/container-storage-interface/spec/lib/go/csi/csi.proto";
import "google/protobuf/descriptor.proto";

option go_package = "github.com/csi-addons/spec/lib/go/healer";

// HealerNode holds the RPC method for running heal operations on the
// active (staged/published) volume.
service HealerNode {
// NodeHealer is a procedure that gets called on the CSI NodePlugin.
rpc NodeHealer (NodeHealerRequest)
returns (NodeHealerResponse) {}
}
// NodeHealerRequest contains the information needed to identify the
// location where the volume is mounted so that local filesystem or
// block-device operations to heal volume can be executed.
message NodeHealerRequest {
// The ID of the volume. This field is REQUIRED.
string volume_id = 1;

// The path on which volume is available. This field is REQUIRED.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string volume_path = 2;

// The path where the volume is staged, if the plugin has the
// STAGE_UNSTAGE_VOLUME capability, otherwise empty.
// If not empty, it MUST be an absolute path in the root
// filesystem of the process serving this request.
// This field is OPTIONAL.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string staging_target_path = 3;

// Volume capability describing how the CO intends to use this volume.
// This allows SP to determine if volume is being used as a block
// device or mounted file system. For example - if volume is being
// used as a block device the SP MAY choose to skip calling filesystem
// operations to healer. If volume_capability is omitted the SP MAY
// determine access_type from given volume_path for the volume and
// perform healing. This is an OPTIONAL field.
csi.v1.VolumeCapability volume_capability = 4;

// Secrets required by plugin to complete the healer operation.
// This field is OPTIONAL.
map<string, string> secrets = 5 [(csi.v1.csi_secret) = true];

// Volume context as returned by SP in
// CreateVolumeResponse.Volume.volume_context.
// This field is OPTIONAL and MUST match the volume_context of the
// volume identified by `volume_id`.
map<string, string> volume_context = 6;
}

// NodeHealerResponse holds the information about the result of the
// NodeHealerRequest call.
message NodeHealerResponse {
// Normal volumes are available for use and operating optimally.
// An abnormal volume does not meet these criteria.
// This field is REQUIRED.
bool abnormal = 1;

// The message describing the condition of the volume.
// This field is REQUIRED.
string message = 2;
}
23 changes: 23 additions & 0 deletions identity/identity.proto
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,27 @@ message Capability {
Type type = 1;
}

// Healer contains the features of the Healer operation that the
// CSI-driver supports.
message Healer {
// Type describes a CSI Service that CSI-drivers can support.
enum Type {
// UNKNOWN indicates that the CSI-driver does not support the Healer
// operation in the current mode. The CSI-Addons CO plugin will most
// likely ignore this node for the Healer operation.
UNKNOWN = 0;

// HEALER indicates that the CSI-driver provides RPCs for a
// Healer operation.
// The presence of this capability determines whether the CSI-Addons CO
// plugin can invoke RPCs that require access to the storage system,
// similar to the CSI Controller (provisioner).
HEALER = 1;
}
// type contains the Type of CSI Service that the CSI-driver supports.
Type type = 1;
}

// Additional CSI-Addons operations will need to be added here.

oneof type {
Expand All @@ -148,6 +169,8 @@ message Capability {
ReclaimSpace reclaim_space = 2;
// NetworkFence operation capabilities
NetworkFence network_fence = 3;
// Healer operation capabilities
Healer healer = 4;

// Additional CSI-Addons operations need to be appended to this list.
}
Expand Down
Loading

0 comments on commit 09d55dd

Please sign in to comment.