Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Registries #1889

Merged
merged 14 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ The following applies when adding Helm charts to cluster profiles.
[Create Cluster Profiles](../profiles/cluster-profiles/create-cluster-profiles/create-cluster-profiles.md)

<br />

Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,3 @@ Charts from the OCI registry can be used in your **Add on** cluster profiles as


* Click done to get your OCI-helm layer added to the cluster profile.

Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ You now have a cluster profile you can use for deploying Edge hosts.

Consider creating additional profiles with out-of-the-box packs for monitoring, security, authentication, or other capabilities. If you need remote access to the cluster, consider adding the [Spectro Proxy](../../../integrations/frp.md) pack to one of the add-on profiles.

Optionally, add additional Helm or OCI registries and include applications hosted in those registries in add-on profiles. Check out the guide for adding a [Helm](../../../registries-and-packs/helm-charts.md) or [OCI](../../../registries-and-packs/oci-registry.md) registry to learn more.
Optionally, add additional Helm or OCI registries and include applications hosted in those registries in add-on profiles. Check out the guide for adding a [Helm](../../../registries-and-packs/registries/helm-charts.md) or [OCI](../../../registries-and-packs/registries/oci-registry/oci-registry.md) registry to learn more.

### Validate

Expand Down
4 changes: 2 additions & 2 deletions docs/docs-content/devx/manage-dev-engine/registries.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Users can set up a custom pack registry using a Docker image provided by Spectro

Palette Dev Engine supports the following types of custom registries:

* [Helm Registry](../../registries-and-packs/helm-charts.md)
* [Helm Registry](../../registries-and-packs/registries/helm-charts.md)

* [OCI Registry](../../registries-and-packs/oci-registry.md)
* [OCI Registry](../../registries-and-packs/registries/oci-registry/oci-registry.md)

2 changes: 1 addition & 1 deletion docs/docs-content/devx/services/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Palette offers you different types of services to help you model all the depende

## Helm

Palette provides out-of-the-box Helm registries and allows you to add registries. For more information, visit [Palette Helm Registry](../../registries-and-packs/helm-charts.md).
Palette provides out-of-the-box Helm registries and allows you to add registries. For more information, visit [Palette Helm Registry](../../registries-and-packs/registries/helm-charts.md).


## Manifest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: 'Advanced Configuration'
title: 'Advanced Configuration'
sidebar_label: 'Advanced CLI Configuration'
title: 'Advanced CLI Configuration'
description: 'Learn how to apply advanced concepts by customizing the deployments of the Packs registry.'
icon: ''
hide_table_of_contents: false
Expand Down
6 changes: 3 additions & 3 deletions docs/docs-content/registries-and-packs/deploy-pack.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Review each of the following five files in the **hello-universe-pack** folder.

<br />

Optionally, you can define *presets*, which are pack configuration values predefined in a file called **presets.yaml** within the pack. Once defined, the **Presets** field becomes visible in both the **Clusters** and **Profile** sections of the Palette UI. Users can select any preset from the available pack presets, and upon selection, the predefined values of the chosen preset are applied to the pack. Refer to [Pack Presets](https://deploy-preview-1828--docs-spectrocloud.netlify.app/registries-and-packs/pack-constraints#pack-presets) for details and examples of how to define presets.
Optionally, you can define *presets*, which are pack configuration values predefined in a file called **presets.yaml** within the pack. Once defined, the **Presets** field becomes visible in both the **Clusters** and **Profile** sections of the Palette UI. Users can select any preset from the available pack presets, and upon selection, the predefined values of the chosen preset are applied to the pack. Refer to [Pack Presets](./pack-constraints.md#preset-attributes) for details and examples of how to define presets.

The example below shows the parameters you can configure in the **values.yaml** file for the `hello-universe` manifest during the creation of the cluster profile.

Expand All @@ -255,7 +255,7 @@ After completing the review of all files in the pack directory, the next step is

## Set Up the Registry Server

You can set up a registry server using either the Spectro registry or an OCI-compliant registry. Palette supports all OCI-compliant registries, and you can refer to the [Spectro Cloud OCI Registry](https://docs.spectrocloud.com/registries-and-packs/oci-registry/) resource for more information.
You can set up a registry server using either the Spectro registry or an OCI-compliant registry. Palette supports all OCI-compliant registries, and you can refer to the [Spectro Cloud OCI Registry](./registries/oci-registry/oci-registry.md) resource for more information.

The tutorial environment already includes the Spectro registry service and other necessary tools. For OCI registries, as per the [Prerequisites](#prerequisites) section, ensure you have an active OCI registry. Two types of OCI authentication are available: **Amazon (ECR)** and **Basic**. To learn more about Amazon ECR, consult the [What is ECR](https://docs.aws.amazon.com/AmazonECR/latest/userguide/what-is-ecr.html) user guide. <!-- For Basic OCI Authentication, this tutorial uses a [Harbor registry](https://goharbor.io/) as an example. However, you have the flexibility to opt for the OCI registry of your choice. Learn how to set up a Harbor registry server using the [Harbor Installation and Configuration](https://goharbor.io/docs/2.9.0/install-config/) guide.-->

Expand Down Expand Up @@ -1269,4 +1269,4 @@ To learn more about packs in Palette, we encourage you to check out the referenc
- [Pack Constraints](pack-constraints.md)


- [Spectro Cloud OCI Registry](oci-registry.md)
- [OCI Registry](registries/oci-registry/oci-registry.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 60
}

124 changes: 124 additions & 0 deletions docs/docs-content/registries-and-packs/registries/helm-charts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
sidebar_label: "Helm Registries"
title: "Helm Registries"
description: "Learn how to add your own Helm Registries to Palette"
hide_table_of_contents: false
sidebar_position: 20
---

A Helm Chart is a collection of pre-configured Kubernetes resources that define, install, and upgrade applications on a Kubernetes cluster. Additionally, Helm Chart repositories serve as centralized locations to store and share these packaged charts for streamlined deployment and management.

You can utilize Helm Charts in your cluster profiles and specify your own Helm Chart repository or other third-party Helm repositories in Palette.

:::info

You can add a private OCI based Helm Chart registry to Palette. For more information, refer to the [Add OCI Registry](./oci-registry/add-oci-helm.md) guide.

:::


## Synchronization Behavior

When you add a Helm Chart registry to Palette, you can choose whether to synchronize the Helm Chart registry metadata with Palette. The synchronization behavior depends on whether the Helm Chart registry is hosted on a server accessible from Palette's management plane. The metadata is downloaded from the Helm Chart registry and stored internally in Palette.

If the Helm Chart registry is hosted on a server that will not be accessible from Palette, we recommend you do not enable synchronization. Palette will download the Helm Charts registry metadata upon registration and store it internally. This will allow you to reference the Helm Charts in your cluster profiles, including if the Helm Chart registry is inaccessible.

When synchronization is disabled, you must manually synchronize the Helm Chart registry with Palette when you want to update the Helm Charts in Palette. Additionally, you will not be able to search for Helm Charts in during the cluster profile creation process, nor will you be able to view the details of the Helm Charts, such as the **values.yaml** file, version, and description. You must manually specify the Helm Chart name and version to use a specific Helm Chart from your registry as a pack layer.
karl-cardenas-coding marked this conversation as resolved.
Show resolved Hide resolved


:::info

To manually synchronize the Helm Chart registry with Palette, identify the row of the Helm Chart registry in the Helm Chart registry table and click the **three-dot Menu** button. Select **Synchronize** from the expanded menu.

:::

If the Helm Chart registry is hosted on a server that is accessible from Palette, we recommend you enable synchronization. Palette will continuously synchronize the Helm Chart registry and ensure it has the latest Helm Chart registry metadata. When synchronization is enabled, you can search for Helm Charts when creating a pack layer of the type Helm Chart in your cluster profiles. Additionally, you can view the metadata details of the Helm Charts, such as the **values.yaml** file, versions available, and the description.

The table below summarizes the synchronization behavior.

| **Synchronization** | **Behavior** | **Search Available** | **Metadata Displayed** |
| --- | --- | --- | --- |
| Enabled | Palette will continuously synchronize the list of available Helm Charts from the registry. Helm Charts from the registry are searchable during the cluster profile creation. Helm Chart details, including the **values.yaml** and available versions are displayed. | ✅ | ✅ |
| Disabled | Palette will not synchronize the list of available Helm Charts from the registry post registration. During the initial registration of the Helm Chart registry, Palette will download the Helm Chart metadata from the registry and store it internally. Helm Charts from the registry will not be searchable during the cluster profile creation. You must specify the Helm Chart name and version to use a Helm Chart as a pack layer. | ❌ | ❌ |

### When to Disable Synchronization?

You should disable synchronization if the Helm Chart registry is hosted on a server that may not always be accessible from Palette's management plane. For example, if the Helm Chart registry is hosted on a server that is only accessible from a private network that only deployed clusters have access to, you should disable synchronization. Although Palette may not be able to synchronize the Helm Chart registry, your clusters should be able to download the Helm Charts from the Helm Chart registry.


:::caution

The clusters you deploy will always require network access to the Helm Chart registry to download the Helm Charts.

:::


## Add a Helm Chart Registry

Use the following steps to add a Helm Chart repository to Palette.

## Prerequisite

- The Helm Chart repository must use Helm version 3.7.0 or higher.

- Tenant administrator permissions are required to add a Helm Chart repository to Palette.

- Credentials are required to access a protected Helm Chart repository.

## Add a Registry

1. Log in to [Palette](https://console.spectrocloud.com) as a Tenant administrator.

2. From the left **Main Menu**, click on **Tenant Settings**.

3. From the **Tenant Settings Menu**, Select **Registries**.

4. Click on the **Helm Registries** tab.

5. Click **Add New Helm Registry**.

6. Fill out the following input fields.

| **Field** | **Description** |
| --- | --- |
| Name | The name of your Helm Chart registry. |
| Endpoint | The URL of your Helm Chart registry. |
| Synchronization| Choose whether to synchronize your Helm Chart registry with Palette. Enabling synchronization allows Palette to display Helm Charts during the cluster profile creation process when choosing a pack layer of Helm Chart. Disable synchronization if the Helm Chart registry is unreachable. Refer to the [Synchronization Behavior](#synchronization-behavior) section for more information. |
| No Authentication | Toggle this option to the enabled state if your Helm Chart registry does not require authentication. Otherwise, credentials are required. |
| Username | The username for your Helm Chart registry. |
| Password | The password for your Helm Chart registry. |
| Certificate | You can upload the X509 server certificate of your Helm Chart registry to Palette. This is required if your Helm Chart registry uses a self-signed certificate. |
| Insecure Skip TLS Verify | Skip server TLS certificate validation. Check this box if your Helm Chart registry uses a self-signed certificate or if the server certificate is not signed by a trusted CA. |


7. Click **Confirm**. If the credentials are valid and the Palette is able to connect to the Helm Chart registry, the registry is added to Palette. Otherwise, an error message is displayed.

:::tip

If you are encountering issues with adding a Helm Chart registry, review the endpoint URL and ensure that it is accessible from the Palette. Verify the credentials and try again. Lastly, if the Helm Chart registry is hosted on a server using a self-signed certificate, upload the certificate to Palette and skip TLS verification.
:::


You now have a Helm Chart registry added to Palette. You can use the Helm Charts from this registry in your cluster profiles when creating a pack layer of the type Helm Chart.


## Validate


To validate that the Helm Chart registry is added to Palette correctly, ensure you are able to complete the steps above. Additionally, you can use the following steps to validate that the Helm Chart registry is added to Palette correctly.

1. Log in to [Palette](https://console.spectrocloud.com).


2. From the left **Main Menu**, click on **Profiles**.


3. Click **Add Cluster Profile**.


4. Provide a name and select the type **Add-on**.


5. In the following screen, click **Add Helm Chart** and select either **public** or **private**. Select **public** if you added Helm Chart registry that does not require authentication. Select **private** if you added a Helm Chart registry that requires authentication.

6. If you selected **public**, you can search for Helm Charts in the Helm Chart registry. If you selected **private**, you must specify the Helm Chart name and version to use a Helm Chart as a pack layer.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 50
}

Loading