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 consumer side issues #12

Merged
merged 4 commits into from
Mar 28, 2024
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
3 changes: 0 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ require (
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/dexidp/dex/api/v2 v2.1.0
github.com/evanphx/json-patch v5.7.0+incompatible
github.com/fatih/color v1.16.0
github.com/google/go-cmp v0.6.0
github.com/gorilla/mux v1.8.1
github.com/gorilla/securecookie v1.1.2
Expand Down Expand Up @@ -87,8 +86,6 @@ require (
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
Expand Down
5 changes: 0 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ
github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro=
github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
Expand Down Expand Up @@ -193,7 +191,6 @@ github.com/martinlindhe/base36 v1.1.1 h1:1F1MZ5MGghBXDZ2KJ3QfxmiydlWOGB8HCEtkap5
github.com/martinlindhe/base36 v1.1.1/go.mod h1:vMS8PaZ5e/jV9LwFKlm0YLnXl/hpOihiBxKkIoc3g08=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
Expand Down Expand Up @@ -393,10 +390,8 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
Expand Down
6 changes: 0 additions & 6 deletions pkg/kubectl/bind-apiservice/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (

"go.bytebuilders.dev/kube-bind/pkg/kubectl/bind-apiservice/plugin"

"github.com/fatih/color"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
_ "k8s.io/client-go/plugin/pkg/client/auth/exec"
Expand Down Expand Up @@ -63,11 +62,6 @@ func New(streams genericclioptions.IOStreams) (*cobra.Command, error) {
return err
}

if !opts.NoBanner {
yellow := color.New(color.BgRed, color.FgBlack).SprintFunc()
fmt.Fprintf(streams.ErrOut, yellow("DISCLAIMER: This is a prototype. It will change in incompatible ways at any time.")+"\n\n") // nolint: errcheck
}

return opts.Run(cmd.Context())
},
}
Expand Down
3 changes: 0 additions & 3 deletions pkg/kubectl/bind-apiservice/plugin/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ type BindAPIServiceOptions struct {
SkipKonnector bool
KonnectorImageOverride string
DowngradeKonnector bool
NoBanner bool

url string
}
Expand Down Expand Up @@ -90,8 +89,6 @@ func (b *BindAPIServiceOptions) AddCmdFlags(cmd *cobra.Command) {
cmd.Flags().BoolVar(&b.DowngradeKonnector, "downgrade-konnector", b.DowngradeKonnector, "Downgrade the konnector to the version of the kubectl-bind-apiservice binary")
cmd.Flags().StringVar(&b.KonnectorImageOverride, "konnector-image", b.KonnectorImageOverride, "The konnector image to use")
cmd.Flags().MarkHidden("konnector-image") // nolint:errcheck
cmd.Flags().BoolVar(&b.NoBanner, "no-banner", b.NoBanner, "Do not show the red banner")
cmd.Flags().MarkHidden("no-banner") // nolint:errcheck
}

// Complete ensures all fields are initialized.
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubectl/bind-apiservice/plugin/konnector.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (
)

const (
konnectorImage = "ghcr.io/kube-bind/konnector"
konnectorImage = "ghcr.io/appscode/konnector"
)

// nolint: unused
Expand Down
4 changes: 0 additions & 4 deletions pkg/kubectl/bind/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (

"go.bytebuilders.dev/kube-bind/pkg/kubectl/bind/plugin"

"github.com/fatih/color"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
_ "k8s.io/client-go/plugin/pkg/client/auth/exec"
Expand Down Expand Up @@ -65,9 +64,6 @@ func New(streams genericclioptions.IOStreams) (*cobra.Command, error) {
return err
}

yellow := color.New(color.BgRed, color.FgBlack).SprintFunc()
fmt.Fprintf(streams.ErrOut, yellow("DISCLAIMER: This is a prototype. It will change in incompatible ways at any time.")+"\n\n") // nolint: errcheck

if len(args) == 0 {
return cmd.Help()
}
Expand Down
12 changes: 1 addition & 11 deletions pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,12 @@ limitations under the License.
package version

import (
"fmt"
"strings"
)

func BinaryVersion(s string) (string, error) {
if strings.HasPrefix(s, "v0.0.0-") {
return "v0.0.0", nil // special version if no ldflags are set
}
parts := strings.SplitN(s, "+", 2)
if len(parts) < 2 {
return "", fmt.Errorf("failed to parse version %q", s)
}

prefix := "kube-bind"
if !strings.HasPrefix(parts[1], prefix) {
return "", fmt.Errorf("failed to parse version %q", s)
}
return strings.SplitN(strings.TrimPrefix(parts[1], prefix+"-"), "-", 2)[0], nil
return s, nil
}
20 changes: 0 additions & 20 deletions vendor/github.com/fatih/color/LICENSE.md

This file was deleted.

176 changes: 0 additions & 176 deletions vendor/github.com/fatih/color/README.md

This file was deleted.

Loading
Loading