Bug 1824866

Summary: fix api deprecation warning
Product: OpenShift Container Platform Reporter: Dan Winship <danw>
Component: NetworkingAssignee: Dan Winship <danw>
Networking sub component: openshift-sdn QA Contact: Weibin Liang <weliang>
Status: CLOSED WORKSFORME Docs Contact:
Severity: unspecified    
Priority: unspecified CC: zzhao
Version: 4.3.z   
Target Milestone: ---   
Target Release: 4.3.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: One multus-related DaemonSet mistakenly used the deprecated version "extensions/v1beta1" rather than "apps/v1" in its YAML definition. Consequence: In clusters that still have the alert for deprecated API usage enabled, an alert would be logged. Fix: The DaemonSet has been updated to use the correct version name. Result: No alert
Story Points: ---
Clone Of:
: 1824870 (view as bug list) Environment:
Last Closed: 2020-05-06 12:59:44 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:
Bug Depends On: 1824870    
Bug Blocks:    

Description Dan Winship 2020-04-16 15:13:55 UTC
If you use one of the multus-y features that enables the DHCP daemon, you'll get prometheus alerts about using deprecated APIs

Comment 4 zhaozhanqi 2020-04-24 07:05:36 UTC
The fixed PR https://github.com/openshift/cluster-network-operator/pull/598 still not in the latest nightly build openshift-release.svc.ci.openshift.org/releasestream/4.3.0-0.nightly/release/4.3.0-0.nightly-2020-04-23-225015 yet.

Comment 6 Dan Winship 2020-05-04 16:15:10 UTC
For some reason 4.3.18 was built with an out-of-date CNO? (It was built on 4/28 but has a version of CNO from early morning on 4/19).

The 4.3 nightlies have the fix so it should be in 4.3.19...

Comment 8 Dan Winship 2020-05-06 12:59:44 UTC
OK, it appears that the apiserver in 4.3 stores DaemonSets as "extensions/v1beta1" regardless of how they're created:

danw@p50:~> oc get ds --all-namespaces -o yaml|grep ^..apiVersion
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1

However, it *does* have the fix:

danw@p50:~> oc rsh -n openshift-network-operator network-operator-6c854f4855-f7k2t head -5 /bindata/network/multus/003-dhcp-daemon.yaml
{{if .RenderDHCP}}
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: dhcp-daemon


whatever. The alert no longer exists any more anyway so the fix wasn't even necessary.