Bug 1882140 - No description for spec.kubeletConfig
Summary: No description for spec.kubeletConfig
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 4.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.7.0
Assignee: Harshal Patil
QA Contact: MinLi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-23 21:42 UTC by Jason Boxman
Modified: 2021-02-24 15:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:19:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-config-operator pull 2320 0 None closed Bug 1882140: KubeletConfig: Add the description to kubelet config CRD 2021-01-18 03:10:05 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:20:58 UTC

Description Jason Boxman 2020-09-23 21:42:42 UTC
Description of problem:

I'm unfamiliar with the MCO, and when looking at the spec, there is no description for what the `spec.kubeletConfig` field expects. (`machineConfigPoolSelector` does have a description, for example.)

How reproducible:

Always.

Steps to Reproduce:

`oc explain KubeletConfig --recursive=true`

Comment 1 Yu Qi Zhang 2020-12-08 21:02:23 UTC
Hi, sorry for the delay in response.

The kubeletConfig field by design comes from upstream, e.g. https://github.com/kubernetes/kubernetes/blob/release-1.19/staging/src/k8s.io/kubelet/config/v1beta1/types.go#L75 once we rebase on 1.19.

As for description, I agree that our CRD definition isn't very clear, but there should be some documentation around how to use this. Moving over to the node team to see whether they feel there is a need to add a reference, etc. If not feel free to close.

Comment 2 Harshal Patil 2021-01-05 02:51:34 UTC
https://github.com/openshift/machine-config-operator/blob/master/docs/KubeletConfigDesign.md describes the usage of KubeletConfig. 

As mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1882140#c1, the kubeletConfig field by design comes from upstream. So you will have to refer to the upstream 'types.go' to see what values you want to put in the KubeletConfig. 

e.g. if you want to bump up systemReserve to 2G, you will have to declare the KubeleConfig in the following way,


kind: KubeletConfig
metadata:
  name: worker-kubeconfig-fix
spec:
  machineConfigPoolSelector:
    matchLabels:
      custom-kubelet: small-pods 
  kubeletConfig:
    systemReserved:
      memory: 2000Mi

Comment 3 Jason Boxman 2021-01-05 15:04:30 UTC
But this presents an _empty_ description field to the user. So it isn't clear how a user knows what you stated is what is required, particularly someone new to OCP and k8s.

So while this isn't an implementation bug, it is a bad user experience.

Because this description originates with MCO, maybe someone from MCO can include a description for this field in the CRD?

Even: "A kubelet config object" would be an improvement. Otherwise it renders as an empty field as shown here:

https://docs.openshift.com/container-platform/4.6/rest_api/machine_apis/kubeletconfig-machineconfiguration-openshift-io-v1.html

Thanks.

Comment 5 MinLi 2021-01-18 08:05:57 UTC
verified on version : 4.7.0-0.nightly-2021-01-17-211555

$ oc explain KubeletConfig.spec.kubeletConfig --recursive=true
KIND:     KubeletConfig
VERSION:  machineconfiguration.openshift.io/v1

DESCRIPTION:
     The fields of the kubelet configuration are defined in kubernetes upstream.
     Please refer to the types defined in the version/commit used by OpenShift
     of the upstream kubernetes.

Comment 8 errata-xmlrpc 2021-02-24 15:19:20 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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/RHSA-2020:5633


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