Skip to main content

Deploy the Same Pack to Multiple Layers

Palette allows you to add a pack multiple times to the same cluster profile, which may be required in certain scenarios where an integration needs to be installed more than once with different configurations. For example, you may need to deploy two instances of the same microservice or application, but with different configurations.

This page guides you through the process of creating a cluster profile with repeated packs using either the Palette UI or the API. This guide uses the Hello Universe pack as an example.

warning

Depending on the application, you might need to place the repeated pack in a different namespace, as resource conflicts could arise if the original pack has Kubernetes resources with the same names as those the second pack would create.

Prerequisites

  • Your Palette account role must have the clusterProfile.create permission to create a profile. Refer to the Cluster Profile Permissions page for more information about roles and permissions.

Create a Cluster Profile with Repeated Packs

  1. Log in to Palette.

  2. From the left Main Menu, click Profiles.

  3. Click on Add Cluster Profile to create a cluster profile.

  4. In the Basic Information section, enter a name for the profile, select the type as Add-on, and click Next.

  5. Select Add New Pack. In the window that appears, choose Palette Community Registry from the Registry dropdown and select the Hello Universe pack v1.2.0.

  6. After selecting the pack, Palette will display its README. Click on Values under Pack Details to edit the pack values.

  7. To allow the Hello Universe pack to be added multiple times to the profile, include the following lines in the pack values within the YAML editor:

    • Display Name: Add the spectrocloud.com/display-name: <custom_name> key. The <custom_name> key must be a unique name across the cluster profile. For this example, use spectrocloud.com/display-name: hellouni-1.

    • Release Name Override: It associates the pack's release name with the display name you created. Include the line releaseNameOverride: hello-universe: hellouni-1 according to the snippet below, where hello-universe is the pack's release name and hellouni-1 is the display name.

    • Namespace: Include the line namespace: hello-universe-1. Note that in this example, the packs are deployed to different namespaces to avoid resource conflicts.

    pack:
    content:
    images:
    - image: ghcr.io/spectrocloud/hello-universe:1.2.0
    spectrocloud.com/display-name: hellouni-1
    releaseNameOverride:
    hello-universe: hellouni-1
    namespace: hello-universe-1

    manifests:
    hello-universe:
    images:
    hellouniverse: ghcr.io/spectrocloud/hello-universe:1.2.0
    apiEnabled: false
    namespace: hello-universe-1
    port: 8080
    replicas: 1

    Click Confirm and Create to create the profile layer.

  8. Repeat steps 5 through 7 to add a second Hello Universe layer to the profile. This time, use hellouni-2 as the display name and hello-universe-2 as the namespace.

    pack:
    content:
    images:
    - image: ghcr.io/spectrocloud/hello-universe:1.2.0
    spectrocloud.com/display-name: hellouni-2
    releaseNameOverride:
    hello-universe: hellouni-2
    namespace: hello-universe-2

    manifests:
    hello-universe:
    images:
    hellouniverse: ghcr.io/spectrocloud/hello-universe:1.2.0
    apiEnabled: false
    namespace: hello-universe-2
    port: 8080
    replicas: 1

    Once you finish making the alterations, click Next to proceed.

  9. Click Finish Configuration to create the cluster profile.

Validate

  1. Log in to Palette.

  2. From the left Main Menu, select Profiles and navigate to the cluster profile you have created.

  3. Verify that the cluster profile contains two layers with the same pack, and that these layers have different names.