Skip to content
Closed
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
4 changes: 3 additions & 1 deletion cmd/odo/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"

"github.com/spf13/pflag"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/sethvargo/go-envconfig"

Expand All @@ -24,6 +24,8 @@ func resetGlobalFlags() {
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
pflag.CommandLine = pflag.NewFlagSet(os.Args[0], pflag.ExitOnError)
klog.InitFlags(nil)
_ = flag.Set("legacy_stderr_threshold_behavior", "false")
_ = flag.Set("stderrthreshold", "INFO")
}

type runOptions struct {
Expand Down
4 changes: 3 additions & 1 deletion cmd/odo/odo.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/redhat-developer/odo/pkg/preference"
segment "github.com/redhat-developer/odo/pkg/segment/context"

"k8s.io/klog"
"k8s.io/klog/v2"
)

func main() {
Expand All @@ -41,6 +41,8 @@ func main() {

// create the complete command
klog.InitFlags(nil)
_ = flag.Set("legacy_stderr_threshold_behavior", "false")
_ = flag.Set("stderrthreshold", "INFO")

root, err := cli.NewCmdOdo(ctx, cli.OdoRecommendedName, cli.OdoRecommendedName, func(err error) {
util.LogErrorAndExit(err, "")
Expand Down
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/redhat-developer/odo

go 1.19
go 1.21

toolchain go1.24.6

require (
github.com/ActiveState/termtest v0.7.2
Expand Down Expand Up @@ -65,8 +67,7 @@ require (
k8s.io/apimachinery v0.27.3
k8s.io/cli-runtime v0.24.0
k8s.io/client-go v0.27.2
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.100.1
k8s.io/klog/v2 v2.140.0
k8s.io/kubectl v0.24.0
k8s.io/pod-security-admission v0.26.10
k8s.io/utils v0.0.0-20230505201702-9f6742963106
Expand Down Expand Up @@ -218,6 +219,7 @@ require (
gopkg.in/warnings.v0 v0.1.2 // indirect
k8s.io/apiserver v0.27.2 // indirect
k8s.io/component-base v0.27.2 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
oras.land/oras-go v1.2.5 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
Expand Down
32 changes: 30 additions & 2 deletions go.sum

Large diffs are not rendered by default.

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

"github.com/devfile/alizer/pkg/apis/model"
"github.com/devfile/alizer/pkg/apis/recognizer"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/api"
"github.com/redhat-developer/odo/pkg/registry"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver-gen/go/logger.go

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

2 changes: 1 addition & 1 deletion pkg/apiserver-impl/api_default_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/redhat-developer/odo/pkg/segment"
scontext "github.com/redhat-developer/odo/pkg/segment/context"
"github.com/redhat-developer/odo/pkg/state"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// DefaultApiService is a service that implements the logic for the DefaultApiServicer
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver-impl/sse/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"k8s.io/klog"
"k8s.io/klog/v2"

openapi "github.com/redhat-developer/odo/pkg/apiserver-gen/go"
"github.com/redhat-developer/odo/pkg/testingutil/filesystem"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver-impl/sse/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/fsnotify/fsnotify"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func (n *Notifier) watchDevfileChanges(ctx context.Context, devfileFiles []string) error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver-impl/starterserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net"
"net/http"

"k8s.io/klog"
"k8s.io/klog/v2"

openapi "github.com/redhat-developer/odo/pkg/apiserver-gen/go"
"github.com/redhat-developer/odo/pkg/apiserver-impl/sse"
Expand Down
2 changes: 1 addition & 1 deletion pkg/binding/backend/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
kerrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/binding/asker"
"github.com/redhat-developer/odo/pkg/kclient"
Expand Down
2 changes: 1 addition & 1 deletion pkg/binding/binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"path/filepath"

"k8s.io/klog"
"k8s.io/klog/v2"

bindingApis "github.com/redhat-developer/service-binding-operator/apis"
bindingApi "github.com/redhat-developer/service-binding-operator/apis/binding/v1alpha1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/component/apply_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/v2/pkg/devfile/parser"
devfilefs "github.com/devfile/library/v2/pkg/testingutil/filesystem"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/kclient"
odolabels "github.com/redhat-developer/odo/pkg/labels"
Expand Down
2 changes: 1 addition & 1 deletion pkg/component/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/devfile/library/v2/pkg/devfile/parser/data"
routev1 "github.com/openshift/api/route/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/alizer"
"github.com/redhat-developer/odo/pkg/api"
Expand Down
2 changes: 1 addition & 1 deletion pkg/component/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/component"
"github.com/redhat-developer/odo/pkg/configAutomount"
Expand Down
2 changes: 1 addition & 1 deletion pkg/component/describe/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/devfile/library/v2/pkg/devfile/generator"
"github.com/devfile/library/v2/pkg/devfile/parser"
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/api"
"github.com/redhat-developer/odo/pkg/component"
Expand Down
2 changes: 1 addition & 1 deletion pkg/component/execute_new_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

batchv1 "k8s.io/api/batch/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/utils/pointer"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/component/execute_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/exec"
"github.com/redhat-developer/odo/pkg/log"
Expand Down
2 changes: 1 addition & 1 deletion pkg/component/execute_terminating.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/redhat-developer/odo/pkg/machineoutput"
"github.com/redhat-developer/odo/pkg/platform"
"github.com/redhat-developer/odo/pkg/util"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/utils/pointer"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/component/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/v2/pkg/devfile/parser"
"k8s.io/klog"
"k8s.io/klog/v2"

envcontext "github.com/redhat-developer/odo/pkg/config/context"
"github.com/redhat-developer/odo/pkg/configAutomount"
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev/kubedev/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/utils/pointer"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/dev/kubedev/innerloop.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/redhat-developer/odo/pkg/sync"
"github.com/redhat-developer/odo/pkg/watch"

"k8s.io/klog"
"k8s.io/klog/v2"
)

func (o *DevClient) innerloop(ctx context.Context, parameters common.PushParameters, componentStatus *watch.ComponentStatus) error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev/kubedev/kubedev.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/redhat-developer/odo/pkg/testingutil/filesystem"
"github.com/redhat-developer/odo/pkg/watch"

"k8s.io/klog"
"k8s.io/klog/v2"
)

type DevClient struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev/kubedev/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/redhat-developer/odo/pkg/dev/common"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func (o *DevClient) Run(
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev/kubedev/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
devfileParser "github.com/devfile/library/v2/pkg/devfile/parser"

corev1 "k8s.io/api/core/v1"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/libdevfile"
"github.com/redhat-developer/odo/pkg/storage"
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev/podmandev/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/redhat-developer/odo/pkg/util"

corev1 "k8s.io/api/core/v1"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// See https://github.com/devfile/developer-images and https://quay.io/repository/devfile/base-developer-image?tab=tags
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev/podmandev/podmandev.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/dev"
"github.com/redhat-developer/odo/pkg/dev/common"
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev/podmandev/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func (o *DevClient) reconcile(
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev/podmandev/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/redhat-developer/odo/pkg/dev/common"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func (o *DevClient) Run(
Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/image/docker_compatible.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

devfile "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/fatih/color"
"k8s.io/klog"
"k8s.io/klog/v2"

dfutil "github.com/devfile/library/v2/pkg/util"

Expand Down
2 changes: 1 addition & 1 deletion pkg/devfile/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
v2 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2"
parsercommon "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// ValidateDevfileData validates whether sections of devfile are odo compatible
Expand Down
2 changes: 1 addition & 1 deletion pkg/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"strings"

"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/kubectl/pkg/util/term"

"github.com/redhat-developer/odo/pkg/log"
Expand Down
2 changes: 1 addition & 1 deletion pkg/init/backend/applicationports.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/devfile/library/v2/pkg/devfile/parser"
parsercommon "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/libdevfile"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/init/backend/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
"strings"

"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/libdevfile"
"github.com/redhat-developer/odo/pkg/registry"
Expand Down
2 changes: 1 addition & 1 deletion pkg/init/backend/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/devfile/library/v2/pkg/devfile/parser"
parsercommon "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
dfutil "github.com/devfile/library/v2/pkg/util"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/redhat-developer/odo/pkg/alizer"
"github.com/redhat-developer/odo/pkg/api"
Expand Down
2 changes: 1 addition & 1 deletion pkg/kclient/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/discovery"
"k8s.io/client-go/dynamic"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// Code into this file is heavily inspired from https://github.com/ahmetb/kubectl-tree
Expand Down
2 changes: 1 addition & 1 deletion pkg/kclient/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/klog"
"k8s.io/klog/v2"

odolabels "github.com/redhat-developer/odo/pkg/labels"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/kclient/dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// PatchDynamicResource patches a dynamic custom resource and returns true
Expand Down
2 changes: 1 addition & 1 deletion pkg/kclient/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// constants for volumes
Expand Down
2 changes: 1 addition & 1 deletion pkg/kclient/kclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/restmapper"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog"
"k8s.io/klog/v2"

// api clientsets
servicecatalogclienset "github.com/kubernetes-sigs/service-catalog/pkg/client/clientset_generated/clientset/typed/servicecatalog/v1beta1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/kclient/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/pod-security-admission/api"
psaApi "k8s.io/pod-security-admission/api"
)
Expand Down
Loading