Add Support For Deploying Helm Charts From Artifact Hub

by ADMIN 56 views

Description

Currently, our application only supports deploying Helm charts from direct repository URLs. We need to add support for deploying charts directly from Artifact Hub, which is a central hub for Kubernetes packages, including Helm charts. This enhancement will enable users to search for packages directly from Artifact Hub through our API, deploy Helm charts using Artifact Hub package identifiers, browse available repositories from Artifact Hub, and view package details and default values before deployment.

Problem Statement

Users cannot currently:

  • Search for packages directly from Artifact Hub through our API
  • Deploy Helm charts using Artifact Hub package identifiers
  • Browse available repositories from Artifact Hub
  • View package details and default values before deployment

Proposed Solution

Implement new API endpoints that:

  1. Allow searching packages from Artifact Hub
  2. Enable deployment of Helm charts using Artifact Hub package IDs
  3. Provide repository listing functionality
  4. Retrieve package details and default values
  5. Maintain consistency with existing deployment patterns

New Endpoints

The following new endpoints will be implemented:

  • POST /api/v1/artifact-hub/helm-deploy: Deploy a Helm chart from Artifact Hub using a package ID
  • POST /api/v1/artifact-hub/packages/search: Search for packages in Artifact Hub
  • GET /api/v1/artifact-hub/packages/:packageId/details: Retrieve package details for a given package ID
  • GET /api/v1/artifact-hub/packages/:packageId/default-values: Retrieve default values for a given package ID
  • GET /api/v1/artifact-hub/repositories/list: List available repositories in Artifact Hub

Integration Points

The following integration points will be reused:

  • Existing deployHelmChart function
  • Current ConfigMap storage
  • Established error handling patterns

Benefits

This enhancement will provide the following benefits:

  • Simplified deployment process for users
  • Access to a wider range of Helm charts
  • Better discoverability of available packages
  • Consistent user experience

Related Issues

The following related issues will be addressed:

  • #XXX - Helm deployment improvements
  • #YYY - ConfigMap storage enhancements

Labels

This enhancement will be labeled as:

  • enhancement
  • feature
  • helm
  • artifact-hub
  • api

Acceptance Criteria

The following acceptance criteria will be met:

  • API endpoint to search Artifact Hub packages
  • API endpoint to deploy Helm charts from Artifact Hub
  • API endpoint to list available repositories
  • API endpoint to get package details
  • API endpoint to retrieve default values.yaml
  • Proper error handling for all endpoints
  • Integration with existing ConfigMap storage
  • Documentation and Postman collection
  • Unit tests for new functionality

Technical Details

The following technical details will be implemented:

  • New API endpoints will be created to support searching packages, deploying Helm charts, listing repositories, and retrieving package details and default values.
  • Existing deployHelmChart function will be reused to deploy Helm charts from Artifact Hub.
  • Current ConfigMap storage will be maintained to store package details and default values.
  • Established error handling patterns will be followed to handle errors and exceptions.

Q: What is Artifact Hub?

A: Artifact Hub is a central hub for Kubernetes packages, including Helm charts. It provides a single location for users to discover, install, and manage Kubernetes packages.

Q: Why do we need to add support for deploying Helm charts from Artifact Hub?

A: Currently, our application only supports deploying Helm charts from direct repository URLs. By adding support for deploying charts directly from Artifact Hub, we will enable users to search for packages directly from Artifact Hub through our API, deploy Helm charts using Artifact Hub package identifiers, browse available repositories from Artifact Hub, and view package details and default values before deployment.

Q: What are the benefits of deploying Helm charts from Artifact Hub?

A: The benefits of deploying Helm charts from Artifact Hub include:

  • Simplified deployment process for users
  • Access to a wider range of Helm charts
  • Better discoverability of available packages
  • Consistent user experience

Q: What new API endpoints will be implemented?

A: The following new API endpoints will be implemented:

  • POST /api/v1/artifact-hub/helm-deploy: Deploy a Helm chart from Artifact Hub using a package ID
  • POST /api/v1/artifact-hub/packages/search: Search for packages in Artifact Hub
  • GET /api/v1/artifact-hub/packages/:packageId/details: Retrieve package details for a given package ID
  • GET /api/v1/artifact-hub/packages/:packageId/default-values: Retrieve default values for a given package ID
  • GET /api/v1/artifact-hub/repositories/list: List available repositories in Artifact Hub

Q: How will the existing deployHelmChart function be reused?

A: The existing deployHelmChart function will be reused to deploy Helm charts from Artifact Hub. This will ensure consistency with existing deployment patterns and minimize the impact on existing functionality.

Q: How will error handling be implemented?

A: Established error handling patterns will be followed to handle errors and exceptions. This will ensure that errors are properly handled and users are provided with clear and concise error messages.

Q: What is the expected outcome of this enhancement?

A: The expected outcome of this enhancement is to provide a more comprehensive and user-friendly experience for deploying Helm charts from Artifact Hub. This will enable users to search for packages directly from Artifact Hub, deploy Helm charts using Artifact Hub package identifiers, browse available repositories from Artifact Hub, and view package details and default values before deployment.

Q: What are the related issues that will be addressed?

A: The following related issues will be addressed:

  • #XXX - Helm deployment improvements
  • #YYY - ConfigMap storage enhancements

Q: What are the labels associated with this enhancement?

A: This enhancement will be labeled as:

  • enhancement
  • feature
  • helm
  • artifact-hub
  • api

Q: What are the acceptance criteria for this enhancement?

A: The following acceptance criteria will be met:

  • API endpoint to search Artifact Hub packages
  • API endpoint to deploy Helm charts from Artifact Hub
  • API endpoint to list available repositories
  • API endpoint to get package details
  • API endpoint to retrieve default values.yaml
  • Proper error handling for all endpoints
  • Integration with existing ConfigMap storage
  • Documentation and Postman collection
  • Unit tests for new functionality