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

Commit 1182692

Browse files
committed
COSI Api definitions
1 parent ff75c90 commit 1182692

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+5284
-234
lines changed

Diff for: apis/objectstorage.k8s.io/v1alpha1/azure_types.go

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
// +k8s:deepcopy-gen=false
218

319
package v1alpha1

Diff for: apis/objectstorage.k8s.io/v1alpha1/doc.go

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
// +k8s:deepcopy-gen=package,register
218
// +groupName=objectstorage.k8s.io
319
// +k8s:protobuf-gen=package

Diff for: apis/objectstorage.k8s.io/v1alpha1/gcs_types.go

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
// +k8s:deepcopy-gen=false
218

319
package v1alpha1

Diff for: apis/objectstorage.k8s.io/v1alpha1/openapi_generated.go

+126-153
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: apis/objectstorage.k8s.io/v1alpha1/protocol_types.go

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
package v1alpha1
218

319
type ProtocolName string
@@ -12,7 +28,7 @@ type RequestedProtocol struct {
1228
// +kubebuilder:validation:Enum:={s3,azureBlob,gcs}
1329
Name ProtocolName `json:"name"`
1430
// +optional
15-
Version string `json:"version"`
31+
Version string `json:"version,omitempty"`
1632
}
1733

1834
type Protocol struct {

Diff for: apis/objectstorage.k8s.io/v1alpha1/register.go

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
package v1alpha1
218

319
import (

Diff for: apis/objectstorage.k8s.io/v1alpha1/s3_types.go

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
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+
117
// +k8s:deepcopy-gen=false
218

319
package v1alpha1
420

521
type S3SignatureVersion string
622

723
const (
8-
S3SignatureVersionV2 = "s3v2"
9-
S3SignatureVersionV4 = "s3v4"
24+
S3SignatureVersionV2 S3SignatureVersion = "S3v2"
25+
S3SignatureVersionV4 S3SignatureVersion = "S3v4"
1026
)
1127

1228
type S3Protocol struct {

Diff for: apis/objectstorage.k8s.io/v1alpha1/types.go

+29-30
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
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+
117
package v1alpha1
218

319
import (
20+
corev1 "k8s.io/api/core/v1"
421
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
522
"k8s.io/apimachinery/pkg/types"
623
)
724

8-
type BucketRequestBinding struct {
9-
Name string `json:"name"`
10-
Namespace string `json:"namespace,omitempty"`
11-
}
12-
1325
type BucketRequestSpec struct {
1426
// +optional
1527
BucketInstanceName string `json:"bucketInstanceName,omitempty"`
@@ -46,8 +58,8 @@ type BucketSpec struct {
4658
// +optional
4759
AnonymousAccessMode AnonymousAccessMode `json:"anonymousAccessMode,omitempty"`
4860
// +optional
49-
BucketClassName string `json:"bucketClassName,omitempty"`
50-
BucketRequest *ObjectReference `json:"bucketRequest,omitempty"`
61+
BucketClassName string `json:"bucketClassName,omitempty"`
62+
BucketRequest *BucketRequestReference `json:"bucketRequest,omitempty"`
5163
// +listType=atomic
5264
AllowedNamespaces []string `json:"allowedNamespaces,omitempty"`
5365
Protocol Protocol `json:"protocol"`
@@ -79,8 +91,7 @@ type BucketRequest struct {
7991
metav1.TypeMeta `json:",inline"`
8092
// +optional
8193
metav1.ObjectMeta `json:"metadata,omitempty"`
82-
83-
Spec BucketRequestSpec `json:"spec,omitempty"`
94+
Spec BucketRequestSpec `json:"spec,omitempty"`
8495
// +optional
8596
Status BucketRequestStatus `json:"status,omitempty"`
8697
}
@@ -104,8 +115,7 @@ type Bucket struct {
104115
metav1.TypeMeta `json:",inline"`
105116
// +optional
106117
metav1.ObjectMeta `json:"metadata,omitempty"`
107-
108-
Spec BucketSpec `json:"spec,omitempty"`
118+
Spec BucketSpec `json:"spec,omitempty"`
109119
// +optional
110120
Status BucketStatus `json:"status,omitempty"`
111121
}
@@ -166,12 +176,9 @@ type BucketAccessClass struct {
166176
metav1.TypeMeta `json:",inline"`
167177
// +optional
168178
metav1.ObjectMeta `json:"metadata,omitempty"`
169-
170179
// +optional
171-
Provisioner string `json:"provisioner,omitempty"`
172-
173-
PolicyActionsConfigMap *ObjectReference `json:"policyActionsConfigMap,omitempty"`
174-
180+
Provisioner string `json:"provisioner,omitempty"`
181+
PolicyActionsConfigMap *corev1.ObjectReference `json:"policyActionsConfigMap,omitempty"`
175182
// +optional
176183
Parameters map[string]string `json:"parameters,omitempty"`
177184
}
@@ -192,13 +199,10 @@ type BucketAccessSpec struct {
192199
// +optional
193200
ServiceAccount string `json:"serviceAccount,omitempty"`
194201
// +optional
195-
MintedSecretName string `json:"mintedSecretName,omitempty"`
196-
202+
MintedSecretName string `json:"mintedSecretName,omitempty"`
197203
PolicyActionsConfigMapData string `json:"policyActionsConfigMapData,omitempty"`
198-
199204
// +optional
200205
Principal string `json:"principal,omitempty"`
201-
202206
// +optional
203207
Provisioner string `json:"provisioner,omitempty"`
204208
// +optional
@@ -223,8 +227,7 @@ type BucketAccess struct {
223227
metav1.TypeMeta `json:",inline"`
224228
// +optional
225229
metav1.ObjectMeta `json:"metadata,omitempty"`
226-
227-
Spec BucketAccessSpec `json:"spec,omitempty"`
230+
Spec BucketAccessSpec `json:"spec,omitempty"`
228231
// +optional
229232
Status BucketAccessStatus `json:"status"`
230233
}
@@ -239,12 +242,9 @@ type BucketAccessList struct {
239242

240243
type BucketAccessRequestSpec struct {
241244
// +optional
242-
ServiceAccountName string `json:"serviceAccountName,omitempty"`
243-
244-
BucketRequestName string `json:"bucketRequestName"`
245-
245+
ServiceAccountName string `json:"serviceAccountName,omitempty"`
246+
BucketRequestName string `json:"bucketRequestName"`
246247
BucketAccessClassName string `json:"bucketAccessClassName"`
247-
248248
// +optional
249249
BucketAccessName string `json:"bucketAccessName,omitempty"`
250250
}
@@ -266,8 +266,7 @@ type BucketAccessRequest struct {
266266
metav1.TypeMeta `json:",inline"`
267267
// +optional
268268
metav1.ObjectMeta `json:"metadata,omitempty"`
269-
270-
Spec BucketAccessRequestSpec `json:"spec,omitempty"`
269+
Spec BucketAccessRequestSpec `json:"spec,omitempty"`
271270
// +optional
272271
Status BucketAccessRequestStatus `json:"status"`
273272
}
@@ -280,7 +279,7 @@ type BucketAccessRequestList struct {
280279
Items []BucketAccessRequest `json:"items"`
281280
}
282281

283-
type ObjectReference struct {
282+
type BucketRequestReference struct {
284283
// Namespace of the referent.
285284
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
286285
// +optional

Diff for: apis/objectstorage.k8s.io/v1alpha1/zz_generated.deepcopy.go

+19-34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)