Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
EVEREST-496 remove unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
recharte committed Jan 31, 2024
1 parent 3b105e3 commit 59fee69
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/everest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestBuildProxiedUrl(t *testing.T) {
tc := testCase
t.Run(tc.url, func(t *testing.T) {
t.Parallel()
require.Equal(t, tc.expected, buildProxiedURL(tc.url, "percona-everest", tc.kind, tc.name))
require.Equal(t, tc.expected, buildProxiedURL("percona-everest", tc.kind, tc.name))
})
}
}
4 changes: 2 additions & 2 deletions api/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ func (e *EverestServer) proxyKubernetes(ctx echo.Context, namespace, kind, name
if namespace == "" {
namespace = e.kubeClient.Namespace()
}
req.URL.Path = buildProxiedURL(ctx.Request().URL.Path, namespace, kind, name)
req.URL.Path = buildProxiedURL(namespace, kind, name)
reverseProxy.ServeHTTP(ctx.Response(), req)
return nil
}

func buildProxiedURL(uri, namespace, kind, name string) string {
func buildProxiedURL(namespace, kind, name string) string {
proxiedURL := fmt.Sprintf(
"/apis/everest.percona.com/v1alpha1/namespaces/%s/%s",
url.PathEscape(strings.ReplaceAll(namespace, "/", "")),
Expand Down
2 changes: 0 additions & 2 deletions pkg/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ const (

// EverestWatchNamespacesEnvVar is the name of the environment variable.
EverestWatchNamespacesEnvVar = "WATCH_NAMESPACES"

everestOperatorContainerName = "manager"
)

// Kubernetes is a client for Kubernetes.
Expand Down

0 comments on commit 59fee69

Please sign in to comment.