1
0
mirror of https://github.com/rancher/steve.git synced 2025-07-16 16:01:37 +00:00
This commit is contained in:
Darren Shepherd 2019-09-11 14:05:00 -07:00
parent 9e4f93989f
commit fab677b2ec
22 changed files with 57 additions and 57 deletions

View File

@ -3,11 +3,11 @@ COPY go.mod go.sum main.go /src/
COPY vendor /src/vendor/ COPY vendor /src/vendor/
COPY pkg /src/pkg/ COPY pkg /src/pkg/
RUN cd /src && \ RUN cd /src && \
CGO_ENABLED=0 go build -ldflags "-extldflags -static -s" -o /naok -mod=vendor CGO_ENABLED=0 go build -ldflags "-extldflags -static -s" -o /steve -mod=vendor
FROM alpine FROM alpine
RUN apk -U --no-cache add ca-certificates RUN apk -U --no-cache add ca-certificates
COPY --from=build /naok /usr/bin/naok COPY --from=build /steve /usr/bin/steve
# Hack to make golang do files,dns search order # Hack to make golang do files,dns search order
ENV LOCALDOMAIN="" ENV LOCALDOMAIN=""
ENTRYPOINT ["/usr/bin/naok"] ENTRYPOINT ["/usr/bin/steve"]

View File

@ -1,8 +1,8 @@
build: build:
docker build -t naok . docker build -t steve .
run: build run: build
docker run $(DOCKER_ARGS) --rm -p 8989:8080 -it -v ${HOME}/.kube:/root/.kube naok docker run $(DOCKER_ARGS) --rm -p 8989:8080 -it -v ${HOME}/.kube:/root/.kube steve
run-host: build run-host: build
docker run $(DOCKER_ARGS) --net=host --uts=host --rm -it -v ${HOME}/.kube:/root/.kube naok --kubeconfig /root/.kube/config --listen-address :8989 docker run $(DOCKER_ARGS) --net=host --uts=host --rm -it -v ${HOME}/.kube:/root/.kube steve --kubeconfig /root/.kube/config --listen-address :8989

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/rancher/naok module github.com/rancher/steve
go 1.12 go 1.12

View File

@ -5,8 +5,8 @@ import (
"flag" "flag"
"os" "os"
"github.com/rancher/naok/pkg/server" "github.com/rancher/steve/pkg/server"
"github.com/rancher/naok/pkg/version" "github.com/rancher/steve/pkg/version"
"github.com/rancher/wrangler/pkg/signals" "github.com/rancher/wrangler/pkg/signals"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/urfave/cli" "github.com/urfave/cli"
@ -19,7 +19,7 @@ var (
func main() { func main() {
app := cli.NewApp() app := cli.NewApp()
app.Name = "naok" app.Name = "steve"
app.Version = version.FriendlyVersion() app.Version = version.FriendlyVersion()
app.Usage = "" app.Usage = ""
app.Flags = []cli.Flag{ app.Flags = []cli.Flag{

View File

@ -1,7 +1,7 @@
package accesscontrol package accesscontrol
import ( import (
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
) )

View File

@ -1,7 +1,7 @@
package client package client
import ( import (
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"k8s.io/client-go/dynamic" "k8s.io/client-go/dynamic"
"k8s.io/client-go/rest" "k8s.io/client-go/rest"

View File

@ -8,8 +8,8 @@ import (
meta "k8s.io/apimachinery/pkg/api/meta" meta "k8s.io/apimachinery/pkg/api/meta"
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/naok/pkg/resources/schema" "github.com/rancher/steve/pkg/resources/schema"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"github.com/rancher/wrangler/pkg/generic" "github.com/rancher/wrangler/pkg/generic"
"github.com/rancher/wrangler/pkg/merr" "github.com/rancher/wrangler/pkg/merr"

View File

@ -6,9 +6,9 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
schema2 "github.com/rancher/naok/pkg/resources/schema" schema2 "github.com/rancher/steve/pkg/resources/schema"
"github.com/rancher/naok/pkg/resources/schema/converter" "github.com/rancher/steve/pkg/resources/schema/converter"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
apiextcontrollerv1beta1 "github.com/rancher/wrangler-api/pkg/generated/controllers/apiextensions.k8s.io/v1beta1" apiextcontrollerv1beta1 "github.com/rancher/wrangler-api/pkg/generated/controllers/apiextensions.k8s.io/v1beta1"
v1 "github.com/rancher/wrangler-api/pkg/generated/controllers/apiregistration.k8s.io/v1" v1 "github.com/rancher/wrangler-api/pkg/generated/controllers/apiregistration.k8s.io/v1"

View File

@ -1,8 +1,8 @@
package common package common
import ( import (
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/naok/pkg/table" "github.com/rancher/steve/pkg/table"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
) )

View File

@ -1,7 +1,7 @@
package common package common
import ( import (
"github.com/rancher/naok/pkg/resources/schema" "github.com/rancher/steve/pkg/resources/schema"
"github.com/rancher/norman/pkg/store/proxy" "github.com/rancher/norman/pkg/store/proxy"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"github.com/rancher/norman/pkg/types/convert" "github.com/rancher/norman/pkg/types/convert"

View File

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/rancher/naok/pkg/resources/common" "github.com/rancher/steve/pkg/resources/common"
"github.com/rancher/naok/pkg/resources/schema" "github.com/rancher/steve/pkg/resources/schema"
"github.com/rancher/naok/pkg/table" "github.com/rancher/steve/pkg/table"
"github.com/rancher/norman/pkg/data" "github.com/rancher/norman/pkg/data"
"github.com/rancher/norman/pkg/types/convert" "github.com/rancher/norman/pkg/types/convert"
schema2 "k8s.io/apimachinery/pkg/runtime/schema" schema2 "k8s.io/apimachinery/pkg/runtime/schema"

View File

@ -7,9 +7,9 @@ import (
schema2 "k8s.io/apimachinery/pkg/runtime/schema" schema2 "k8s.io/apimachinery/pkg/runtime/schema"
"github.com/rancher/naok/pkg/accesscontrol" "github.com/rancher/steve/pkg/accesscontrol"
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/naok/pkg/clustercache" "github.com/rancher/steve/pkg/clustercache"
"github.com/rancher/norman/pkg/store/empty" "github.com/rancher/norman/pkg/store/empty"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/api/meta"

View File

@ -1,14 +1,14 @@
package resources package resources
import ( import (
"github.com/rancher/naok/pkg/accesscontrol" "github.com/rancher/steve/pkg/accesscontrol"
"github.com/rancher/naok/pkg/clustercache" "github.com/rancher/steve/pkg/clustercache"
"github.com/rancher/naok/pkg/resources/apigroups" "github.com/rancher/steve/pkg/resources/apigroups"
"github.com/rancher/naok/pkg/resources/common" "github.com/rancher/steve/pkg/resources/common"
"github.com/rancher/naok/pkg/resources/core" "github.com/rancher/steve/pkg/resources/core"
"github.com/rancher/naok/pkg/resources/counts" "github.com/rancher/steve/pkg/resources/counts"
"github.com/rancher/naok/pkg/resources/helmrelease" "github.com/rancher/steve/pkg/resources/helmrelease"
"github.com/rancher/naok/pkg/resources/schema" "github.com/rancher/steve/pkg/resources/schema"
"github.com/rancher/norman/pkg/store/apiroot" "github.com/rancher/norman/pkg/store/apiroot"
"github.com/rancher/norman/pkg/store/proxy" "github.com/rancher/norman/pkg/store/proxy"
"github.com/rancher/norman/pkg/subscribe" "github.com/rancher/norman/pkg/subscribe"

View File

@ -3,9 +3,9 @@ package schema
import ( import (
"strings" "strings"
"github.com/rancher/naok/pkg/accesscontrol" "github.com/rancher/steve/pkg/accesscontrol"
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/naok/pkg/table" "github.com/rancher/steve/pkg/table"
"github.com/rancher/norman/pkg/data" "github.com/rancher/norman/pkg/data"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"github.com/rancher/wrangler/pkg/name" "github.com/rancher/wrangler/pkg/name"

View File

@ -1,8 +1,8 @@
package converter package converter
import ( import (
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/naok/pkg/table" "github.com/rancher/steve/pkg/table"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"github.com/rancher/wrangler-api/pkg/generated/controllers/apiextensions.k8s.io/v1beta1" "github.com/rancher/wrangler-api/pkg/generated/controllers/apiextensions.k8s.io/v1beta1"
beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"

View File

@ -3,7 +3,7 @@ package converter
import ( import (
"strings" "strings"
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"github.com/rancher/wrangler/pkg/merr" "github.com/rancher/wrangler/pkg/merr"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"

View File

@ -1,7 +1,7 @@
package converter package converter
import ( import (
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"github.com/rancher/norman/pkg/types/convert" "github.com/rancher/norman/pkg/types/convert"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"

View File

@ -4,10 +4,10 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/rancher/naok/pkg/table" "github.com/rancher/steve/pkg/table"
"github.com/rancher/naok/pkg/accesscontrol" "github.com/rancher/steve/pkg/accesscontrol"
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/norman/pkg/api/builtin" "github.com/rancher/norman/pkg/api/builtin"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authentication/user"

View File

@ -5,10 +5,10 @@ import (
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/rancher/naok/pkg/accesscontrol" "github.com/rancher/steve/pkg/accesscontrol"
k8sproxy "github.com/rancher/naok/pkg/proxy" k8sproxy "github.com/rancher/steve/pkg/proxy"
"github.com/rancher/naok/pkg/resources/schema" "github.com/rancher/steve/pkg/resources/schema"
"github.com/rancher/naok/pkg/server/router" "github.com/rancher/steve/pkg/server/router"
"github.com/rancher/norman/pkg/api" "github.com/rancher/norman/pkg/api"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
"github.com/rancher/norman/pkg/urlbuilder" "github.com/rancher/norman/pkg/urlbuilder"

View File

@ -2,8 +2,8 @@ package publicapi
import ( import (
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/naok/pkg/resources/schema" "github.com/rancher/steve/pkg/resources/schema"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
runtimeschema "k8s.io/apimachinery/pkg/runtime/schema" runtimeschema "k8s.io/apimachinery/pkg/runtime/schema"
) )

View File

@ -5,12 +5,12 @@ import (
"github.com/rancher/norman/pkg/auth" "github.com/rancher/norman/pkg/auth"
"net/http" "net/http"
"github.com/rancher/naok/pkg/accesscontrol" "github.com/rancher/steve/pkg/accesscontrol"
"github.com/rancher/naok/pkg/client" "github.com/rancher/steve/pkg/client"
"github.com/rancher/naok/pkg/clustercache" "github.com/rancher/steve/pkg/clustercache"
"github.com/rancher/naok/pkg/controllers/schema" "github.com/rancher/steve/pkg/controllers/schema"
"github.com/rancher/naok/pkg/resources" "github.com/rancher/steve/pkg/resources"
"github.com/rancher/naok/pkg/server/publicapi" "github.com/rancher/steve/pkg/server/publicapi"
"github.com/rancher/wrangler-api/pkg/generated/controllers/apiextensions.k8s.io" "github.com/rancher/wrangler-api/pkg/generated/controllers/apiextensions.k8s.io"
"github.com/rancher/wrangler-api/pkg/generated/controllers/apiregistration.k8s.io" "github.com/rancher/wrangler-api/pkg/generated/controllers/apiregistration.k8s.io"
"github.com/rancher/wrangler-api/pkg/generated/controllers/core" "github.com/rancher/wrangler-api/pkg/generated/controllers/core"

View File

@ -1,7 +1,7 @@
package table package table
import ( import (
"github.com/rancher/naok/pkg/attributes" "github.com/rancher/steve/pkg/attributes"
"github.com/rancher/norman/pkg/data" "github.com/rancher/norman/pkg/data"
"github.com/rancher/norman/pkg/types" "github.com/rancher/norman/pkg/types"
) )