1ea1713d6e
Adds a Kubernetes operator that provisions Ceph RGW (S3) buckets and access keys declaratively through the Ceph manager dashboard REST API. Three CRDs in group ceph.unkin.net/v1alpha1: - ObjectStoreUser: creates an RGW user, delivers its key pair to a Secret - Bucket: creates an S3 bucket owned by an ObjectStoreUser; owns the bucket's aggregate S3 policy (union of all BucketAccess grants) - BucketAccess: grants read-only/read-write/full access, provisioning a dedicated user (or reusing a referenced one) and delivering RW/RO keys The internal/ceph client wraps the dashboard /api/auth, /api/rgw/user and /api/rgw/bucket endpoints with lazy token auth and re-auth on 401. Bucket policies are rendered deterministically and applied via the bucket policy API (Reef 18.2+). Credentials come from the cephrgw-credentials Secret via env. Includes generated CRDs/RBAC, samples, kind manifests, Woodpecker CI, and docs/ceph-setup.md covering the required Ceph dashboard account, RGW wiring and permissions.
391 lines
11 KiB
Go
391 lines
11 KiB
Go
//go:build !ignore_autogenerated
|
|
|
|
// Code generated by controller-gen. DO NOT EDIT.
|
|
|
|
package v1alpha1
|
|
|
|
import (
|
|
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
)
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *Bucket) DeepCopyInto(out *Bucket) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
|
in.Status.DeepCopyInto(&out.Status)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bucket.
|
|
func (in *Bucket) DeepCopy() *Bucket {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(Bucket)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *Bucket) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *BucketAccess) DeepCopyInto(out *BucketAccess) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
out.Spec = in.Spec
|
|
in.Status.DeepCopyInto(&out.Status)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccess.
|
|
func (in *BucketAccess) DeepCopy() *BucketAccess {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(BucketAccess)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *BucketAccess) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *BucketAccessList) DeepCopyInto(out *BucketAccessList) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
if in.Items != nil {
|
|
in, out := &in.Items, &out.Items
|
|
*out = make([]BucketAccess, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccessList.
|
|
func (in *BucketAccessList) DeepCopy() *BucketAccessList {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(BucketAccessList)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *BucketAccessList) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *BucketAccessSpec) DeepCopyInto(out *BucketAccessSpec) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccessSpec.
|
|
func (in *BucketAccessSpec) DeepCopy() *BucketAccessSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(BucketAccessSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *BucketAccessStatus) DeepCopyInto(out *BucketAccessStatus) {
|
|
*out = *in
|
|
if in.Conditions != nil {
|
|
in, out := &in.Conditions, &out.Conditions
|
|
*out = make([]v1.Condition, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccessStatus.
|
|
func (in *BucketAccessStatus) DeepCopy() *BucketAccessStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(BucketAccessStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *BucketList) DeepCopyInto(out *BucketList) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
if in.Items != nil {
|
|
in, out := &in.Items, &out.Items
|
|
*out = make([]Bucket, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketList.
|
|
func (in *BucketList) DeepCopy() *BucketList {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(BucketList)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *BucketList) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *BucketSpec) DeepCopyInto(out *BucketSpec) {
|
|
*out = *in
|
|
if in.ObjectLock != nil {
|
|
in, out := &in.ObjectLock, &out.ObjectLock
|
|
*out = new(ObjectLock)
|
|
(*in).DeepCopyInto(*out)
|
|
}
|
|
if in.Quota != nil {
|
|
in, out := &in.Quota, &out.Quota
|
|
*out = new(Quota)
|
|
(*in).DeepCopyInto(*out)
|
|
}
|
|
if in.Tags != nil {
|
|
in, out := &in.Tags, &out.Tags
|
|
*out = make(map[string]string, len(*in))
|
|
for key, val := range *in {
|
|
(*out)[key] = val
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketSpec.
|
|
func (in *BucketSpec) DeepCopy() *BucketSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(BucketSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *BucketStatus) DeepCopyInto(out *BucketStatus) {
|
|
*out = *in
|
|
if in.Conditions != nil {
|
|
in, out := &in.Conditions, &out.Conditions
|
|
*out = make([]v1.Condition, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketStatus.
|
|
func (in *BucketStatus) DeepCopy() *BucketStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(BucketStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *ObjectLock) DeepCopyInto(out *ObjectLock) {
|
|
*out = *in
|
|
if in.Days != nil {
|
|
in, out := &in.Days, &out.Days
|
|
*out = new(int32)
|
|
**out = **in
|
|
}
|
|
if in.Years != nil {
|
|
in, out := &in.Years, &out.Years
|
|
*out = new(int32)
|
|
**out = **in
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectLock.
|
|
func (in *ObjectLock) DeepCopy() *ObjectLock {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(ObjectLock)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *ObjectStoreUser) DeepCopyInto(out *ObjectStoreUser) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
|
in.Status.DeepCopyInto(&out.Status)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectStoreUser.
|
|
func (in *ObjectStoreUser) DeepCopy() *ObjectStoreUser {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(ObjectStoreUser)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *ObjectStoreUser) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *ObjectStoreUserList) DeepCopyInto(out *ObjectStoreUserList) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
if in.Items != nil {
|
|
in, out := &in.Items, &out.Items
|
|
*out = make([]ObjectStoreUser, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectStoreUserList.
|
|
func (in *ObjectStoreUserList) DeepCopy() *ObjectStoreUserList {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(ObjectStoreUserList)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *ObjectStoreUserList) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *ObjectStoreUserSpec) DeepCopyInto(out *ObjectStoreUserSpec) {
|
|
*out = *in
|
|
if in.MaxBuckets != nil {
|
|
in, out := &in.MaxBuckets, &out.MaxBuckets
|
|
*out = new(int32)
|
|
**out = **in
|
|
}
|
|
if in.Quota != nil {
|
|
in, out := &in.Quota, &out.Quota
|
|
*out = new(Quota)
|
|
(*in).DeepCopyInto(*out)
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectStoreUserSpec.
|
|
func (in *ObjectStoreUserSpec) DeepCopy() *ObjectStoreUserSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(ObjectStoreUserSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *ObjectStoreUserStatus) DeepCopyInto(out *ObjectStoreUserStatus) {
|
|
*out = *in
|
|
if in.Conditions != nil {
|
|
in, out := &in.Conditions, &out.Conditions
|
|
*out = make([]v1.Condition, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectStoreUserStatus.
|
|
func (in *ObjectStoreUserStatus) DeepCopy() *ObjectStoreUserStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(ObjectStoreUserStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *Quota) DeepCopyInto(out *Quota) {
|
|
*out = *in
|
|
if in.MaxSizeBytes != nil {
|
|
in, out := &in.MaxSizeBytes, &out.MaxSizeBytes
|
|
*out = new(int64)
|
|
**out = **in
|
|
}
|
|
if in.MaxObjects != nil {
|
|
in, out := &in.MaxObjects, &out.MaxObjects
|
|
*out = new(int64)
|
|
**out = **in
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Quota.
|
|
func (in *Quota) DeepCopy() *Quota {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(Quota)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *SecretKeyRef) DeepCopyInto(out *SecretKeyRef) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeyRef.
|
|
func (in *SecretKeyRef) DeepCopy() *SecretKeyRef {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(SecretKeyRef)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|