Bug 1800430

Summary: ValidatingWebhookConfiguration version is not match with that in API server
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: MonitoringAssignee: Lili Cosic <lcosic>
Status: CLOSED ERRATA QA Contact: hongyan li <hongyli>
Severity: low Docs Contact:
Priority: low    
Version: 4.4CC: alegrand, anpicker, erooth, kakkoyun, lcosic, mloibl, pkrupa, surbania
Target Milestone: ---Keywords: Regression
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1806478 (view as bug list) Environment:
Last Closed: 2020-05-04 11:34:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1806478    
Bug Blocks:    

Description Junqi Zhao 2020-02-07 03:58:33 UTC
Description of problem:
error "expected type *v1.ValidatingWebhookConfiguration, but watch event object had type *v1beta1.ValidatingWebhookConfiguration" in kube-state-metrics, and checked the version should be v1 
# oc -n openshift-monitoring logs kube-state-metrics-bd8f6d6cf-twnw7 -c kube-state-metrics
......
E0207 02:29:59.868343       1 reflector.go:368] k8s.io/kube-state-metrics/internal/store/builder.go:346: expected type *v1.ValidatingWebhookConfiguration, but watch event object had type *v1beta1.ValidatingWebhookConfiguration
E0207 02:29:59.910091       1 reflector.go:368] k8s.io/kube-state-metrics/internal/store/builder.go:346: expected type *v1.ValidatingWebhookConfiguration, but watch event object had type *v1beta1.ValidatingWebhookConfiguration
E0207 02:30:49.573248       1 reflector.go:368] k8s.io/kube-state-metrics/internal/store/builder.go:346: expected type *v1.ValidatingWebhookConfiguration, but watch event object had type *v1beta1.ValidatingWebhookConfiguration
........

# oc explain ValidatingWebhookConfiguration
KIND:     ValidatingWebhookConfiguration
VERSION:  admissionregistration.k8s.io/v1

DESCRIPTION:
     ValidatingWebhookConfiguration describes the configuration of and admission
     webhook that accept or reject and object without changing it.

FIELDS:
   apiVersion	<string>
     APIVersion defines the versioned schema of this representation of an
     object. Servers should convert recognized schemas to the latest internal
     value, and may reject unrecognized values. More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

   kind	<string>
     Kind is a string value representing the REST resource this object
     represents. Servers may infer this from the endpoint the client submits
     requests to. Cannot be updated. In CamelCase. More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

   metadata	<Object>
     Standard object metadata; More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.

   webhooks	<[]Object>
     Webhooks is a list of webhooks and the affected resources and operations.


Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2020-02-06-230833

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Lili Cosic 2020-02-07 11:35:33 UTC
Thanks for catching this! I could reproduce this in fork and upstream, will do a PR in upstream to fix it.

Comment 4 hongyan li 2020-03-03 01:19:13 UTC
The issue is still there for openshift version: 4.4.0-0.nightly-2020-03-02-081928

Comment 5 Junqi Zhao 2020-03-03 01:29:45 UTC
the issue is fixed in 4.4.0-0.nightly-2020-03-02-201804 and later build

Comment 6 hongyan li 2020-03-03 06:04:48 UTC
The issue is fixed in payload 4.4.0-0.nightly-2020-03-02-214541

Comment 7 hongyan li 2020-03-03 06:15:04 UTC
Set up environment with payload 4.4.0-0.nightly-2020-03-02-214541
Execute “oc -n openshift-monitoring logs kube-state-metrics-95445d6d7-kmkpc -c kube-state-metrics"
There is no error message of the bug.

Comment 9 errata-xmlrpc 2020-05-04 11:34:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0581