-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ObjectLockConfiguration to Bucket CRD * Add ObjectLockConfigurationClient sub resource
- Loading branch information
Showing
26 changed files
with
2,015 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
apis/provider-ceph/v1alpha1/objectlockconfiguration_types.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package v1alpha1 | ||
|
||
type ObjectLockEnabled string | ||
|
||
const ( | ||
ObjectLockEnabledEnabled ObjectLockEnabled = "Enabled" | ||
) | ||
|
||
type DefaultRetentionMode string | ||
|
||
const ( | ||
ModeGovernance DefaultRetentionMode = "GOVERNANCE" | ||
ModeCompliance DefaultRetentionMode = "COMPLIANCE" | ||
) | ||
|
||
// ObjectLockConfiguration describes the object lock state of an S3 bucket. | ||
type ObjectLockConfiguration struct { | ||
// +optional. | ||
// Indicates whether this bucket has an Object Lock configuration enabled. Enable | ||
// ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket. | ||
// +kubebuilder:validation:Enum=Enabled | ||
ObjectLockEnabled *ObjectLockEnabled `json:"objectLockEnabled,omitempty"` | ||
// +optional. | ||
// Specifies the Object Lock rule for the specified object. Enable this rule | ||
// when you apply ObjectLockConfiguration to a bucket. Bucket settings require | ||
// both a mode and a period. The period can be either Days or Years but you must | ||
// select one. You cannot specify Days and Years at the same time. | ||
Rule *ObjectLockRule `json:"objectLockRule,omitempty"` | ||
} | ||
|
||
type ObjectLockRule struct { | ||
// +optional. | ||
// The default Object Lock retention mode and period that you want to apply to new | ||
// objects placed in the specified bucket. Bucket settings require both a mode and | ||
// a period. The period can be either Days or Years but you must select one. You | ||
// cannot specify Days and Years at the same time. | ||
DefaultRetention *DefaultRetention `json:"defaultRetention,omitempty"` | ||
} | ||
|
||
type DefaultRetention struct { | ||
// +optional. | ||
// The number of days that you want to specify for the default retention period. | ||
// Must be used with Mode. | ||
Days *int32 `json:"days,omitempty"` | ||
// The default Object Lock retention mode you want to apply to new objects placed | ||
// in the specified bucket. Must be used with either Days or Years. | ||
// +kubebuilder:validation:Enum=GOVERNANCE;COMPLIANCE | ||
Mode DefaultRetentionMode `json:"mode,omitempty"` | ||
// +optional. | ||
// The number of years that you want to specify for the default retention period. | ||
// Must be used with Mode. | ||
Years *int32 `json:"years,omitempty"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.