Move around some packages (#658)

* Move tracing exporter registration

This doesn't belong in the library and should be configured by the
consumer of the opencensus package.

* Rename `vkublet` package to `node`

`vkubelet` does not convey any information to the consumers of the
package.
Really it would be nice to move this package to the root of the repo,
but then you wind up with... interesting... import semantics due to the
repo name... and after thinking about it some, a subpackage is really
not so bad as long as it has a name that convey's some information.

`node` was chosen since this package deals with all the semantics of
operating a node in Kubernetes.
This commit is contained in:
Brian Goff
2019-06-12 05:11:49 -07:00
committed by Pires
parent 65b32a0fef
commit a54753cb82
42 changed files with 123 additions and 121 deletions

View File

@@ -7,9 +7,9 @@ import (
"testing"
"time"
"github.com/virtual-kubelet/virtual-kubelet/vkubelet"
"github.com/virtual-kubelet/virtual-kubelet/node"
"gotest.tools/assert"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1"
)
@@ -237,7 +237,7 @@ func TestCreatePodWithOptionalInexistentSecrets(t *testing.T) {
}
// Wait for an event concerning the missing secret to be reported on the pod.
if err := f.WaitUntilPodEventWithReason(pod, vkubelet.ReasonOptionalSecretNotFound); err != nil {
if err := f.WaitUntilPodEventWithReason(pod, node.ReasonOptionalSecretNotFound); err != nil {
t.Fatal(err)
}
@@ -266,7 +266,7 @@ func TestCreatePodWithMandatoryInexistentSecrets(t *testing.T) {
}()
// Wait for an event concerning the missing secret to be reported on the pod.
if err := f.WaitUntilPodEventWithReason(pod, vkubelet.ReasonMandatorySecretNotFound); err != nil {
if err := f.WaitUntilPodEventWithReason(pod, node.ReasonMandatorySecretNotFound); err != nil {
t.Fatal(err)
}
@@ -300,7 +300,7 @@ func TestCreatePodWithOptionalInexistentConfigMap(t *testing.T) {
}
// Wait for an event concerning the missing config map to be reported on the pod.
if err := f.WaitUntilPodEventWithReason(pod, vkubelet.ReasonOptionalConfigMapNotFound); err != nil {
if err := f.WaitUntilPodEventWithReason(pod, node.ReasonOptionalConfigMapNotFound); err != nil {
t.Fatal(err)
}
@@ -329,7 +329,7 @@ func TestCreatePodWithMandatoryInexistentConfigMap(t *testing.T) {
}()
// Wait for an event concerning the missing config map to be reported on the pod.
if err := f.WaitUntilPodEventWithReason(pod, vkubelet.ReasonMandatoryConfigMapNotFound); err != nil {
if err := f.WaitUntilPodEventWithReason(pod, node.ReasonMandatoryConfigMapNotFound); err != nil {
t.Fatal(err)
}