mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
Updated makefile. Updated tests.
This commit is contained in:
parent
6abd51cec0
commit
b5c88a590f
3 changed files with 11 additions and 8 deletions
7
Makefile
7
Makefile
|
@ -150,7 +150,10 @@ update-vendor:
|
|||
|
||||
|
||||
.PHONY: update-generated
|
||||
update-generated: $(GOBUILDDIR)
|
||||
update-generated:
|
||||
@rm -f $(ORGDIR)
|
||||
@mkdir -p $(ORGDIR)
|
||||
@ln -s -f $(SCRIPTDIR) $(ORGDIR)
|
||||
$(VENDORDIR)/k8s.io/code-generator/generate-groups.sh \
|
||||
"all" \
|
||||
"github.com/arangodb/kube-arangodb/pkg/generated" \
|
||||
|
@ -172,7 +175,7 @@ dashboard/assets.go: $(DASHBOARDSOURCES) $(DASHBOARDDIR)/Dockerfile.build
|
|||
-v $(DASHBOARDDIR)/public:/usr/code/public:ro \
|
||||
-v $(DASHBOARDDIR)/src:/usr/code/src:ro \
|
||||
$(DASHBOARDBUILDIMAGE)
|
||||
$(GOASSETSBUILDER) -s /dashboard/build/ -o dashboard/assets.go -p dashboard dashboard/build
|
||||
go run github.com/jessevdk/go-assets-builder -s /dashboard/build/ -o dashboard/assets.go -p dashboard dashboard/build
|
||||
|
||||
$(BIN): $(SOURCES) dashboard/assets.go
|
||||
@mkdir -p $(BINDIR)
|
||||
|
|
|
@ -43,7 +43,7 @@ import (
|
|||
// waitUntilReplicationNotFound waits until a replication resource is deleted
|
||||
func waitUntilReplicationNotFound(ns, name string, cli versioned.Interface) error {
|
||||
return retry.Retry(func() error {
|
||||
if _, err := cli.Replication().ArangoDeploymentReplications(ns).Get(name, metav1.GetOptions{}); k8sutil.IsNotFound(err) {
|
||||
if _, err := cli.ReplicationV1alpha().ArangoDeploymentReplications(ns).Get(name, metav1.GetOptions{}); k8sutil.IsNotFound(err) {
|
||||
return nil
|
||||
} else if err != nil {
|
||||
return err
|
||||
|
|
|
@ -34,7 +34,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
|
||||
"github.com/arangodb/arangosync/client"
|
||||
|
@ -541,12 +541,12 @@ func clusterHealthEqualsSpec(h driver.ClusterHealth, spec api.DeploymentSpec) er
|
|||
func updateDeployment(cli versioned.Interface, deploymentName, ns string, update func(*api.DeploymentSpec)) (*api.ArangoDeployment, error) {
|
||||
for {
|
||||
// Get current version
|
||||
current, err := cli.Database().ArangoDeployments(ns).Get(deploymentName, metav1.GetOptions{})
|
||||
current, err := cli.DatabaseV1alpha().ArangoDeployments(ns).Get(deploymentName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return nil, maskAny(err)
|
||||
}
|
||||
update(¤t.Spec)
|
||||
current, err = cli.Database().ArangoDeployments(ns).Update(current)
|
||||
current, err = cli.DatabaseV1alpha().ArangoDeployments(ns).Update(current)
|
||||
if k8sutil.IsConflict(err) {
|
||||
// Retry
|
||||
} else if err != nil {
|
||||
|
@ -558,7 +558,7 @@ func updateDeployment(cli versioned.Interface, deploymentName, ns string, update
|
|||
|
||||
// removeDeployment removes a deployment
|
||||
func removeDeployment(cli versioned.Interface, deploymentName, ns string) error {
|
||||
if err := cli.Database().ArangoDeployments(ns).Delete(deploymentName, nil); err != nil && k8sutil.IsNotFound(err) {
|
||||
if err := cli.DatabaseV1alpha().ArangoDeployments(ns).Delete(deploymentName, nil); err != nil && k8sutil.IsNotFound(err) {
|
||||
return maskAny(err)
|
||||
}
|
||||
return nil
|
||||
|
@ -566,7 +566,7 @@ func removeDeployment(cli versioned.Interface, deploymentName, ns string) error
|
|||
|
||||
// removeReplication removes a deployment
|
||||
func removeReplication(cli versioned.Interface, replicationName, ns string) error {
|
||||
if err := cli.Replication().ArangoDeploymentReplications(ns).Delete(replicationName, nil); err != nil && k8sutil.IsNotFound(err) {
|
||||
if err := cli.ReplicationV1alpha().ArangoDeploymentReplications(ns).Delete(replicationName, nil); err != nil && k8sutil.IsNotFound(err) {
|
||||
return maskAny(err)
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue