epam/edp-headlamp

Add codemie integration page

Closed this issue · 0 comments

The task involves improving the existing KRCI Portal Configuration section. Currently, the portal allows setting AI chat configurations. The following enhancements are required:

  1. Enable a UI form to list the current CodeMie operator configuration.
  2. Enable capabilities to list CodeMie operator resources that have already been created, such as projects, settings, and applications.

Implementation Plan

  1. Analyze the current UI and backend implementation for the AI chat configuration.
  2. Design and implement a UI form that lists the current CodeMie operator configurations.
  3. Implement backend logic to fetch and display the current configurations in the UI form.
  4. Design and implement a UI section that lists the CodeMie operator resources, including projects, settings, and applications.
  5. Implement backend logic to fetch and display the list of CodeMie operator resources.
  6. Ensure that the new features are integrated seamlessly with the existing portal functionalities.
  7. Test the new features thoroughly in a staging environment.
  8. Deploy the updated portal to the production environment.
  9. Update the documentation to reflect the new configuration and resource management options.

Acceptance Criteria
A UI form is added to the KRCI Portal Configuration section to list the current CodeMie operator configuration.
The portal has capabilities to list CodeMie operator resources that have already been created (projects, settings, applications).
The new features are tested and verified in a staging environment.
The updated portal is deployed to the production environment.
Rename label from 'app.edp.epam.com/secret-type: codemie' to 'app.edp.epam.com/secret-type: chat-assistant'
Current 'CodeMie' section renamed to 'Chat Assistant'.
In 'CodeMie' section enable flow like in SSO Integration, find secret with label 'app.edp.epam.com/secret-type: codemie' and enable form like in SSO Integration with field 'client_id', and 'client_secret'.
Enable 'CodeMie Projects' section. Find kind: CodemieProject and provide read mode for objects.

apiVersion: edp.epam.com/v1alpha1
kind: Codemie
metadata:
name: codemie
spec:
oidc:
secretRef:
clientKey: client_id // key for client_id in secret
name: codemie // name of secret for integration
secretKey: client_secret / key for client_secret in secret
tokenEndpoint: >-
https://keycloak.example.com/auth/realms/shared/protocol/openid-connect/token
url: https://codemie.example.com/code-assistant-api/

apiVersion: v1
kind: Secret
metadata:
name: codemie // key for kind: codemie
data:
client_id: base64 // secret data
client_secret: base64 // secret data
type: Opaque

apiVersion: edp.epam.com/v1alpha1
kind: CodemieProject
metadata:
name: // EDP namespace (can be another)
spec:
codemieRef:
kind: Codemie // link to CR type
name: codemie // name of CR
name: // EDP namespace (can be another)

apiVersion: edp.epam.com/v1alpha1
kind: CodemieProjectSettings
metadata:
name: -git
spec:
alias: gitbud
codemieRef:
kind: Codemie // link to CR type
name: codemie // name of CR
gitCredential:
secretRef:
name: -git // name of git credentials
secretKey: token // key in secret to get token
tokenName: codemie // can be random
url: https://gitbud.example.com
projectName: // ref to kind: CodemieProject
type: Git // type of settings (can be random)

apiVersion: v1
kind: Secret
metadata:
name: -git // secret name for kind: CodemieProjectSettings
token: base64token // secret key for kind: CodemieProjectSettings
type: Opaque