Skip to content

Commit

Permalink
Merge pull request crossplane-contrib#25 from hasheddan/ismanagedkind
Browse files Browse the repository at this point in the history
claim predicates: remove hasdirectclassreferencekind in favor of ismanagedkind
  • Loading branch information
negz authored Sep 27, 2019
2 parents 4e8d190 + 780baf5 commit f7cadd6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

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

2 changes: 1 addition & 1 deletion pkg/controller/aws/cache/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (c *ReplicationGroupClaimController) SetupWithManager(mgr ctrl.Manager) err

p := resource.NewPredicates(resource.AnyOf(
resource.HasManagedResourceReferenceKind(resource.ManagedKind(v1alpha2.ReplicationGroupGroupVersionKind)),
resource.HasDirectClassReferenceKind(resource.NonPortableClassKind(v1alpha2.ReplicationGroupClassGroupVersionKind)),
resource.IsManagedKind(resource.ManagedKind(v1alpha2.ReplicationGroupGroupVersionKind), mgr.GetScheme()),
resource.HasIndirectClassReferenceKind(mgr.GetClient(), mgr.GetScheme(), resource.ClassKinds{
Portable: cachev1alpha1.RedisClusterClassGroupVersionKind,
NonPortable: v1alpha2.ReplicationGroupClassGroupVersionKind,
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/aws/compute/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (c *EKSClusterClaimController) SetupWithManager(mgr ctrl.Manager) error {

p := resource.NewPredicates(resource.AnyOf(
resource.HasManagedResourceReferenceKind(resource.ManagedKind(v1alpha2.EKSClusterGroupVersionKind)),
resource.HasDirectClassReferenceKind(resource.NonPortableClassKind(v1alpha2.EKSClusterClassGroupVersionKind)),
resource.IsManagedKind(resource.ManagedKind(v1alpha2.EKSClusterGroupVersionKind), mgr.GetScheme()),
resource.HasIndirectClassReferenceKind(mgr.GetClient(), mgr.GetScheme(), resource.ClassKinds{
Portable: computev1alpha1.KubernetesClusterClassGroupVersionKind,
NonPortable: v1alpha2.EKSClusterClassGroupVersionKind,
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/aws/rds/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (c *PostgreSQLInstanceClaimController) SetupWithManager(mgr ctrl.Manager) e

p := resource.NewPredicates(resource.AnyOf(
resource.HasManagedResourceReferenceKind(resource.ManagedKind(v1alpha2.RDSInstanceGroupVersionKind)),
resource.HasDirectClassReferenceKind(resource.NonPortableClassKind(v1alpha2.RDSInstanceClassGroupVersionKind)),
resource.IsManagedKind(resource.ManagedKind(v1alpha2.RDSInstanceGroupVersionKind), mgr.GetScheme()),
resource.HasIndirectClassReferenceKind(mgr.GetClient(), mgr.GetScheme(), resource.ClassKinds{
Portable: databasev1alpha1.PostgreSQLInstanceClassGroupVersionKind,
NonPortable: v1alpha2.RDSInstanceClassGroupVersionKind,
Expand Down Expand Up @@ -138,7 +138,7 @@ func (c *MySQLInstanceClaimController) SetupWithManager(mgr ctrl.Manager) error

p := resource.NewPredicates(resource.AnyOf(
resource.HasManagedResourceReferenceKind(resource.ManagedKind(v1alpha2.RDSInstanceGroupVersionKind)),
resource.HasDirectClassReferenceKind(resource.NonPortableClassKind(v1alpha2.RDSInstanceClassGroupVersionKind)),
resource.IsManagedKind(resource.ManagedKind(v1alpha2.RDSInstanceGroupVersionKind), mgr.GetScheme()),
resource.HasIndirectClassReferenceKind(mgr.GetClient(), mgr.GetScheme(), resource.ClassKinds{
Portable: databasev1alpha1.MySQLInstanceClassGroupVersionKind,
NonPortable: v1alpha2.RDSInstanceClassGroupVersionKind,
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/aws/s3/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (c *BucketClaimController) SetupWithManager(mgr ctrl.Manager) error {

p := resource.NewPredicates(resource.AnyOf(
resource.HasManagedResourceReferenceKind(resource.ManagedKind(v1alpha2.S3BucketGroupVersionKind)),
resource.HasDirectClassReferenceKind(resource.NonPortableClassKind(v1alpha2.S3BucketClassGroupVersionKind)),
resource.IsManagedKind(resource.ManagedKind(v1alpha2.S3BucketGroupVersionKind), mgr.GetScheme()),
resource.HasIndirectClassReferenceKind(mgr.GetClient(), mgr.GetScheme(), resource.ClassKinds{
Portable: storagev1alpha1.BucketClassGroupVersionKind,
NonPortable: v1alpha2.S3BucketClassGroupVersionKind,
Expand Down

0 comments on commit f7cadd6

Please sign in to comment.