apiVersion: console.openshift.io/v1
kind: ConsoleQuickStart
metadata:
  name: manage-helm-repos
spec:
  description: Manage available content in the Helm Chart Catalog by adding a Helm Chart Repository.
  displayName: Manage available content in the Helm Chart Catalog
  durationMinutes: 5
  accessReviewResources:
    - group: helm.openshift.io
      resource: helmchartrepositories
      verb: create
  icon: >-
    data:image/svg+xml;base64,[encoded data, 4516 characters]
  introduction: >-
    Content in the Helm Chart Catalog is defined by HelmChartRepository (HCR) CRs.
    The HelmChartRepository (HCR) provides a URL, the Helm Catalog is populated
    by pulling available Helm Charts from each of the HCR URLs.
    
    - HCRs are cluster scoped. 
    
    - A default HelmChartRepository (HCR) is provided, called the **redhat-helm-repo**.
    
    - An administrator can add additional HCRs to provide additional Helm Charts.
  tags:
    - helm
  tasks:
    - description: >-
        Follow these steps to create a HelmChartRepository CR:

        1. Click on the [perspective switcher]{{highlight qs-perspective-switcher}} at the top of the navigation, and select **Administrator**.
        
        1. In the navigation menu, click [Home]{{highlight qs-nav-home}}.
        
        1. In the [Home navigation section]{{highlight qs-nav-home}}, click **Search**.
        
        1. Click the **Resources dropdown** menu and select **HelmChartRepository**.
        
        1. Click **Create HelmChartRepository** to bring up the YAML editor.
        
        1. Replace the contents of the YAML editor with:

            ```
            apiVersion: helm.openshift.io/v1beta1
            kind: HelmChartRepository

            metadata:
              name: azure-sample-repo

            spec:
              name: azure-sample-repo

              connectionConfig:
                url: https://raw.githubusercontent.com/Azure-Samples/helm-charts/master/docs
            ```

        1. Click **Create**.

      review:
        failedTaskHelp: This task isn’t verified yet. Try the task again.
        instructions: >-
          Verify that the HelmChartRepository was successfully installed:

          1. Click on the [perspective switcher]{{highlight qs-perspective-switcher}} at the top of the navigation, and select **Developer**.

          1. In the navigation menu, click [Add]{{highlight qs-nav-add}}.
          
          1. On the **+Add** page, click **Helm Chart**. 
          
          1. Confirm that the **azure-sample-repo** is an available catalog.

          1. In the **Chart Repositories** filter, do you see **azure-sample-repo**?

      summary:
        failed: Try the steps again.
        success: >-
          Charts from the **azure-sample-repo** repository are now available.
      title: Create a HelmChartRepository CR
  conclusion: >-
    Helm Charts from the new repository are now available to developers. 
