@@ -34,7 +34,7 @@ import (
3434 "testing"
3535 "time"
3636
37- "k8s.io/api/core/v1"
37+ v1 "k8s.io/api/core/v1"
3838 "k8s.io/client-go/kubernetes"
3939
4040 "github.com/arangodb/arangosync/client"
@@ -541,12 +541,12 @@ func clusterHealthEqualsSpec(h driver.ClusterHealth, spec api.DeploymentSpec) er
541541func updateDeployment (cli versioned.Interface , deploymentName , ns string , update func (* api.DeploymentSpec )) (* api.ArangoDeployment , error ) {
542542 for {
543543 // Get current version
544- current , err := cli .Database ().ArangoDeployments (ns ).Get (deploymentName , metav1.GetOptions {})
544+ current , err := cli .DatabaseV1alpha ().ArangoDeployments (ns ).Get (deploymentName , metav1.GetOptions {})
545545 if err != nil {
546546 return nil , maskAny (err )
547547 }
548548 update (& current .Spec )
549- current , err = cli .Database ().ArangoDeployments (ns ).Update (current )
549+ current , err = cli .DatabaseV1alpha ().ArangoDeployments (ns ).Update (current )
550550 if k8sutil .IsConflict (err ) {
551551 // Retry
552552 } else if err != nil {
@@ -558,15 +558,15 @@ func updateDeployment(cli versioned.Interface, deploymentName, ns string, update
558558
559559// removeDeployment removes a deployment
560560func removeDeployment (cli versioned.Interface , deploymentName , ns string ) error {
561- if err := cli .Database ().ArangoDeployments (ns ).Delete (deploymentName , nil ); err != nil && k8sutil .IsNotFound (err ) {
561+ if err := cli .DatabaseV1alpha ().ArangoDeployments (ns ).Delete (deploymentName , nil ); err != nil && k8sutil .IsNotFound (err ) {
562562 return maskAny (err )
563563 }
564564 return nil
565565}
566566
567567// removeReplication removes a deployment
568568func removeReplication (cli versioned.Interface , replicationName , ns string ) error {
569- if err := cli .Replication ().ArangoDeploymentReplications (ns ).Delete (replicationName , nil ); err != nil && k8sutil .IsNotFound (err ) {
569+ if err := cli .ReplicationV1alpha ().ArangoDeploymentReplications (ns ).Delete (replicationName , nil ); err != nil && k8sutil .IsNotFound (err ) {
570570 return maskAny (err )
571571 }
572572 return nil
0 commit comments