Add ProviderRef and fix comments and group names

This commit is contained in:
Luke Weber 2018-11-14 20:33:31 -08:00
parent 627a9342a5
commit bb10a4b099
8 changed files with 42 additions and 28 deletions

View File

@ -17,7 +17,7 @@ limitations under the License.
// Package v1alpha1 contains API Schema definitions for the storage v1alpha1 API group
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=github.com/upbound/conductor/pkg/apis/aws/database
// +k8s:conversion-gen=github.com/upbound/conductor/pkg/apis/aws/storage
// +k8s:defaulter-gen=TypeMeta
// +groupName=storage.aws.conductor.io
package v1alpha1

View File

@ -16,10 +16,10 @@ limitations under the License.
// NOTE: Boilerplate only. Ignore this file.
// Package v1alpha1 contains API Schema definitions for the database v1alpha1 API group
// Package v1alpha1 contains API Schema definitions for the storage v1alpha1 API group
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=github.com/upbound/conductor/pkg/apis/aws/database
// +k8s:conversion-gen=github.com/upbound/conductor/pkg/apis/aws/storage
// +k8s:defaulter-gen=TypeMeta
// +groupName=storage.aws.conductor.io
package v1alpha1

View File

@ -17,6 +17,8 @@ limitations under the License.
package v1alpha1
import (
corev1alpha1 "github.com/upbound/conductor/pkg/apis/core/v1alpha1"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
@ -25,16 +27,19 @@ import (
// S3BucketSpec defines the desired state of S3Bucket
type S3BucketSpec struct {
Name string `json:"name,omitempty"`
Name string `json:"name,omitempty"`
Region string `json:"region,omitempty"`
// PredefinedACL is OneOf - private, public-read, public-read-write, authenticated-read bucket-owner-read bucket-owner-full-control aws-exec-read log-delivery-write
PredefinedACL string `json:"predefinedACL,omitempty"`
Versioning bool `json:"versioning"`
// PredefinedACL is one of:
// private, public-read, public-read-write, authenticated-read bucket-owner-read
// bucket-owner-full-control, aws-exec-read, log-delivery-write
PredefinedACL string `json:"predefinedACL,omitempty"`
Versioning bool `json:"versioning"`
ProviderRef v1.LocalObjectReference `json:"providerRef"`
}
// S3BucketStatus defines the observed state of S3Bucket
type S3BucketStatus struct {
State string `json:"state,omitempty"`
corev1alpha1.ConditionedStatus
Message string `json:"message,omitempty"`
ProviderID string `json:"providerID,omitempty"` // the external ID to identify this resource in the cloud provider
}
@ -42,7 +47,7 @@ type S3BucketStatus struct {
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// S3Bucket is the Schema for the instances API
// S3Bucket is the Schema for the S3Bucket API
// +k8s:openapi-gen=true
type S3Bucket struct {
metav1.TypeMeta `json:",inline"`

View File

@ -29,7 +29,7 @@ func (in *S3Bucket) DeepCopyInto(out *S3Bucket) {
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
out.Status = in.Status
in.Status.DeepCopyInto(&out.Status)
return
}
@ -87,6 +87,7 @@ func (in *S3BucketList) DeepCopyObject() runtime.Object {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *S3BucketSpec) DeepCopyInto(out *S3BucketSpec) {
*out = *in
out.ProviderRef = in.ProviderRef
return
}
@ -103,6 +104,7 @@ func (in *S3BucketSpec) DeepCopy() *S3BucketSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *S3BucketStatus) DeepCopyInto(out *S3BucketStatus) {
*out = *in
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
return
}

View File

@ -17,6 +17,8 @@ limitations under the License.
package v1alpha1
import (
corev1alpha1 "github.com/upbound/conductor/pkg/apis/core/v1alpha1"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
@ -29,19 +31,22 @@ type GoogleBucketSpec struct {
// Location - See authoritative list https://developers.google.com/storage/docs/bucket-locations
// Which you use is dependent on whether it's multi_region or not.
Location string `json:"region,omitempty"`
Location string `json:"location,omitempty"`
// PredefinedACL is OneOf - private, authenticatedRead, projectPrivate, publicRead, publicReadWrite
PredefinedACL *string `json:"cannedACL,omitempty"`
//StorageClass one of MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD
StorageClass *string `json:"storageClass,omitempty"`
Versioning bool `json:"versioning,omitempty"`
//StorageClass one of
// MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and DURABLE_REDUCED_AVAILABILITY.
// If this value is not specified when the bucket is created, it will default to STANDARD
StorageClass *string `json:"storageClass,omitempty"`
Versioning bool `json:"versioning,omitempty"`
ProviderRef v1.LocalObjectReference `json:"providerRef"`
}
// S3BucketStatus defines the observed state of RDSInstance
type S3BucketStatus struct {
State string `json:"state,omitempty"`
// S3BucketStatus defines the observed state of GoogleBucket
type GoogleBucketStatus struct {
corev1alpha1.ConditionedStatus
Message string `json:"message,omitempty"`
ProviderID string `json:"providerID,omitempty"` // the external ID to identify this resource in the cloud provider
}
@ -49,14 +54,14 @@ type S3BucketStatus struct {
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// GoogleBucket is the Schema for the instances API
// GoogleBucket is the Schema for the GoogleBucket API
// +k8s:openapi-gen=true
type GoogleBucket struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec GoogleBucketSpec `json:"spec,omitempty"`
Status S3BucketStatus `json:"status,omitempty"`
Spec GoogleBucketSpec `json:"spec,omitempty"`
Status GoogleBucketStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

View File

@ -17,7 +17,7 @@ limitations under the License.
// Package v1alpha1 contains API Schema definitions for the storage v1alpha1 API group
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=github.com/upbound/conductor/pkg/apis/aws/database
// +k8s:conversion-gen=github.com/upbound/conductor/pkg/apis/aws/storage
// +k8s:defaulter-gen=TypeMeta
// +groupName=storage.gcp.conductor.io
package v1alpha1

View File

@ -16,10 +16,10 @@ limitations under the License.
// NOTE: Boilerplate only. Ignore this file.
// Package v1alpha1 contains API Schema definitions for the database v1alpha1 API group
// Package v1alpha1 contains API Schema definitions for the storage v1alpha1 API group
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=github.com/upbound/conductor/pkg/apis/aws/database
// +k8s:conversion-gen=github.com/upbound/conductor/pkg/apis/gcp/storage
// +k8s:defaulter-gen=TypeMeta
// +groupName=storage.gcp.conductor.io
package v1alpha1

View File

@ -29,7 +29,7 @@ func (in *GoogleBucket) DeepCopyInto(out *GoogleBucket) {
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
out.Status = in.Status
in.Status.DeepCopyInto(&out.Status)
return
}
@ -97,6 +97,7 @@ func (in *GoogleBucketSpec) DeepCopyInto(out *GoogleBucketSpec) {
*out = new(string)
**out = **in
}
out.ProviderRef = in.ProviderRef
return
}
@ -111,17 +112,18 @@ func (in *GoogleBucketSpec) DeepCopy() *GoogleBucketSpec {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *S3BucketStatus) DeepCopyInto(out *S3BucketStatus) {
func (in *GoogleBucketStatus) DeepCopyInto(out *GoogleBucketStatus) {
*out = *in
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3BucketStatus.
func (in *S3BucketStatus) DeepCopy() *S3BucketStatus {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleBucketStatus.
func (in *GoogleBucketStatus) DeepCopy() *GoogleBucketStatus {
if in == nil {
return nil
}
out := new(S3BucketStatus)
out := new(GoogleBucketStatus)
in.DeepCopyInto(out)
return out
}