Skip to content

SANDBOX-1769 | feature: specify integration types with constants#503

Closed
MikelAlejoBR wants to merge 1 commit intocodeready-toolchain:masterfrom
MikelAlejoBR:SANDBOX-1769-feature-enable-integrations-ui-api-two
Closed

SANDBOX-1769 | feature: specify integration types with constants#503
MikelAlejoBR wants to merge 1 commit intocodeready-toolchain:masterfrom
MikelAlejoBR:SANDBOX-1769-feature-enable-integrations-ui-api-two

Conversation

@MikelAlejoBR
Copy link
Copy Markdown
Contributor

@MikelAlejoBR MikelAlejoBR commented Apr 15, 2026

Description

The goal is to avoid having misconfigurations by having a wrong value in the "disabledIntegrations" field. Kubernetes will be aware of which are the accepted values to avoid those misconfigurations.

Related PRs

Checks

  1. Did you run make generate target? yes/no

Yes.

  1. Did make generate change anything in other projects (host-operator, member-operator)? yes/no

No.

  1. In case of new CRD, did you the following? yes/no

It's not a new CRD.

  1. In case other projects are changed, please provides PR links.

Summary by CodeRabbit

  • New Features

    • Introduced standardized integration types for configuration: OpenShift, OpenShift AI, DevSpaces, Ansible Automation Platform, and OpenShift Virtualization.
  • Improvements

    • Integration configurations are now validated against predefined types, preventing invalid values and ensuring configuration consistency.

The goal is to avoid having misconfigurations by having a wrong value in
the "disabledIntegrations" field. Kubernetes will be aware of which are
the accepted values to avoid those misconfigurations.

SANDBOX-1769
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

Walkthrough

This PR introduces a new IntegrationName string type with predefined constants for supported integrations (openshift, openshift-ai, devspaces, ansible-automation-platform, openshift-virtualization) and updates the RegistrationServiceConfig.DisabledIntegrations field from []string to []IntegrationName for type safety.

Changes

Cohort / File(s) Summary
Type Definition and Constants
api/v1alpha1/toolchainconfig_types.go
Added new exported type IntegrationName (string) with kubebuilder Enum validation constraint. Added five exported constants representing supported integration names. Updated RegistrationServiceConfig.DisabledIntegrations field type from []string to []IntegrationName.
Generated Deep Copy
api/v1alpha1/zz_generated.deepcopy.go
Updated RegistrationServiceConfig.DeepCopyInto method to allocate []IntegrationName slice instead of []string for the DisabledIntegrations field.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: introducing integration type constants to improve validation and prevent misconfigurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description addresses the main objective and checks required by the template, with all applicable sections completed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@alexeykazakov alexeykazakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well.. this is another DevSandbox specific thing leaking in our operators.. Is it really necessarily? We won't look at the warnings in most cases anyway, right? And if something is not working then we will notice it right away in the dashboard (something is still enabled while it shouldn't)

@MikelAlejoBR
Copy link
Copy Markdown
Contributor Author

Well.. this is another DevSandbox specific thing leaking in our operators.. Is it really necessarily? We won't look at the warnings in most cases anyway, right? And if something is not working then we will notice it right away in the dashboard (something is still enabled while it shouldn't)

The idea was to help spot misconfigurations on the fly while disabling the integrations, but I guess we can pass on this one if you think it is unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants