1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

Import from sigs.k8s.io/node-feature-discovery

This commit is contained in:
Markus Lehtonen 2018-11-28 14:30:03 +02:00
parent a7764bfc82
commit 47a97db35a
17 changed files with 34 additions and 34 deletions

View file

@ -1,9 +1,9 @@
# Build node feature discovery # Build node feature discovery
FROM golang:1.8 as builder FROM golang:1.8 as builder
ADD . /go/src/github.com/kubernetes-incubator/node-feature-discovery ADD . /go/src/sigs.k8s.io/node-feature-discovery
WORKDIR /go/src/github.com/kubernetes-incubator/node-feature-discovery WORKDIR /go/src/sigs.k8s.io/node-feature-discovery
ENV CMT_CAT_VERSION="v1.2.0" ENV CMT_CAT_VERSION="v1.2.0"
@ -25,7 +25,7 @@ RUN go get github.com/Masterminds/glide
RUN glide install --strip-vendor RUN glide install --strip-vendor
RUN go install \ RUN go install \
-ldflags "-s -w -X main.version=$NFD_VERSION" \ -ldflags "-s -w -X main.version=$NFD_VERSION" \
github.com/kubernetes-incubator/node-feature-discovery sigs.k8s.io/node-feature-discovery
RUN install -D -m644 node-feature-discovery.conf.example /etc/kubernetes/node-feature-discovery/node-feature-discovery.conf RUN install -D -m644 node-feature-discovery.conf.example /etc/kubernetes/node-feature-discovery/node-feature-discovery.conf
RUN go test . RUN go test .

28
main.go
View file

@ -12,20 +12,20 @@ import (
"github.com/docopt/docopt-go" "github.com/docopt/docopt-go"
"github.com/ghodss/yaml" "github.com/ghodss/yaml"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
"github.com/kubernetes-incubator/node-feature-discovery/source/cpuid" "sigs.k8s.io/node-feature-discovery/source/cpuid"
"github.com/kubernetes-incubator/node-feature-discovery/source/fake" "sigs.k8s.io/node-feature-discovery/source/fake"
"github.com/kubernetes-incubator/node-feature-discovery/source/iommu" "sigs.k8s.io/node-feature-discovery/source/iommu"
"github.com/kubernetes-incubator/node-feature-discovery/source/kernel" "sigs.k8s.io/node-feature-discovery/source/kernel"
"github.com/kubernetes-incubator/node-feature-discovery/source/local" "sigs.k8s.io/node-feature-discovery/source/local"
"github.com/kubernetes-incubator/node-feature-discovery/source/memory" "sigs.k8s.io/node-feature-discovery/source/memory"
"github.com/kubernetes-incubator/node-feature-discovery/source/network" "sigs.k8s.io/node-feature-discovery/source/network"
"github.com/kubernetes-incubator/node-feature-discovery/source/panic_fake" "sigs.k8s.io/node-feature-discovery/source/panic_fake"
"github.com/kubernetes-incubator/node-feature-discovery/source/pci" "sigs.k8s.io/node-feature-discovery/source/pci"
"github.com/kubernetes-incubator/node-feature-discovery/source/pstate" "sigs.k8s.io/node-feature-discovery/source/pstate"
"github.com/kubernetes-incubator/node-feature-discovery/source/rdt" "sigs.k8s.io/node-feature-discovery/source/rdt"
"github.com/kubernetes-incubator/node-feature-discovery/source/selinux" "sigs.k8s.io/node-feature-discovery/source/selinux"
"github.com/kubernetes-incubator/node-feature-discovery/source/storage" "sigs.k8s.io/node-feature-discovery/source/storage"
api "k8s.io/api/core/v1" api "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
k8sclient "k8s.io/client-go/kubernetes" k8sclient "k8s.io/client-go/kubernetes"

View file

@ -9,14 +9,14 @@ import (
"testing" "testing"
"time" "time"
"github.com/kubernetes-incubator/node-feature-discovery/source"
"github.com/kubernetes-incubator/node-feature-discovery/source/fake"
"github.com/kubernetes-incubator/node-feature-discovery/source/panic_fake"
. "github.com/smartystreets/goconvey/convey" . "github.com/smartystreets/goconvey/convey"
"github.com/vektra/errors" "github.com/vektra/errors"
api "k8s.io/api/core/v1" api "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
k8sclient "k8s.io/client-go/kubernetes" k8sclient "k8s.io/client-go/kubernetes"
"sigs.k8s.io/node-feature-discovery/source"
"sigs.k8s.io/node-feature-discovery/source/fake"
"sigs.k8s.io/node-feature-discovery/source/panic_fake"
) )
func TestDiscoveryWithMockSources(t *testing.T) { func TestDiscoveryWithMockSources(t *testing.T) {

View file

@ -1,7 +1,7 @@
package main package main
import ( import (
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
"github.com/stretchr/testify/mock" "github.com/stretchr/testify/mock"
) )

View file

@ -18,7 +18,7 @@ package cpuid
import ( import (
"github.com/klauspost/cpuid" "github.com/klauspost/cpuid"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
// Source implements FeatureSource. // Source implements FeatureSource.

View file

@ -16,7 +16,7 @@ limitations under the License.
package fake package fake
import "github.com/kubernetes-incubator/node-feature-discovery/source" import "sigs.k8s.io/node-feature-discovery/source"
// Source implements FeatureSource. // Source implements FeatureSource.
type Source struct{} type Source struct{}

View file

@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
// Implement FeatureSource interface // Implement FeatureSource interface

View file

@ -25,7 +25,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
// Configuration file options // Configuration file options

View file

@ -26,7 +26,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
// Config // Config

View file

@ -21,7 +21,7 @@ import (
"io/ioutil" "io/ioutil"
"strings" "strings"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
// Source implements FeatureSource. // Source implements FeatureSource.

View file

@ -25,7 +25,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
// Source implements FeatureSource. // Source implements FeatureSource.

View file

@ -16,7 +16,7 @@ limitations under the License.
package panic_fake package panic_fake
import "github.com/kubernetes-incubator/node-feature-discovery/source" import "sigs.k8s.io/node-feature-discovery/source"
// Source implements FeatureSource. // Source implements FeatureSource.
type Source struct{} type Source struct{}

View file

@ -24,7 +24,7 @@ import (
"path" "path"
"strings" "strings"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
type pciDeviceInfo map[string]string type pciDeviceInfo map[string]string

View file

@ -21,7 +21,7 @@ import (
"io/ioutil" "io/ioutil"
"runtime" "runtime"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
// Source implements FeatureSource. // Source implements FeatureSource.

View file

@ -20,7 +20,7 @@ import (
"os/exec" "os/exec"
"github.com/golang/glog" "github.com/golang/glog"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
// Source implements FeatureSource. // Source implements FeatureSource.

View file

@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
type Source struct{} type Source struct{}

View file

@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"github.com/kubernetes-incubator/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
// Source implements FeatureSource. // Source implements FeatureSource.