Skip to content

feat(scalityui): add ExtraUIApps field for direct UI app injection#77

Merged
ZiyangLinScality merged 2 commits intomainfrom
feature/extra-ui-apps
Jan 28, 2026
Merged

feat(scalityui): add ExtraUIApps field for direct UI app injection#77
ZiyangLinScality merged 2 commits intomainfrom
feature/extra-ui-apps

Conversation

@ZiyangLinScality
Copy link
Copy Markdown
Contributor

Summary

Add ExtraUIApps field to ScalityUI CR spec, allowing direct injection of UI application configurations into the deployed-ui-apps ConfigMap without requiring ScalityUIComponent and ScalityUIComponentExposer resources.

Changes

  • Add DeployedUIApp type to api/v1alpha1/scalityui_types.go with kubebuilder validation
  • Add ExtraUIApps []DeployedUIApp field to ScalityUISpec
  • Update deployed_apps_configmap.go to merge ExtraUIApps into the deployed apps list
  • Add integration tests for ExtraUIApps functionality

Usage

apiVersion: ui.scality.com/v1alpha1
kind: ScalityUI
metadata:
  name: my-ui
spec:
  image: shell-ui:1.0.0
  extraUIApps:
    - name: external-app
      kind: solution
      url: /external-app
      version: "1.0.0"
      appHistoryBasePath: /external-app

Copilot AI review requested due to automatic review settings January 28, 2026 16:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an ExtraUIApps field to the ScalityUI custom resource, enabling direct injection of UI application configurations into the deployed-ui-apps ConfigMap without requiring ScalityUIComponent and ScalityUIComponentExposer resources. This provides a simpler way to add external or non-component-based UI applications to the shell.

Changes:

  • Introduced DeployedUIApp type in the API package with kubebuilder validation for required fields
  • Added ExtraUIApps field to ScalityUISpec allowing users to specify additional UI apps directly
  • Updated the deployed-apps-configmap controller logic to merge ExtraUIApps with exposer-based apps
  • Added comprehensive integration tests covering both standalone ExtraUIApps and merging scenarios

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
api/v1alpha1/scalityui_types.go Added DeployedUIApp type definition and ExtraUIApps field to ScalityUISpec with validation
api/v1alpha1/zz_generated.deepcopy.go Auto-generated DeepCopy methods for the new DeployedUIApp type
config/crd/bases/ui.scality.com_scalityuis.yaml Generated CRD schema including extraUIApps array with validation rules
internal/controller/scalityui/controller.go Removed duplicate DeployedUIApp type definition (moved to API package)
internal/controller/scalityui/deployed_apps_configmap.go Updated to use API type, merge ExtraUIApps with exposer-based apps, and enhanced logging
internal/controller/scalityui/controller_test.go Added tests for ExtraUIApps functionality including standalone and merge scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +64 to +65
// Append ExtraUIApps directly from ScalityUI spec
deployedApps = append(deployedApps, cr.Spec.ExtraUIApps...)
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

Potential issue: No deduplication logic for app names between ExtraUIApps and exposer-based apps. If an app in ExtraUIApps has the same name as an exposer-based app, both will be included in the deployed apps list, which could cause conflicts or unexpected behavior in the UI. Consider adding logic to detect and handle duplicate app names, either by warning the user, preventing duplicates, or documenting the expected behavior when duplicates occur.

Copilot uses AI. Check for mistakes.
@ZiyangLinScality ZiyangLinScality merged commit fa5cf25 into main Jan 28, 2026
3 checks passed
@ZiyangLinScality ZiyangLinScality deleted the feature/extra-ui-apps branch January 28, 2026 17:14
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.

3 participants