|
| 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 | +} |
0 commit comments