Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 7df63f2

Browse files
committed
Introducing BucketInfo in the api. Not generating CRDs for them.
This reverts commit 85c7f85.
1 parent 4d1bb13 commit 7df63f2

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

apis/bucket_info.go

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
Copyright 2020 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
18+
package cosiapi
19+
20+
import (
21+
corev1 "k8s.io/api/core/v1"
22+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
23+
)
24+
25+
// +k8s:deepcopy-gen=false
26+
type BucketInfo struct {
27+
metav1.TypeMeta `json:",inline"`
28+
29+
// +optional
30+
metav1.ObjectMeta `json:"metadata,omitempty"`
31+
32+
Spec BucketInfoSpec `json:"spec,omitempty"`
33+
}
34+
35+
type BucketInfoSpec struct {
36+
// BucketName is the name of the Bucket
37+
BucketName string `json:"bucketName"`
38+
39+
// AuthenticationType denotes the style of authentication
40+
// It can be one of
41+
// KEY - access, secret tokens based authentication
42+
// IAM - implicit authentication of pods to the OSP based on service account mappings
43+
AuthenticationType AuthenticationType `json:"authenticationType"`
44+
45+
// Endpoint is the URL at which the bucket can be accessed
46+
Endpoint string `json:"endpoint"`
47+
48+
// Region is the vendor-defined region where the bucket "resides"
49+
Region string `json:"region"`
50+
51+
// Protocols are the set of data APIs this bucket is expected to support.
52+
// The possible values for protocol are:
53+
// - S3: Indicates Amazon S3 protocol
54+
// - Azure: Indicates Microsoft Azure BlobStore protocol
55+
// - GCS: Indicates Google Cloud Storage protocol
56+
Protocols []Protocol `json:"protocols"`
57+
}

apis/objectstorage/v1alpha1/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,3 +320,4 @@ type BucketAccessList struct {
320320
metav1.ListMeta `json:"metadata,omitempty"`
321321
Items []BucketAccess `json:"items"`
322322
}
323+

0 commit comments

Comments
 (0)