Do Not Merge: feat(resource builder): allow to inject tls configuration into annotated config maps: Rework#1350
Conversation
And some minor modifications here and there. Preferably to be squashed before merging.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
WalkthroughThis pull request introduces TLS configuration injection logic for ConfigMaps in the resource builder package. The changes add Kubernetes API dependencies, register a ConfigMap modifier in the generator, implement TLS profile observation and injection into GenericOperatorConfig entries within annotated ConfigMaps, integrate the modifier into the build workflow, and provide comprehensive test coverage for the injection mechanism. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip CodeRabbit can approve the review once all CodeRabbit's comments are resolved.Enable the |
|
/test ? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DavidHurta The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
/test all |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@lib/resourcebuilder/resourcebuilder_test.go`:
- Line 69: Remove the leftover debug print: delete the fmt.Printf("tt.apiServer:
%v\n", tt.apiServer.Spec.TLSSecurityProfile.Custom.TLSProfileSpec) line from the
test; if you want non-verbose test output keep it as t.Logf(...) but otherwise
simply remove the statement so the test contains no debug prints referencing
tt.apiServer.Spec.TLSSecurityProfile.Custom.TLSProfileSpec.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c0192a13-329d-4386-980f-c97c6e358561
⛔ Files ignored due to path filters (294)
go.sumis excluded by!**/*.sumvendor/github.com/go-errors/errors/.travis.ymlis excluded by!vendor/**,!**/vendor/**vendor/github.com/go-errors/errors/LICENSE.MITis excluded by!vendor/**,!**/vendor/**vendor/github.com/go-errors/errors/README.mdis excluded by!vendor/**,!**/vendor/**vendor/github.com/go-errors/errors/cover.outis excluded by!**/*.out,!vendor/**,!**/vendor/**vendor/github.com/go-errors/errors/error.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/go-errors/errors/parse_panic.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/go-errors/errors/stackframe.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/imdario/mergo/.deepsource.tomlis excluded by!vendor/**,!**/vendor/**vendor/github.com/imdario/mergo/.gitignoreis excluded by!vendor/**,!**/vendor/**vendor/github.com/imdario/mergo/.travis.ymlis excluded by!vendor/**,!**/vendor/**vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.mdis excluded by!vendor/**,!**/vendor/**vendor/github.com/imdario/mergo/LICENSEis excluded by!vendor/**,!**/vendor/**vendor/github.com/imdario/mergo/README.mdis excluded by!vendor/**,!**/vendor/**vendor/github.com/imdario/mergo/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/imdario/mergo/map.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/imdario/mergo/merge.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/imdario/mergo/mergo.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/.ci-operator.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/.coderabbit.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/.gitattributesis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/.gitignoreis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/.golangci.go-validated.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/.golangci.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/AGENTS.mdis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/Dockerfile.ocpis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/README.mdis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/annotations/annotations.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiextensions/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiextensions/v1alpha1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiextensions/v1alpha1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiextensions/v1alpha1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiextensions/v1alpha1/types_compatibilityrequirement.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiserver/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiserver/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiserver/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiserver/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiserver/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiserver/v1/types_apirequestcount.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiserver/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiserver/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apiserver/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/consts.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/deprecated_consts.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/generated.pb.gois excluded by!**/*.pb.go,!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/generated.protois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/legacy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/apps/v1/zz_prerelease_lifecycle_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/codec.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/generated.pb.gois excluded by!**/*.pb.go,!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/generated.protois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/legacy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/authorization/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/v1/consts.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/v1/generated.pb.gois excluded by!**/*.pb.go,!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/v1/generated.protois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/v1/legacy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/build/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/v1/generated.pb.gois excluded by!**/*.pb.go,!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/v1/generated.protois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/cloudnetwork/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/types_console_cli_download.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/types_console_external_log_links.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/types_console_link.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/types_console_notification.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/types_console_plugin.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/types_console_quick_start.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/types_console_sample.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/types_console_yaml_sample.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/envtest-releases.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/features.mdis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/helm/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/helm/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/helm/v1beta1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/helm/v1beta1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/helm/v1beta1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/helm/v1beta1/types_helm_chart_repository.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/helm/v1beta1/types_project_helm_chart_repository.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/helm/v1beta1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/helm/v1beta1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/helm/v1beta1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/image/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/image/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/image/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/imageregistry/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/imageregistry/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/imageregistry/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/imageregistry/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/imageregistry/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/imageregistry/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/imageregistry/v1/types_imagepruner.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/imageregistry/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/imageregistry/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/imageregistry/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/kubecontrolplane/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/kubecontrolplane/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/kubecontrolplane/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/kubecontrolplane/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/kubecontrolplane/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/legacyconfig/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/legacyconfig/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/legacyconfig/v1/serialization.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/legacyconfig/v1/stringsource.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/legacyconfig/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/common.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/types_aws.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/types_powervsprovider.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1alpha1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1alpha1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1alpha1/types_openstack.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/types_gcpprovider.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/types_machine.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/types_machinehealthcheck.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/types_machineset.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/types_provider.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/monitoring/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/monitoring/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/monitoring/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/monitoring/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/monitoring/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/monitoring/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/monitoring/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/monitoring/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/monitoring/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/constants.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/generated.pb.gois excluded by!**/*.pb.go,!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/generated.protois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/legacy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1alpha1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1alpha1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1alpha1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1alpha1/types_dnsnameresolver.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1alpha1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1alpha1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/network/v1alpha1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/v1/generated.pb.gois excluded by!**/*.pb.go,!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/v1/generated.protois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/v1/types_egressrouter.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/networkoperator/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/oauth/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/oauth/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/oauth/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/oauth/v1/generated.pb.gois excluded by!**/*.pb.go,!vendor/**,!**/vendor/**vendor/github.com/openshift/api/oauth/v1/generated.protois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/oauth/v1/legacy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/oauth/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/oauth/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/oauth/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/oauth/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/openshiftcontrolplane/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/openshiftcontrolplane/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/openshiftcontrolplane/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/openshiftcontrolplane/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operator/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operator/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operatorcontrolplane/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operatorcontrolplane/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/types_conditioncheck.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/osin/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/osin/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/osin/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/osin/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/osin/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/osin/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/pkg/serialization/serialization.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/project/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/project/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/project/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/project/v1/generated.pb.gois excluded by!**/*.pb.go,!vendor/**,!**/vendor/**vendor/github.com/openshift/api/project/v1/generated.protois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/project/v1/legacy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/project/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/project/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/project/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/project/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/v1/generated.pb.gois excluded by!**/*.pb.go,!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/v1/generated.protois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/v1/legacy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/v1/types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/quota/v1/zz_generated.swagger_doc_generated.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/route/.codegen.yamlis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/route/OWNERSis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/route/install.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/route/v1/Makefileis excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/route/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/route/v1/generated.pb.gois excluded by!**/*.pb.go,!vendor/**,!**/vendor/**vendor/github.com/openshift/api/route/v1/generated.protois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/api/route/v1/legacy.gois excluded by!vendor/**,!**/vendor/**
📒 Files selected for processing (6)
go.modhack/generate-lib-resources.pylib/resourcebuilder/core.golib/resourcebuilder/core_test.golib/resourcebuilder/resourcebuilder.golib/resourcebuilder/resourcebuilder_test.go
| var configObjs []runtime.Object | ||
| if tt.apiServer != nil { | ||
| configObjs = append(configObjs, tt.apiServer) | ||
| fmt.Printf("tt.apiServer: %v\n", tt.apiServer.Spec.TLSSecurityProfile.Custom.TLSProfileSpec) |
There was a problem hiding this comment.
Remove debug print statement.
This fmt.Printf appears to be leftover debug code that should be removed before merging.
🧹 Proposed fix
if tt.apiServer != nil {
configObjs = append(configObjs, tt.apiServer)
- fmt.Printf("tt.apiServer: %v\n", tt.apiServer.Spec.TLSSecurityProfile.Custom.TLSProfileSpec)
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| fmt.Printf("tt.apiServer: %v\n", tt.apiServer.Spec.TLSSecurityProfile.Custom.TLSProfileSpec) | |
| if tt.apiServer != nil { | |
| configObjs = append(configObjs, tt.apiServer) | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@lib/resourcebuilder/resourcebuilder_test.go` at line 69, Remove the leftover
debug print: delete the fmt.Printf("tt.apiServer: %v\n",
tt.apiServer.Spec.TLSSecurityProfile.Custom.TLSProfileSpec) line from the test;
if you want non-verbose test output keep it as t.Logf(...) but otherwise simply
remove the statement so the test contains no debug prints referencing
tt.apiServer.Spec.TLSSecurityProfile.Custom.TLSProfileSpec.
|
/testwith openshift/cluster-version-operator/main/e2e-agnostic-ovn openshift/cluster-image-registry-operator#1297 |
|
@DavidHurta: The following tests failed, say
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. |
|
/testwith openshift/cluster-version-operator/main/e2e-agnostic-ovn openshift/cluster-image-registry-operator#1297 |
| } | ||
|
|
||
| // Check if this is a supported GenericOperatorConfig kind | ||
| if rnode.GetKind() != "GenericOperatorConfig" || rnode.GetApiVersion() != operatorv1alpha1.GroupVersion.String() { |
There was a problem hiding this comment.
It turns out that GenericOperatorConfig is something that has been left alone in v1alpha1 and has been replaced by GenericControllerConfig on configv1. We need to support both, specially now we want to keep things consistent with the work we are doing on hypershift.
cc @ingvagabund
| if kind != "GenericOperatorConfig" { | ||
| klog.V(4).Infof("ConfigMap's %q entry is not a GenericOperatorConfig, skipping this entry", key) | ||
| // Check if this is a supported GenericOperatorConfig kind | ||
| if rnode.GetKind() != "GenericOperatorConfig" || rnode.GetApiVersion() != operatorv1alpha1.GroupVersion.String() { |
There was a problem hiding this comment.
apiVersion check
| klog.V(4).Infof("Error injecting the TLS configuration: %v", err) | ||
| return err | ||
| if err := updateRNodeWithTLSSettings(rnode, tlsConf); err != nil { | ||
| return fmt.Errorf("failed to inject the TLS configuration: %v", err) |
There was a problem hiding this comment.
bubbling up some context of errors
| cm.Data[key] = modifiedYAML | ||
| klog.V(2).Infof("ConfigMap %s/%s updated GenericOperatorConfig in key %s with %d ciphers and minTLSVersion=%s", | ||
| cm.Namespace, cm.Name, key, len(cipherSuites), minTLSVersion) | ||
| klog.V(2).Infof("ConfigMap %s/%s updated GenericOperatorConfig with TLS profile in key %s", cm.Namespace, cm.Name, key) |
There was a problem hiding this comment.
the tls configuration remains the same across all keys, no need to log it on every processed key
| for _, err := range errs { | ||
| klog.Errorf("ConfigMap %s/%s: error observing TLS profile: %v", cm.Namespace, cm.Name, err) | ||
| } | ||
| return nil, fmt.Errorf("error observing TLS profile for ConfigMap %s/%s: %w", cm.Namespace, cm.Name, errors.Join(errs...)) |
There was a problem hiding this comment.
hard failure; here i would like us to be defensive with testing to make sure any future bumps won't cause issues
There was a problem hiding this comment.
however, we already have extensive testing, I believe
lib/resourcebuilder/core.go
Outdated
| } | ||
|
|
||
| if ciphersFound { | ||
| currentCiphers, err := getSortedCipherSuites(servingInfo) |
There was a problem hiding this comment.
No need to sort and check; the main idea of the modify functions is to communicate the required state of an object. Thus, we can just inject the TLS profile. My goal is also to keep the YAML processing logic minimal if possible.
| } | ||
| ciphers = append(ciphers, value) | ||
| } else { | ||
| if err := servingInfo.PipeE(yaml.Clear("minTLSVersion")); err != nil { |
There was a problem hiding this comment.
Clearing if not found to honor the observeTLSConfiguration function
| func updateRNodeWithTLSSettings(rnode *yaml.RNode, minTLSVersion string, minTLSFound bool, cipherSuites []string, ciphersFound bool) error { | ||
| // updateRNodeWithTLSSettings injects TLS settings into a GenericOperatorConfig RNode while preserving structure. | ||
| // If a field in tlsConf is not found, the corresponding field will be deleted from the RNode. | ||
| func updateRNodeWithTLSSettings(rnode *yaml.RNode, tlsConf *tlsConfig) error { |
There was a problem hiding this comment.
New unit tests to ensure the YAML processing remains functional.
Testing potential changes for #1322 🔨