Documentation
¶
Index ¶
- func Add(mgr manager.Manager) error
- func ContainsFinalizer(instance *ibmcloudv1alpha1.Bucket) bool
- func DeleteFinalizer(instance *ibmcloudv1alpha1.Bucket) []string
- func GetCloudEndpoint(region string) (string, error)
- func InitImmutable(bucket *ibmcloudv1alpha1.Bucket) map[string]string
- type CORSConfiguration
- type ConfigCORSRule
- type CreateBucketConfiguration
- type Delete
- type Endpoints
- type Error
- type KeyVal
- type ListBucketResult
- type Object
- type ProtectionConfiguration
- type ReconcileBucket
- type RetentionDay
- type WaitItem
- type WaitQLock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new Bucket Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func ContainsFinalizer ¶
func ContainsFinalizer(instance *ibmcloudv1alpha1.Bucket) bool
ContainsFinalizer check for Finalizer
func DeleteFinalizer ¶
func DeleteFinalizer(instance *ibmcloudv1alpha1.Bucket) []string
DeleteFinalizer delete streams finalizer
func GetCloudEndpoint ¶
GetCloudEndpoint : Return endpoint URL based on region
func InitImmutable ¶
func InitImmutable(bucket *ibmcloudv1alpha1.Bucket) map[string]string
InitImmutable init the immutable checking
Types ¶
type CORSConfiguration ¶
type CORSConfiguration struct {
CORSRule ConfigCORSRule `xml:"CORSRule"`
}
CORSConfiguration : CORS rules
type ConfigCORSRule ¶
type ConfigCORSRule struct {
AllowedOrigin string `xml:"AllowedOrigin"`
AllowedHeader string `xml:"AllowedHeader"`
AllowedMethod []string `xml:"AllowedMethod"`
}
ConfigCORSRule : CORS Configuration
type CreateBucketConfiguration ¶
type CreateBucketConfiguration struct {
LocationConstraint string `xml:"LocationConstraint"`
}
CreateBucketConfiguration : The postbody for the Bucket creation
type Delete ¶
type Delete struct {
Object []Object `xml:"Object"`
}
Delete is used to realize the tobe Deleted Object in a Bucket
type Endpoints ¶
type Endpoints struct {
IdentifyEndpoints struct {
IAMToken string `json:"iam_token"`
IAMPolicy string `json:"iam_policy"`
} `json:"identity-endpoints"`
ServiceEndpoints struct {
CrossRegion map[string]interface{} `json:"cross-region"`
Regional map[string]interface{} `json:"regional"`
SingleSite map[string]interface{} `json:"single_site"`
} `json:"service-endpoints"`
}
Endpoints is use to get the endpoint base on location and resilience
type Error ¶
type Error struct {
Code string `xml:"Code"`
Message string `xml:"Message"`
Resource string `xml:"Resource"`
RequestID string `xml:"RequestId"`
HTTPStatusCode int `xml:"httpStatusCode"`
}
type retentionFailError struct {
thisError Error `xml:"Error"`
}
type ListBucketResult ¶
type ListBucketResult struct {
Name string `xml:"Name"`
Prefix string `xml:"Prefix"`
Marker string `xml:"Marker"`
MaxKeys int `xml:"MaxKeys"`
Delimiter string `xml:"Delimiter"`
Contents []struct {
Key string `xml:"Key"`
LastModified string `xml:"LastModified"`
ETag string `xml:"ETag"`
Size int `xml:"Size"`
Owner struct {
ID string `xml:"ID"`
DisplayName string `xml:"DisplayName"`
} `xml:"Owner"`
StorageClass string `xml:"StorageClass"`
}
IsTruncated bool `xml:"IsTruncated"`
}
ListBucketResult is used to realize Objects in a Bucket
type ProtectionConfiguration ¶
type ProtectionConfiguration struct {
Status string `xml:"Status"`
MinimumRetention RetentionDay `xml:"MinimumRetention"`
MaximumRetention RetentionDay `xml:"MaximumRetention"`
DefaultRetention RetentionDay `xml:"DefaultRetention"`
}
ProtectionConfiguration : Retention Policy
type ReconcileBucket ¶
ReconcileBucket reconciles a Bucket object
func (*ReconcileBucket) Reconcile ¶
Reconcile reads that state of the cluster for a Bucket object and makes changes based on the state read and what is in the Bucket.Spec Automatically generate RBAC rules to allow the Controller to read and write Deployments +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=buckets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=buckets/status,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=,resources=configmaps,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=buckets/finalizers,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=bindings,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=services,verbs=get;list;watch;create;update;patch;delete
type RetentionDay ¶
type RetentionDay struct {
Days int `xml:"Days"`
}
RetentionDay : Retention Policy