Add support for ILM transition (#10565)

This PR adds transition support for ILM
to transition data to another MinIO target
represented by a storage class ARN. Subsequent
GET or HEAD for that object will be streamed from
the transition tier. If PostRestoreObject API is
invoked, the transitioned object can be restored for
duration specified to the source cluster.
This commit is contained in:
Poorna Krishnamoorthy
2020-11-12 12:12:09 -08:00
committed by Harshavardhana
parent 8f7fe0405e
commit 1ebf6f146a
34 changed files with 1296 additions and 136 deletions

View File

@@ -52,6 +52,9 @@ const (
ObjectReplicationMissedThreshold
ObjectReplicationReplicatedAfterThreshold
ObjectReplicationNotTracked
ObjectRestorePostInitiated
ObjectRestorePostCompleted
ObjectRestorePostAll
)
// Expand - returns expanded values of abbreviated event type.
@@ -86,6 +89,11 @@ func (name Name) Expand() []Name {
ObjectReplicationMissedThreshold,
ObjectReplicationReplicatedAfterThreshold,
}
case ObjectRestorePostAll:
return []Name{
ObjectRestorePostInitiated,
ObjectRestorePostCompleted,
}
default:
return []Name{name}
}
@@ -140,6 +148,10 @@ func (name Name) String() string {
return "s3:Replication:OperationMissedThreshold"
case ObjectReplicationReplicatedAfterThreshold:
return "s3:Replication:OperationReplicatedAfterThreshold"
case ObjectRestorePostInitiated:
return "s3:ObjectRestore:Post"
case ObjectRestorePostCompleted:
return "s3:ObjectRestore:Completed"
}
return ""
@@ -236,6 +248,13 @@ func ParseName(s string) (Name, error) {
return ObjectReplicationReplicatedAfterThreshold, nil
case "s3:Replication:OperationNotTracked":
return ObjectReplicationNotTracked, nil
case "s3:ObjectRestore:*":
return ObjectRestorePostAll, nil
case "s3:ObjectRestore:Post":
return ObjectRestorePostInitiated, nil
case "s3:ObjectRestore:Completed":
return ObjectRestorePostCompleted, nil
default:
return 0, &ErrInvalidEventName{s}
}