Skip to content

Commit

Permalink
Merge pull request #1750 from p0lyn0mial/deprecated-api-bump-1-31
Browse files Browse the repository at this point in the history
NO-JIRA: Update "deprecated API in use" alert expressions for 1.31.
  • Loading branch information
openshift-merge-bot[bot] authored Oct 18, 2024
2 parents a64efd0 + b96d9c5 commit 66b7caf
Show file tree
Hide file tree
Showing 22 changed files with 391 additions and 187 deletions.
4 changes: 2 additions & 2 deletions bindata/assets/alerts/api-usage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
a successful upgrade to the next cluster version with Kubernetes {{ $labels.removed_release }}.
Refer to `oc get apirequestcounts {{ $labels.resource }}.{{ $labels.version }}.{{ $labels.group }} -o yaml` to identify the workload.
expr: >-
group by (group,version,resource,removed_release) (apiserver_requested_deprecated_apis{removed_release="1.31"})
group by (group,version,resource,removed_release) (apiserver_requested_deprecated_apis{removed_release="1.32"})
* on (group,version,resource) group_left ()
sum by (group,version,resource) (
rate(apiserver_request_total{system_client!="kube-controller-manager",system_client!="cluster-policy-controller"}[4h])
Expand All @@ -34,7 +34,7 @@ spec:
a successful upgrade to the next EUS cluster version with Kubernetes {{ $labels.removed_release }}.
Refer to `oc get apirequestcounts {{ $labels.resource }}.{{ $labels.version }}.{{ $labels.group }} -o yaml` to identify the workload.
expr: >-
group by (group,version,resource,removed_release) (apiserver_requested_deprecated_apis{removed_release=~"1.31"})
group by (group,version,resource,removed_release) (apiserver_requested_deprecated_apis{removed_release=~"1.3[23]"})
* on (group,version,resource) group_left ()
sum by (group,version,resource) (
rate(apiserver_request_total{system_client!="kube-controller-manager",system_client!="cluster-policy-controller"}[4h])
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f
github.com/openshift/build-machinery-go v0.0.0-20240613134303-8359781da660
github.com/openshift/client-go v0.0.0-20241001162912-da6d55e4611f
github.com/openshift/library-go v0.0.0-20241001171606-756adf2188fc
github.com/openshift/library-go v0.0.0-20241017185845-c32b33471ba3
github.com/pkg/profile v1.7.0 // indirect
github.com/prometheus/client_golang v1.19.1
github.com/spf13/cobra v1.8.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ github.com/openshift/build-machinery-go v0.0.0-20240613134303-8359781da660 h1:F0
github.com/openshift/build-machinery-go v0.0.0-20240613134303-8359781da660/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE=
github.com/openshift/client-go v0.0.0-20241001162912-da6d55e4611f h1:FRc0bVNWprihWS0GqQWzb3dY4dkCwpOP3mDw5NwSoR4=
github.com/openshift/client-go v0.0.0-20241001162912-da6d55e4611f/go.mod h1:KiZi2mJRH1TOJ3FtBDYS6YvUL30s/iIXaGSUrSa36mo=
github.com/openshift/library-go v0.0.0-20241001171606-756adf2188fc h1:QXYkFJn7wLTHAI56l+9DJnLrNynGtXjyOZLgiIglTnE=
github.com/openshift/library-go v0.0.0-20241001171606-756adf2188fc/go.mod h1:9B1MYPoLtP9tqjWxcbUNVpwxy68zOH/3EIP6c31dAM0=
github.com/openshift/library-go v0.0.0-20241017185845-c32b33471ba3 h1:gv1a4WK1d83jvjxFji8AAt3zOIeTW+q6s0dkDCLUHL0=
github.com/openshift/library-go v0.0.0-20241017185845-c32b33471ba3/go.mod h1:9B1MYPoLtP9tqjWxcbUNVpwxy68zOH/3EIP6c31dAM0=
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
2 changes: 2 additions & 0 deletions pkg/cmd/certregenerationcontroller/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/spf13/cobra"

"k8s.io/client-go/kubernetes"
"k8s.io/utils/clock"

operatorv1 "github.com/openshift/api/operator/v1"
configeversionedclient "github.com/openshift/client-go/config/clientset/versioned"
Expand Down Expand Up @@ -94,6 +95,7 @@ func (o *Options) Run(ctx context.Context) error {
)

operatorClient, dynamicInformers, err := genericoperatorclient.NewStaticPodOperatorClient(
clock.RealClock{},
o.controllerContext.KubeConfig,
operatorv1.GroupVersion.WithResource("kubeapiservers"),
operatorv1.GroupVersion.WithKind("KubeAPIServer"),
Expand Down
2 changes: 2 additions & 0 deletions pkg/operator/starter.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ import (
"k8s.io/client-go/dynamic/dynamicinformer"
"k8s.io/client-go/kubernetes"
"k8s.io/klog/v2"
"k8s.io/utils/clock"
"k8s.io/utils/ptr"
kubemigratorclient "sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset"
migrationv1alpha1informer "sigs.k8s.io/kube-storage-version-migrator/pkg/clients/informer"
Expand Down Expand Up @@ -132,6 +133,7 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle
)
configInformers := configv1informers.NewSharedInformerFactory(configClient, 10*time.Minute)
operatorClient, dynamicInformersForAllNamespaces, err := genericoperatorclient.NewStaticPodOperatorClient(
clock.RealClock{},
controllerContext.KubeConfig,
operatorv1.GroupVersion.WithResource("kubeapiservers"),
operatorv1.GroupVersion.WithKind("KubeAPIServer"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/certrotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
"k8s.io/utils/clock"

configv1 "github.com/openshift/api/config/v1"
operatorv1 "github.com/openshift/api/operator/v1"
Expand All @@ -30,6 +31,7 @@ func TestCertRotationTimeUpgradeable(t *testing.T) {
kubeConfig, err := test.NewClientConfigForTest()
require.NoError(t, err)
operatorClient, _, err := genericoperatorclient.NewStaticPodOperatorClient(
clock.RealClock{},
kubeConfig,
operatorv1.GroupVersion.WithResource("kubeapiservers"),
operatorv1.GroupVersion.WithKind("KubeAPIServer"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
"k8s.io/utils/clock"
)

func TestOperatorNamespace(t *testing.T) {
Expand Down Expand Up @@ -50,6 +51,7 @@ func TestRevisionLimits(t *testing.T) {
kubeClient, err := kubernetes.NewForConfig(kubeConfig)
require.NoError(t, err)
operatorClient, _, err := genericoperatorclient.NewStaticPodOperatorClient(
clock.RealClock{},
kubeConfig,
operatorv1.GroupVersion.WithResource("kubeapiservers"),
operatorv1.GroupVersion.WithKind("KubeAPIServer"),
Expand Down

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.

Loading

0 comments on commit 66b7caf

Please sign in to comment.