Skip to content
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
8 changes: 7 additions & 1 deletion cmd/olm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/spf13/pflag"
corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/metadata"
"k8s.io/klog"
"k8s.io/klog/v2"
ctrl "sigs.k8s.io/controller-runtime"

"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned"
Expand Down Expand Up @@ -93,6 +93,12 @@ func main() {
klogFlags := flag.NewFlagSet("klog", flag.ExitOnError)
klog.InitFlags(klogFlags)

// Opt into the new klog behavior where -stderrthreshold is honored even
// when -logtostderr=true (see kubernetes/klog#212, kubernetes/klog#432).
klogFlags.Set("legacy_stderr_threshold_behavior", "false") //nolint:errcheck
klogFlags.Set("stderrthreshold", "INFO") //nolint:errcheck

pflag.CommandLine.AddGoFlagSet(klogFlags)
pflag.Parse()

// Parse the command-line flags.
Expand Down
8 changes: 7 additions & 1 deletion cmd/package-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

log "github.com/sirupsen/logrus"
"k8s.io/component-base/logs"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/signals"
"github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/server"
Expand All @@ -23,6 +23,12 @@ func main() {
// klog flags used by dependencies need to be explicitly initialized now
klogFlags := flag.NewFlagSet("klog", flag.ExitOnError)
klog.InitFlags(klogFlags)

// Opt into the new klog behavior where -stderrthreshold is honored even
// when -logtostderr=true (see kubernetes/klog#212, kubernetes/klog#432).
klogFlags.Set("legacy_stderr_threshold_behavior", "false") //nolint:errcheck
klogFlags.Set("stderrthreshold", "INFO") //nolint:errcheck

cmd.Flags().AddGoFlagSet(klogFlags)

if err := cmd.Flags().Parse(flag.Args()); err != nil {
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
k8s.io/client-go v0.35.3
k8s.io/code-generator v0.35.3
k8s.io/component-base v0.35.3
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.140.0
k8s.io/kube-aggregator v0.35.3
k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4
k8s.io/utils v0.0.0-20260108192941-914a6e750570
Expand Down Expand Up @@ -186,7 +186,6 @@ require (
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kms v0.35.3 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
Expand Down
7 changes: 2 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ github.com/go-git/go-git/v5 v5.16.4 h1:7ajIEZHZJULcyJebDLo99bGgS0jRrOxzZG4uCk2Yb
github.com/go-git/go-git/v5 v5.16.4/go.mod h1:4Ge4alE/5gPs30F2H1esi2gPd69R0C39lolkucHBOp8=
github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs=
github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
Expand Down Expand Up @@ -659,10 +658,8 @@ k8s.io/component-base v0.35.3 h1:mbKbzoIMy7JDWS/wqZobYW1JDVRn/RKRaoMQHP9c4P0=
k8s.io/component-base v0.35.3/go.mod h1:IZ8LEG30kPN4Et5NeC7vjNv5aU73ku5MS15iZyvyMYk=
k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b h1:gMplByicHV/TJBizHd9aVEsTYoJBnnUAT5MHlTkbjhQ=
k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b/go.mod h1:CgujABENc3KuTrcsdpGmrrASjtQsWCT7R99mEV4U/fM=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
k8s.io/kms v0.35.3 h1:jaxr/7dNqcztGldnfCEZg8DegEOnHV6cfoBC2ACMWEg=
k8s.io/kms v0.35.3/go.mod h1:VT+4ekZAdrZDMgShK37vvlyHUVhwI9t/9tvh0AyCWmQ=
k8s.io/kube-aggregator v0.35.3 h1:erIo8Dfapd0Fg44XAbgCNioJMtr3Z5mI/G1PSpj9B7Q=
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
kscheme "k8s.io/client-go/kubernetes/scheme"
typedcorev1 "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/client-go/tools/record"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned/scheme"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/kubernetes/pkg/registry/rbac/validation/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"strings"

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

rbacv1helpers "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/kubernetes/pkg/apis/rbac/v1"

Expand Down
4 changes: 2 additions & 2 deletions pkg/lib/kubernetes/plugin/pkg/auth/authorizer/rbac/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"bytes"
"fmt"

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

rbacv1helpers "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/kubernetes/pkg/apis/rbac/v1"
rbacregistryvalidation "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/kubernetes/pkg/registry/rbac/validation"
Expand Down Expand Up @@ -81,7 +81,7 @@ func (r *RBACAuthorizer) Authorize(requestAttributes authorizer.Attributes) (aut

// Build a detailed log of the denial.
// Make the whole block conditional so we don't do a lot of string-building we won't use.
if klog.V(5) {
if klog.V(5).Enabled() {
var operation string
if requestAttributes.IsResourceRequest() {
b := &bytes.Buffer{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/apiservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"k8s.io/klog/v2"
apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/clusterrole.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// CreateClusterRole creates the ClusterRole or Updates if it already exists.
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/clusterrolebinding.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/types"
acv1 "k8s.io/client-go/applyconfigurations/rbac/v1"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// ApplyClusterRoleBinding applies the roleBinding.
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// CreateConfigMap creates the ConfigMap.
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/customresources.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// CustomResourceList represents a list of custom resource objects that will
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/klog"
"k8s.io/klog/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/networkpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// CreateNetworkPolicy creates the NetworkPolicy.
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// CreateRole creates the role or Updates if it already exists.
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/rolebinding.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/types"
acv1 "k8s.io/client-go/applyconfigurations/rbac/v1"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// ApplyRoleBinding applies the roleBinding.
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// CreateSecret creates the Secret or Updates if it already exists.
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/service.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/types"
acv1 "k8s.io/client-go/applyconfigurations/core/v1"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// ApplyService applies the Service.
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/operatorclient/serviceaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// CreateServiceAccount creates the serviceAccount.
Expand Down
16 changes: 0 additions & 16 deletions vendor/k8s.io/klog/.travis.yml

This file was deleted.

22 changes: 0 additions & 22 deletions vendor/k8s.io/klog/CONTRIBUTING.md

This file was deleted.

Loading