Fix the missing api codes for volume.spec.snapshotDataIntegrity
Longhorn 4994
@@ -863,6 +863,11 @@ func volumeSchema(volume *client.Schema) {
volumeDataLocality.Default = longhorn.DataLocalityDisabled
volume.ResourceFields["dataLocality"] = volumeDataLocality
+ volumeSnapshotDataIntegrity := volume.ResourceFields["snapshotDataIntegrity"]
+ volumeSnapshotDataIntegrity.Create = true
+ volumeSnapshotDataIntegrity.Default = longhorn.SnapshotDataIntegrityIgnored
+ volume.ResourceFields["snapshotDataIntegrity"] = volumeSnapshotDataIntegrity
+
volumeAccessMode := volume.ResourceFields["accessMode"]
volumeAccessMode.Create = true
volumeAccessMode.Default = longhorn.AccessModeReadWriteOnce
@@ -1178,6 +1183,7 @@ func toVolumeResource(v *longhorn.Volume, ves []*longhorn.Engine, vrs []*longhor
NumberOfReplicas: v.Spec.NumberOfReplicas,
ReplicaAutoBalance: v.Spec.ReplicaAutoBalance,
DataLocality: v.Spec.DataLocality,
+ SnapshotDataIntegrity: v.Spec.SnapshotDataIntegrity,
StaleReplicaTimeout: v.Spec.StaleReplicaTimeout,
Created: v.CreationTimestamp.String(),
EngineImage: v.Spec.EngineImage,
@@ -1239,6 +1245,7 @@ func toVolumeResource(v *longhorn.Volume, ves []*longhorn.Engine, vrs []*longhor
actions["updateAccessMode"] = struct{}{}
actions["updateReplicaAutoBalance"] = struct{}{}
actions["updateUnmapMarkSnapChainRemoved"] = struct{}{}
+ actions["updateSnapshotDataIntegrity"] = struct{}{}
actions["recurringJobAdd"] = struct{}{}
actions["recurringJobDelete"] = struct{}{}
actions["recurringJobList"] = struct{}{}
