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

Commit 66cdf92

Browse files
committed
Updating the CRDs
1 parent 4459814 commit 66cdf92

5 files changed

+126
-290
lines changed
Lines changed: 15 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.4.1
6+
controller-gen.kubebuilder.io/version: v0.9.2
87
creationTimestamp: null
98
name: bucketaccessclasses.objectstorage.k8s.io
109
spec:
@@ -25,6 +24,15 @@ spec:
2524
of an object. Servers should convert recognized schemas to the latest
2625
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
2726
type: string
27+
authenticationType:
28+
description: AuthenticationType denotes the style of authentication It
29+
can be one of KEY - access, secret tokens based authentication IAM -
30+
implicit authentication of pods to the OSP based on service account
31+
mappings
32+
type: string
33+
driverName:
34+
description: DriverName is the name of driver associated with this BucketAccess
35+
type: string
2836
kind:
2937
description: 'Kind is a string value representing the REST resource this
3038
object represents. Servers may infer this from the endpoint the client
@@ -35,69 +43,12 @@ spec:
3543
parameters:
3644
additionalProperties:
3745
type: string
46+
description: Parameters is an opaque map for passing in configuration
47+
to a driver for granting access to a bucket
3848
type: object
39-
policyActionsConfigMap:
40-
description: 'ObjectReference contains enough information to let you inspect
41-
or modify the referred object. --- New uses of this type are discouraged
42-
because of difficulty describing its usage when embedded in APIs. 1.
43-
Ignored fields. It includes many fields which are not generally honored. For
44-
instance, ResourceVersion and FieldPath are both very rarely valid in
45-
actual usage. 2. Invalid usage help. It is impossible to add specific
46-
help for individual usage. In most embedded usages, there are particular restrictions
47-
like, "must refer only to types A and B" or "UID not honored" or "name
48-
must be restricted". Those cannot be well described when embedded. 3.
49-
Inconsistent validation. Because the usages are different, the validation
50-
rules are different by usage, which makes it hard for users to predict
51-
what will happen. 4. The fields are both imprecise and overly precise. Kind
52-
is not a precise mapping to a URL. This can produce ambiguity during
53-
interpretation and require a REST mapping. In most cases, the dependency
54-
is on the group,resource tuple and the version of the actual struct
55-
is irrelevant. 5. We cannot easily change it. Because this type is
56-
embedded in many locations, updates to this type will affect numerous
57-
schemas. Don''t make new APIs embed an underspecified API type they
58-
do not control. Instead of using this type, create a locally provided
59-
and used type that is well-focused on your reference. For example, ServiceReferences
60-
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
61-
.'
62-
properties:
63-
apiVersion:
64-
description: API version of the referent.
65-
type: string
66-
fieldPath:
67-
description: 'If referring to a piece of an object instead of an entire
68-
object, this string should contain a valid JSON/Go field access
69-
statement, such as desiredState.manifest.containers[2]. For example,
70-
if the object reference is to a container within a pod, this would
71-
take on a value like: "spec.containers{name}" (where "name" refers
72-
to the name of the container that triggered the event) or if no
73-
container name is specified "spec.containers[2]" (container with
74-
index 2 in this pod). This syntax is chosen only to have some well-defined
75-
way of referencing a part of an object. TODO: this design is not
76-
final and this field is subject to change in the future.'
77-
type: string
78-
kind:
79-
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
80-
type: string
81-
name:
82-
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
83-
type: string
84-
namespace:
85-
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
86-
type: string
87-
resourceVersion:
88-
description: 'Specific resourceVersion to which this reference is
89-
made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
90-
type: string
91-
uid:
92-
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
93-
type: string
94-
type: object
49+
required:
50+
- authenticationType
51+
- driverName
9552
type: object
9653
served: true
9754
storage: true
98-
status:
99-
acceptedNames:
100-
kind: ""
101-
plural: ""
102-
conditions: []
103-
storedVersions: []
Lines changed: 33 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.4.1
6+
controller-gen.kubebuilder.io/version: v0.9.2
87
creationTimestamp: null
98
name: bucketaccesses.objectstorage.k8s.io
109
spec:
@@ -14,7 +13,7 @@ spec:
1413
listKind: BucketAccessList
1514
plural: bucketaccesses
1615
singular: bucketaccess
17-
scope: Cluster
16+
scope: Namespaced
1817
versions:
1918
- name: v1alpha1
2019
schema:
@@ -34,104 +33,49 @@ spec:
3433
type: object
3534
spec:
3635
properties:
37-
bucketName:
36+
bucketAccessClassName:
37+
description: BucketAccessClassName is the name of the BucketAccessClass
3838
type: string
39-
parameters:
40-
additionalProperties:
41-
type: string
42-
type: object
43-
policyActionsConfigMapData:
39+
bucketClaimName:
40+
description: BucketClaimName is the name of the BucketClaim.
4441
type: string
45-
serviceAccount:
46-
description: 'ObjectReference contains enough information to let you
47-
inspect or modify the referred object. --- New uses of this type
48-
are discouraged because of difficulty describing its usage when
49-
embedded in APIs. 1. Ignored fields. It includes many fields which
50-
are not generally honored. For instance, ResourceVersion and FieldPath
51-
are both very rarely valid in actual usage. 2. Invalid usage help. It
52-
is impossible to add specific help for individual usage. In most
53-
embedded usages, there are particular restrictions like, "must
54-
refer only to types A and B" or "UID not honored" or "name must
55-
be restricted". Those cannot be well described when embedded. 3.
56-
Inconsistent validation. Because the usages are different, the
57-
validation rules are different by usage, which makes it hard for
58-
users to predict what will happen. 4. The fields are both imprecise
59-
and overly precise. Kind is not a precise mapping to a URL. This
60-
can produce ambiguity during interpretation and require a REST
61-
mapping. In most cases, the dependency is on the group,resource
62-
tuple and the version of the actual struct is irrelevant. 5.
63-
We cannot easily change it. Because this type is embedded in many
64-
locations, updates to this type will affect numerous schemas. Don''t
65-
make new APIs embed an underspecified API type they do not control.
66-
Instead of using this type, create a locally provided and used type
67-
that is well-focused on your reference. For example, ServiceReferences
68-
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
69-
.'
70-
properties:
71-
apiVersion:
72-
description: API version of the referent.
73-
type: string
74-
fieldPath:
75-
description: 'If referring to a piece of an object instead of
76-
an entire object, this string should contain a valid JSON/Go
77-
field access statement, such as desiredState.manifest.containers[2].
78-
For example, if the object reference is to a container within
79-
a pod, this would take on a value like: "spec.containers{name}"
80-
(where "name" refers to the name of the container that triggered
81-
the event) or if no container name is specified "spec.containers[2]"
82-
(container with index 2 in this pod). This syntax is chosen
83-
only to have some well-defined way of referencing a part of
84-
an object. TODO: this design is not final and this field is
85-
subject to change in the future.'
86-
type: string
87-
kind:
88-
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
89-
type: string
90-
name:
91-
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
92-
type: string
93-
namespace:
94-
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
95-
type: string
96-
resourceVersion:
97-
description: 'Specific resourceVersion to which this reference
98-
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
99-
type: string
100-
uid:
101-
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
102-
type: string
103-
type: object
42+
credentialsSecretName:
43+
description: CredentialsSecretName is the name of the secret that
44+
COSI should populate with the credentials. If a secret by this name
45+
already exists, then it is assumed that credentials have already
46+
been generated. It is not overridden. This secret is deleted when
47+
the BucketAccess is delted.
48+
type: string
49+
protocol:
50+
description: Protocol is the name of the Protocol that this access
51+
credential is supposed to support If left empty, it will choose
52+
the protocol supported by the bucket. If the bucket supports multiple
53+
protocols, the end protocol is determined by the driver.
54+
type: string
55+
serviceAccountName:
56+
description: ServiceAccountName is the name of the serviceAccount
57+
that COSI will map to the OSP service account when IAM styled authentication
58+
is specified
59+
type: string
60+
required:
61+
- bucketAccessClassName
62+
- bucketClaimName
63+
- credentialsSecretName
10464
type: object
10565
status:
10666
properties:
10767
accessGranted:
68+
description: AccessGranted indicates the successful grant of privileges
69+
to access the bucket
10870
type: boolean
10971
accountID:
72+
description: AccountID is the unique ID for the account in the OSP.
73+
It will be populated by the COSI sidecar once access has been successfully
74+
granted.
11075
type: string
111-
message:
112-
type: string
113-
mintedSecret:
114-
description: SecretReference represents a Secret Reference. It has
115-
enough information to retrieve secret in any namespace
116-
properties:
117-
name:
118-
description: Name is unique within a namespace to reference a
119-
secret resource.
120-
type: string
121-
namespace:
122-
description: Namespace defines the space within which the secret
123-
name must be unique.
124-
type: string
125-
type: object
12676
type: object
12777
type: object
12878
served: true
12979
storage: true
13080
subresources:
13181
status: {}
132-
status:
133-
acceptedNames:
134-
kind: ""
135-
plural: ""
136-
conditions: []
137-
storedVersions: []

crds/objectstorage.k8s.io_bucketclaims.yaml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.4.1
6+
controller-gen.kubebuilder.io/version: v0.9.2
87
creationTimestamp: null
98
name: bucketclaims.objectstorage.k8s.io
109
spec:
@@ -35,27 +34,40 @@ spec:
3534
spec:
3635
properties:
3736
bucketClassName:
37+
description: Name of the BucketClass
3838
type: string
39-
bucketPrefix:
39+
existingBucketName:
40+
description: Name of a bucket object that was manually created to
41+
import a bucket created outside of COSI If unspecified, then a new
42+
Bucket will be dynamically provisioned
4043
type: string
44+
protocols:
45+
description: 'Protocols are the set of data API this bucket is required
46+
to support. The possible values for protocol are: - S3: Indicates
47+
Amazon S3 protocol - Azure: Indicates Microsoft Azure BlobStore
48+
protocol - GCS: Indicates Google Cloud Storage protocol'
49+
items:
50+
type: string
51+
type: array
52+
required:
53+
- protocols
4154
type: object
4255
status:
4356
properties:
44-
bucketAvailable:
45-
type: boolean
4657
bucketName:
58+
description: BucketName is the name of the provisioned Bucket in response
59+
to this BucketClaim. It is generated and set by the COSI controller
60+
before making the creation request to the OSP backend.
4761
type: string
48-
message:
49-
type: string
62+
bucketReady:
63+
description: BucketReady indicates that the bucket is ready for consumpotion
64+
by workloads
65+
type: boolean
66+
required:
67+
- bucketReady
5068
type: object
5169
type: object
5270
served: true
5371
storage: true
5472
subresources:
5573
status: {}
56-
status:
57-
acceptedNames:
58-
kind: ""
59-
plural: ""
60-
conditions: []
61-
storedVersions: []

0 commit comments

Comments
 (0)