Bug 1871045 - Document operator/v1 LogLevel
Summary: Document operator/v1 LogLevel
Keywords:
Status: VERIFIED
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-apiserver
Version: 4.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.6.0
Assignee: Stefan Schimanski
QA Contact: Ke Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-21 08:30 UTC by Stefan Schimanski
Modified: 2020-08-27 03:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift api pull 720 None closed Bug 1871045: operator/v1: switch CRDs to v1, document logLevel and default it to Normal 2020-09-04 07:15:05 UTC
Github openshift cluster-kube-apiserver-operator pull 937 None closed Bug 1871045: bump(openshift/api) 2020-09-04 07:15:06 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.