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

use bucketName instead of bucketName and bucketInstanceName #35

Merged
merged 3 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 22 additions & 17 deletions apis/objectstorage.k8s.io/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions apis/objectstorage.k8s.io/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ type BucketRequest struct {
}

type BucketRequestSpec struct {
// +optional
BucketInstanceName string `json:"bucketInstanceName,omitempty"`

// +optional
BucketPrefix string `json:"bucketPrefix,omitempty"`

Expand All @@ -133,6 +130,9 @@ type BucketRequestStatus struct {

// +optional
BucketAvailable bool `json:"bucketAvailable"`

// +optional
BucketName string `json:"bucketName,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down Expand Up @@ -231,7 +231,7 @@ type BucketAccess struct {

type BucketAccessSpec struct {
// +optional
BucketInstanceName string `json:"bucketInstanceName,omitempty"`
BucketName string `json:"bucketName,omitempty"`

// +optional
BucketAccessRequest *corev1.ObjectReference `json:"bucketAccessRequest,omitempty"`
Expand Down Expand Up @@ -288,13 +288,12 @@ type BucketAccessRequest struct {
type BucketAccessRequestSpec struct {
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`

BucketRequestName string `json:"bucketRequestName"`
// +optional
BucketRequestName string `json:"bucketRequestName,omitempty"`
// +optional
BucketName string `json:"bucketName,omitempty"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for the brownfield usecase


BucketAccessClassName string `json:"bucketAccessClassName"`

// +optional
BucketAccessName string `json:"bucketAccessName,omitempty"`
}

type BucketAccessRequestStatus struct {
Expand All @@ -303,6 +302,9 @@ type BucketAccessRequestStatus struct {

// +optional
AccessGranted bool `json:"accessGranted"`

// +optional
BucketAccessName string `json:"bucketAccessName,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
2 changes: 1 addition & 1 deletion crds/objectstorage.k8s.io_bucketaccesses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ spec:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
bucketInstanceName:
bucketName:
type: string
mintedSecretName:
type: string
Expand Down
5 changes: 3 additions & 2 deletions crds/objectstorage.k8s.io_bucketaccessrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,21 @@ spec:
properties:
bucketAccessClassName:
type: string
bucketAccessName:
bucketName:
type: string
bucketRequestName:
type: string
serviceAccountName:
type: string
required:
- bucketAccessClassName
- bucketRequestName
Copy link

@jeffvance jeffvance Mar 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. BR-name is still needed in BAR.spec to handle sharing w/in the same namespace. (If I'm understanding this change correctly).
  2. bucketName needs to be in BAR.spec (per latest kep pr).
  3. 1 & 2 are mutually exclusive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this line, it is only being removed from the REQUIRED list. Since it is either or with bucketName

type: object
status:
properties:
accessGranted:
type: boolean
bucketAccessName:
type: string
message:
type: string
type: object
Expand Down
4 changes: 2 additions & 2 deletions crds/objectstorage.k8s.io_bucketrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ spec:
properties:
bucketClassName:
type: string
bucketInstanceName:
type: string
bucketPrefix:
type: string
type: object
status:
properties:
bucketAvailable:
type: boolean
bucketName:
type: string
message:
type: string
type: object
Expand Down