-
Notifications
You must be signed in to change notification settings - Fork 585
NO-ISSUE: Fixes KubeletConfig API doc and adds tests #2651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
NO-ISSUE: Fixes KubeletConfig API doc and adds tests #2651
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Skipping CI for Draft Pull Request. |
📝 WalkthroughWalkthroughThis pull request adds a YAML-based test suite for the KubeletConfig CustomResourceDefinition under machineconfiguration.openshift.io, covering onCreate and onUpdate scenarios with field-level and multi-field variants. It also extends KubeletConfigSpec with two optional fields: AutoSizingReserved (*bool) and LogLevel (*int32). Documentation and descriptions were updated in types.go, generated Swagger docs, and the CRD YAML to reflect the new fields and to clarify wording around kubeletConfig, machineConfigPoolSelector, and tlsSecurityProfile. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
|
Hello @ngopalak-redhat! Some important instructions when contributing to openshift/api: |
|
/test all |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
12dcb66 to
8e0b9d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs.crd.yaml`:
- Around line 118-123: The tlsSecurityProfile description in the KubeletConfig
CRD is inconsistent with the schema: the text claims "Only Old and Intermediate
profiles are supported; maximum minTLSVersion is VersionTLS12" while the schema
allows Modern and Custom (and VersionTLS13) because it relies on
configv1.TLSSecurityProfile which has no kubelet-specific restrictions; to fix,
either add explicit validation to the CRD (e.g., CEL rules or a validating
webhook) to reject profile.type values "Modern" and "Custom" and enforce max
minTLSVersion of "VersionTLS12", or update the tlsSecurityProfile description to
accurately reflect that the schema permits Modern and Custom and VersionTLS13 by
referencing configv1.TLSSecurityProfile semantics; locate and change the
tlsSecurityProfile block in the KubeletConfig CRD (symbol: tlsSecurityProfile,
resource: KubeletConfig) and implement one of the two options consistently
(validation rules if you want to forbid Modern/Custom, otherwise update the
descriptive text).
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
⛔ Files ignored due to path filters (2)
machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs.crd.yamlis excluded by!**/zz_generated.crd-manifests/*machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/AAA_ungated.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**
📒 Files selected for processing (4)
machineconfiguration/v1/tests/kubeletconfigs.machineconfiguration.openshift.io/KubeletConfigSpec.yamlmachineconfiguration/v1/types.gomachineconfiguration/v1/zz_generated.swagger_doc_generated.gopayload-manifests/crds/0000_80_machine-config_01_kubeletconfigs.crd.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- machineconfiguration/v1/types.go
🔇 Additional comments (2)
machineconfiguration/v1/zz_generated.swagger_doc_generated.go (1)
216-223: Docs read well and are consistent with the CRD updates.
The KubeletConfigSpec descriptions are clear and actionable.machineconfiguration/v1/tests/kubeletconfigs.machineconfiguration.openshift.io/KubeletConfigSpec.yaml (1)
1-275: Solid coverage for create/update scenarios.
The matrix of single-field and combined updates looks thorough.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs.crd.yaml
Show resolved
Hide resolved
|
@ngopalak-redhat: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@ngopalak-redhat: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
This PR improves the documentation for the KubeletConfigSpec API to make it more accurate and user-friendly.
The focus is AutoSizingReserved. I have ignored adding the tests and the validation for TLSSecurityProfile. Also I haven't added the kubebuilder validation for LogLevel. They can be done in a different PR as this one focusses on API doc only.
Fixes the doc: https://docs.redhat.com/en/documentation/openshift_container_platform/4.20/html/machine_apis/kubeletconfig-machineconfiguration-openshift-io-v1#spec-4
It also adds test coverage similar to the pattern established in #2370.
AutoSizingReserved will default to true from 4.21 onwards. The default value and the description was not documented until now.
Test Coverage
Created test file: machineconfiguration/v1/tests/kubeletconfigs.machineconfiguration.openshift.io/KubeletConfigSpec.yaml