Bug 1871045

Summary: Document operator/v1 LogLevel
Product: OpenShift Container Platform Reporter: Stefan Schimanski <sttts>
Component: kube-apiserverAssignee: Stefan Schimanski <sttts>
Status: CLOSED ERRATA QA Contact: Ke Wang <kewang>
Severity: high Docs Contact:
Priority: high    
Version: 4.6CC: aos-bugs, mfojtik, xxia
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:30:14 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:

Description Stefan Schimanski 2020-08-21 08:30:43 UTC
Description of problem:

It's not apparent from the operator/v1 objects how to set the loglevel. It's neither documented nor easily understandable from an object.

Version-Release number of selected component (if applicable):


How reproducible:

oc explain kubeapiservers
oc edit kubeapiserver

Expected results:

- logLevel field is set to Normal
- logLevel field is documented in OpenAPI (and hence oc explain) with all of its values.

Comment 3 Ke Wang 2020-08-27 03:06:55 UTC
Verified with OCP 4.6.0-0.nightly-2020-08-26-202109,

$ oc get crd kubeapiservers.operator.openshift.io -o json | jq .spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.logLevel
{
  "default": "Normal",
  "description": "logLevel is an intent based logging for an overall component.  It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".",
  "type": "string"
}

$ oc explain KubeAPIServer.spec.logLevel
KIND:     KubeAPIServer
VERSION:  operator.openshift.io/v1

FIELD:    logLevel <string>

DESCRIPTION:
     logLevel is an intent based logging for an overall component. It does not
     give fine grained control, but it is a simple way to manage coarse grained
     logging choices that operators have to interpret for their operands. Valid
     values are: "Normal", "Debug", "Trace", "TraceAll". Defaults to "Normal".


$ oc get crd openshiftapiservers.operator.openshift.io -o json | jq .spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.logLevel
{
  "default": "Normal",
  "description": "logLevel is an intent based logging for an overall component.  It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".",
  "type": "string"
}

$ oc explain openshiftapiservers.spec.logLevel
KIND:     OpenShiftAPIServer
VERSION:  operator.openshift.io/v1

FIELD:    logLevel <string>

DESCRIPTION:
     logLevel is an intent based logging for an overall component. It does not
     give fine grained control, but it is a simple way to manage coarse grained
     logging choices that operators have to interpret for their operands.

The results is as expected.So move the bug Verified.

Comment 5 errata-xmlrpc 2020-10-27 16:30:14 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 (OpenShift Container Platform 4.6 GA Images), 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:4196