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

removes policy action, adds bucketaccessinfo #47

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
46 changes: 46 additions & 0 deletions apis/objectstorage.k8s.io/v1alpha1/access_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package v1alpha1

import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:scope=Namespaced
// +kubebuilder:storageversion

type BucketAccessInfo struct {
metav1.TypeMeta `json:",inline"`

// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`

S3 *S3BucketAccessInfo `json:"s3,omitempty"`
Azure *AzureBucketAccessInfo `json:"azure,omitempty"`
Gcs *GCSBucketAccessInfo `json:"gcs,omitempty"`
}

type S3BucketAccessInfo struct {
Endpoint string `json:"endpoint,omitempty"`
BucketName string `json:"bucketName,omitempty"`
Region string `json:"region,omitempty"`
Credentials string `json:"credentials,omitempty"`
Certificates string `json:"certificates,omitempty"`
SignatureVersion S3SignatureVersion `json:"signatureVersion,omitempty"`
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought we are going to remove "SignatureVersion" and "Certificates"?


type AzureBucketAccessInfo struct {
Endpoint string `json:"endpoint,omitempty"` // scheme is mandatory in the URL
StorageAccountName string `json:"storageAccountName,omitempty"` // This is the equivalent of bucket name + access key
ContainerName string `json:"containerName,omitempty"` // Optional. This is a prefix at the root of the bucket
SecretKey string `json:"secretKey,omitempty"` // This is the equivalent of secret key
}

type GCSBucketAccessInfo struct {
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

type BucketAccessInfoList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []BucketAccessInfo `json:"items"`
}
212 changes: 200 additions & 12 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.

4 changes: 0 additions & 4 deletions apis/objectstorage.k8s.io/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ type BucketAccessClass struct {
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`

PolicyActionsConfigMap *corev1.ObjectReference `json:"policyActionsConfigMap,omitempty"`

// +optional
Parameters map[string]string `json:"parameters,omitempty"`
}
Expand Down Expand Up @@ -245,8 +243,6 @@ type BucketAccessSpec struct {
// +optional
ServiceAccount *corev1.ObjectReference `json:"serviceAccount,omitempty"`

PolicyActionsConfigMapData string `json:"policyActionsConfigMapData,omitempty"`

// +optional
Parameters map[string]string `json:"parameters,omitempty"`
}
Expand Down
Loading