Merge pull request #500 from negz/providervalidation
Remove Provider validation checks, and thus Provider controllers
This commit is contained in:
commit
8668139fee
|
@ -19,8 +19,6 @@ package v1alpha1
|
|||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
corev1alpha1 "github.com/crossplaneio/crossplane/pkg/apis/core/v1alpha1"
|
||||
)
|
||||
|
||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
||||
|
@ -36,11 +34,6 @@ type ProviderSpec struct {
|
|||
Secret corev1.SecretKeySelector `json:"credentialsSecretRef"`
|
||||
}
|
||||
|
||||
// ProviderStatus represents the status of an AWS Provider.
|
||||
type ProviderStatus struct {
|
||||
corev1alpha1.DeprecatedConditionedStatus
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
|
@ -52,7 +45,6 @@ type Provider struct {
|
|||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec ProviderSpec `json:"spec,omitempty"`
|
||||
Status ProviderStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
@ -63,8 +55,3 @@ type ProviderList struct {
|
|||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []Provider `json:"items"`
|
||||
}
|
||||
|
||||
// IsValid returns true if provider is valid (in ready state)
|
||||
func (p *Provider) IsValid() bool {
|
||||
return p.Status.IsReady()
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ func TestMain(m *testing.M) {
|
|||
t.StopAndExit(m.Run())
|
||||
}
|
||||
|
||||
func TestStorageProvider(t *testing.T) {
|
||||
func TestProvider(t *testing.T) {
|
||||
key := types.NamespacedName{Name: name, Namespace: namespace}
|
||||
created := &Provider{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
|
|
@ -29,7 +29,6 @@ func (in *Provider) DeepCopyInto(out *Provider) {
|
|||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -100,20 +99,3 @@ func (in *ProviderSpec) DeepCopy() *ProviderSpec {
|
|||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ProviderStatus) DeepCopyInto(out *ProviderStatus) {
|
||||
*out = *in
|
||||
in.DeprecatedConditionedStatus.DeepCopyInto(&out.DeprecatedConditionedStatus)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderStatus.
|
||||
func (in *ProviderStatus) DeepCopy() *ProviderStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProviderStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
|
|
@ -33,11 +33,6 @@ type ProviderSpec struct {
|
|||
Secret corev1.SecretKeySelector `json:"credentialsSecretRef"`
|
||||
}
|
||||
|
||||
// ProviderStatus is the status for this provider
|
||||
type ProviderStatus struct {
|
||||
corev1alpha1.DeprecatedConditionedStatus
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
|
@ -49,7 +44,6 @@ type Provider struct {
|
|||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec ProviderSpec `json:"spec,omitempty"`
|
||||
Status ProviderStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
@ -61,11 +55,6 @@ type ProviderList struct {
|
|||
Items []Provider `json:"items"`
|
||||
}
|
||||
|
||||
// IsValid returns true if provider is valid (in ready state)
|
||||
func (p *Provider) IsValid() bool {
|
||||
return p.Status.IsReady()
|
||||
}
|
||||
|
||||
// ResourceGroupSpec defines the desired state of Resource Group
|
||||
type ResourceGroupSpec struct {
|
||||
// Important: Run "make generate" to regenerate code after modifying this file
|
||||
|
|
|
@ -46,7 +46,7 @@ func TestMain(m *testing.M) {
|
|||
t.StopAndExit(m.Run())
|
||||
}
|
||||
|
||||
func TestStorageProvider(t *testing.T) {
|
||||
func TestProvider(t *testing.T) {
|
||||
key := types.NamespacedName{Name: name, Namespace: namespace}
|
||||
created := &Provider{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
|
|
@ -30,7 +30,6 @@ func (in *Provider) DeepCopyInto(out *Provider) {
|
|||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -102,23 +101,6 @@ func (in *ProviderSpec) DeepCopy() *ProviderSpec {
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ProviderStatus) DeepCopyInto(out *ProviderStatus) {
|
||||
*out = *in
|
||||
in.DeprecatedConditionedStatus.DeepCopyInto(&out.DeprecatedConditionedStatus)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderStatus.
|
||||
func (in *ProviderStatus) DeepCopy() *ProviderStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProviderStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceGroup) DeepCopyInto(out *ResourceGroup) {
|
||||
*out = *in
|
||||
|
|
|
@ -19,8 +19,6 @@ package v1alpha1
|
|||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
corev1alpha1 "github.com/crossplaneio/crossplane/pkg/apis/core/v1alpha1"
|
||||
)
|
||||
|
||||
// ProviderSpec defines the desired state of Provider
|
||||
|
@ -37,11 +35,6 @@ type ProviderSpec struct {
|
|||
RequiredPermissions []string `json:"requiredPermissions,omitempty"`
|
||||
}
|
||||
|
||||
// ProviderStatus represents the status of a GCP Provider.
|
||||
type ProviderStatus struct {
|
||||
corev1alpha1.DeprecatedConditionedStatus
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
|
@ -55,7 +48,6 @@ type Provider struct {
|
|||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec ProviderSpec `json:"spec,omitempty"`
|
||||
Status ProviderStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
@ -66,8 +58,3 @@ type ProviderList struct {
|
|||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []Provider `json:"items"`
|
||||
}
|
||||
|
||||
// IsValid returns true if provider is valid (in ready state)
|
||||
func (p *Provider) IsValid() bool {
|
||||
return p.Status.IsReady()
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ func TestMain(m *testing.M) {
|
|||
t.StopAndExit(m.Run())
|
||||
}
|
||||
|
||||
func TestStorageProvider(t *testing.T) {
|
||||
func TestProvider(t *testing.T) {
|
||||
key := types.NamespacedName{Name: name, Namespace: namespace}
|
||||
created := &Provider{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
|
|
@ -29,7 +29,6 @@ func (in *Provider) DeepCopyInto(out *Provider) {
|
|||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -105,20 +104,3 @@ func (in *ProviderSpec) DeepCopy() *ProviderSpec {
|
|||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ProviderStatus) DeepCopyInto(out *ProviderStatus) {
|
||||
*out = *in
|
||||
in.DeprecatedConditionedStatus.DeepCopyInto(&out.DeprecatedConditionedStatus)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderStatus.
|
||||
func (in *ProviderStatus) DeepCopy() *ProviderStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProviderStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue