Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix master e2e tests #1163

Merged
merged 4 commits into from
Nov 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ doc/source/_static/cluster-manager
python/build/
python/dist/
testing/scripts/proto

testing/scripts/test.log
python/.coverage

testing/scripts/tensorflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ''
resources:
- configmaps
verbs:
- get
- list
- watch
- apiGroups:
- ''
resources:
Expand Down
9 changes: 8 additions & 1 deletion operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Start a kind cluster

```
kind create cluster
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
```

Install CRD and cert-manager
Expand Down Expand Up @@ -60,7 +61,13 @@ When running update tls certificates locally
make tls-extract
```

Now delete the cluster Deployment as we will run the manager locally. After which you can run locally:
Now delete the cluster Deployment as we will run the manager locally:

```
kubectl delete deployment -n seldon-system seldon-controller-manager
```

Now we can run locally:

```
make run
Expand Down
5 changes: 4 additions & 1 deletion operator/api/v1alpha2/seldondeployment_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ func GetPort(name string, ports []corev1.ContainerPort) *corev1.ContainerPort {
}

func IsPrepack(pu *PredictiveUnit) bool {
return len(*pu.Implementation) > 0 && *pu.Implementation != SIMPLE_MODEL && *pu.Implementation != SIMPLE_ROUTER && *pu.Implementation != RANDOM_ABTEST && *pu.Implementation != AVERAGE_COMBINER
fmt.Println("checking whether isPrepack "+string(*pu.Implementation))
isPrepack := len(*pu.Implementation) > 0 && *pu.Implementation != SIMPLE_MODEL && *pu.Implementation != SIMPLE_ROUTER && *pu.Implementation != RANDOM_ABTEST && *pu.Implementation != AVERAGE_COMBINER && *pu.Implementation != UNKNOWN_IMPLEMENTATION
fmt.Println(strconv.FormatBool(isPrepack))
return isPrepack
}

func GetPrepackServerConfig(serverName string) PredictorServerConfig {
Expand Down
8 changes: 8 additions & 0 deletions operator/config/rbac/role_sas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down
15 changes: 9 additions & 6 deletions operator/controllers/seldondeployment_prepackaged_servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,16 @@ func createStandaloneModelServers(r *SeldonDeploymentReconciler, mlDep *machinel
deploy = createDeploymentWithoutEngine(depName, seldonId, sPodSpec, p, mlDep)
}

ServerConfig := machinelearningv1alpha2.GetPrepackServerConfig(string(*pu.Implementation))
if machinelearningv1alpha2.IsPrepack(pu) {

if err := addModelDefaultServers(r, pu, p, deploy, ServerConfig); err != nil {
return err
}
if err := addTFServerContainer(r, pu, p, deploy, ServerConfig); err != nil {
return err
ServerConfig := machinelearningv1alpha2.GetPrepackServerConfig(string(*pu.Implementation))

if err := addModelDefaultServers(r, pu, p, deploy, ServerConfig); err != nil {
return err
}
if err := addTFServerContainer(r, pu, p, deploy, ServerConfig); err != nil {
return err
}
}

if !existing {
Expand Down
10 changes: 7 additions & 3 deletions testing/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ Activate kind kubernetes config:
export KUBECONFIG="$(kind get kubeconfig-path)"
```

Then to run the tests:
Then to run the tests and log output to a file:

```
make test
make test > test.log
```


To also follow controller logs in a separate terminal:
```
export KUBECONFIG="$(kind get kubeconfig-path)"
kubectl logs -f -n seldon-system $(kubectl get pods -n seldon-system -l app=seldon -o jsonpath='{.items[0].metadata.name}')
```