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

Linkerd plugin #703

Merged
merged 19 commits into from
May 4, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 17 additions & 26 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

[[constraint]]
name = "github.com/solo-io/solo-kit"
version = "0.7.0"
version = "0.8.0"

[[constraint]]
name = "github.com/solo-io/go-utils"
version = "0.7.15"
version = "0.8.4"

[[constraint]]
name = "github.com/hashicorp/consul"
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ update-deps:
mkdir -p $$GOPATH/src/github.com/lyft
cd $$GOPATH/src/github.com/lyft && if [ ! -e protoc-gen-validate ];then git clone https://github.com/envoyproxy/protoc-gen-validate; fi && cd protoc-gen-validate && git checkout v0.0.6
go get -u github.com/paulvollmer/2gobytes
go get -v -u github.com/golang/mock/gomock
go install github.com/golang/mock/mockgen

.PHONY: pin-repos
pin-repos:
Expand Down Expand Up @@ -93,9 +95,10 @@ generated-code: $(OUTPUT_DIR)/.generated-code

# Note: currently we generate CLI docs, but don't push them to the consolidated docs repo (gloo-docs). Instead, the
# Glooctl enterprise docs are pushed from the private repo.
# TODO(EItanya): make mockgen work for gloo
SUBDIRS:=projects test
$(OUTPUT_DIR)/.generated-code:
go generate ./...
SKIP_MOCK_GEN=1 go generate ./...
(rm docs/cli/glooctl*; go run projects/gloo/cli/cmd/docs/main.go)
gofmt -w $(SUBDIRS)
goimports -w $(SUBDIRS)
Expand Down
5 changes: 5 additions & 0 deletions changelog/v0.13.20/linkerd-gloo-plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
- type: NEW_FEATURE
description: Enable linkerd header addition on gloo upstreams.
issueLink: https://github.com/solo-io/supergloo/issues/422
resolvesIssue: false
16 changes: 8 additions & 8 deletions ci/upload_github_release_assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/solo-io/go-utils/githubutils"
"github.com/solo-io/go-utils/logger"
"github.com/solo-io/go-utils/log"
"github.com/solo-io/go-utils/pkgmgmtutils"
"github.com/solo-io/go-utils/versionutils"
)
Expand Down Expand Up @@ -111,21 +111,21 @@ func main() {
status, err := pkgmgmtutils.UpdateFormulas(repoOwner, repoName, buildDir,
`glooctl-(darwin|linux|windows).*\.sha256`, fOpts)
if err != nil {
logger.Fatalf("Error trying to update package manager formulas. Error was: %s", err.Error())
log.Fatalf("Error trying to update package manager formulas. Error was: %s", err.Error())
}
for _, s := range status {
if !s.Updated {
if s.Err != nil {
logger.Fatalf("Error while trying to update formula %s. Error was: %s", s.Name, s.Err.Error())
log.Fatalf("Error while trying to update formula %s. Error was: %s", s.Name, s.Err.Error())
} else {
logger.Fatalf("Error while trying to update formula %s. Error was nil", s.Name) // Shouldn't happen; really bad if it does
log.Fatalf("Error while trying to update formula %s. Error was nil", s.Name) // Shouldn't happen; really bad if it does
}
}
if s.Err != nil {
if s.Err == pkgmgmtutils.ErrAlreadyUpdated {
logger.Warnf("Formula %s was updated externally, so no updates applied during this release", s.Name)
log.Warnf("Formula %s was updated externally, so no updates applied during this release", s.Name)
} else {
logger.Fatalf("Error updating Formula %s. Error was: %s", s.Name, s.Err.Error())
log.Fatalf("Error updating Formula %s. Error was: %s", s.Name, s.Err.Error())
}
}
}
Expand All @@ -137,9 +137,9 @@ func validateReleaseVersionOfCli() {
cmd := exec.Command(name, "--version")
bytes, err := cmd.Output()
if err != nil {
logger.Fatalf("Error while trying to validate artifact version. Error was: %s", err.Error())
log.Fatalf("Error while trying to validate artifact version. Error was: %s", err.Error())
}
if !strings.HasSuffix(string(bytes), fmt.Sprintf("version %s\n", releaseVersion)) {
logger.Fatalf("Unexpected version output for glooctl: %s", string(bytes))
log.Fatalf("Unexpected version output for glooctl: %s", string(bytes))
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/solo-io/solo-kit/pkg/code-generator/cmd"
"github.com/solo-io/solo-kit/pkg/code-generator/docgen/options"
"github.com/solo-io/solo-kit/pkg/utils/log"
"github.com/solo-io/go-utils/log"
)

//go:generate go run generate.go
Expand Down
2 changes: 1 addition & 1 deletion install/helm/gloo/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ghodss/yaml"
"github.com/pkg/errors"
"github.com/solo-io/gloo/install/helm/gloo/generate"
"github.com/solo-io/solo-kit/pkg/utils/log"
"github.com/solo-io/go-utils/log"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pin_repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
version "github.com/solo-io/go-utils/versionutils"
"github.com/solo-io/solo-kit/pkg/utils/log"
"github.com/solo-io/go-utils/log"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cliutil/nsselect/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"

gloov1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1"
"github.com/solo-io/go-utils/kubeutils"
"github.com/solo-io/solo-kit/pkg/api/v1/clients"
"github.com/solo-io/solo-kit/pkg/api/v1/clients/factory"
"github.com/solo-io/solo-kit/pkg/api/v1/clients/kube"
"github.com/solo-io/solo-kit/pkg/utils/kubeutils"
"k8s.io/client-go/rest"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cliutil/uri.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"strings"

"github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/options"
"github.com/solo-io/go-utils/kubeutils"
"github.com/solo-io/solo-kit/pkg/errors"
"github.com/solo-io/solo-kit/pkg/utils/kubeutils"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/setuputils/main_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1"
check "github.com/solo-io/go-checkpoint"
"github.com/solo-io/go-utils/contextutils"
"github.com/solo-io/go-utils/kubeutils"
"github.com/solo-io/solo-kit/pkg/api/v1/clients"
"github.com/solo-io/solo-kit/pkg/api/v1/clients/factory"
"github.com/solo-io/solo-kit/pkg/api/v1/clients/kube"
"github.com/solo-io/solo-kit/pkg/api/v1/resources/core"
"github.com/solo-io/solo-kit/pkg/errors"
"github.com/solo-io/solo-kit/pkg/utils/kubeutils"
_ "k8s.io/client-go/plugin/pkg/client/auth"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/version/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package version

import (
"github.com/pkg/errors"
"github.com/solo-io/go-utils/log"
"github.com/solo-io/go-utils/versionutils"
"github.com/solo-io/solo-kit/pkg/utils/log"
)

func CheckVersions() error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
. "github.com/onsi/gomega"
. "github.com/solo-io/gloo/projects/clusteringress/pkg/api/clusteringress"
v1 "github.com/solo-io/gloo/projects/clusteringress/pkg/api/v1"
"github.com/solo-io/go-utils/kubeutils"
"github.com/solo-io/go-utils/log"
"github.com/solo-io/solo-kit/pkg/api/v1/clients"
"github.com/solo-io/solo-kit/pkg/utils/kubeutils"
"github.com/solo-io/solo-kit/pkg/utils/log"
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
"k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down
2 changes: 1 addition & 1 deletion projects/clusteringress/pkg/api/v1/cluster_ingress.sk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 11 additions & 12 deletions projects/clusteringress/pkg/api/v1/cluster_ingress_client_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.