Skip to content

Commit

Permalink
docs: DOC-1027 DOC-1028 Add layer constraint info to pack-constraints…
Browse files Browse the repository at this point in the history
….md (#2055) (#2056)

* Add layer constraint info to pack-constraints.md

Add required layer constraint and layer choices

* Update pack-constraints.md

Fix reviewdog issues

* docs: table suggestion

* docs: DOC-1027 DOC-1028 more examples

* update table descirptions

* Remove text

* docs: minor changes

* docs: vale feedback

---------

Co-authored-by: Karl Cardenas <[email protected]>
(cherry picked from commit aae1b2c)

Co-authored-by: Sheldon Lo-A-Njoe <[email protected]>
  • Loading branch information
1 parent 28b924c commit c0e69b9
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Palette supports integration with Google Cloud Platform (GCP) accounts. This sec

- [Compute Admin](https://cloud.google.com/iam/docs/understanding-roles#compute.admin)

- [Service Account User](https://cloud.google.com/iam/docs/understanding-roles#iam.serviceAccountUser)

- [Storage Object Viewer](https://cloud.google.com/iam/docs/understanding-roles#storage.objectViewer)

- [Service Account Token Creator](https://cloud.google.com/iam/docs/understanding-roles#iam.serviceAccountTokenCreator)

<br />

:::info
Expand Down
110 changes: 56 additions & 54 deletions docs/docs-content/registries-and-packs/pack-constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,21 @@ Pack dependency constraints must be defined in the `pack.json` file. The sample
"dependencies": [
{
"packName": "vault",
"layer": "addon",
"minVersion": "0.6.0",
"maxVersion": "",
"type": "optional"
},
{
"packName": "csi-vsphere-volume",
"layer": "csi",
"minVersion": "1.0.0",
"maxVersion": "",
"type": "notSupported"
},
{
"packName": "kubernetes",
"layer": "k8s",
"minVersion": "1.17.0",
"maxVersion": "1.18.6",
"type": "required"
Expand All @@ -275,71 +278,70 @@ If the minimum and maximum versions are not mentioned, the validation is skipped

## Pack Dependency Attributes

<Tabs queryString="Pack Dependency Attributes">
A pack can have one or more dependencies defined in the `dependencies` array. Each dependency consists of the following attributes.

<TabItem label="packName" value="pack_dependency_attribute_packName">

Name of the dependent pack.

**Example**: In the example, the three dependent packs are identified by unique pack names such as `vault`, `csi-vsphere-volume`, and `kubernetes`.

</TabItem>

<TabItem label="minVersion" value="pack_dependency_attribute_minVersion">

Minimum supported dependent pack version, any version below the minimum version is not valid.

**Example**: pack `pack-constraints-test` must require pack `vault` of min version `0.6.0`.

</TabItem>

<TabItem label="maxVersion" value="pack_dependency_attribute_maxVersion">

Maximum supported dependent pack version, any version above the maximum version is not valid.

**Example**: pack `pack-constraints-test` must require pack `kubernetes` of min version `1.18.6`.

</TabItem>

<TabItem label="type" value="pack_dependency_attribute_type">

<Tabs queryString="Pack dependency types">

<TabItem label="optional" value="pack_dependency_optional">

The dependent pack is optional but validates minimum or maximum versions if the pack is selected.

**Example**: `vault` pack is optional.

</TabItem>

<TabItem label="required" value="pack_dependency_required">

The dependent pack is mandatory and must contain a version within the minimum or maximum supported versions, if defined.

**Example**: `kubernetes` pack must be required of min version `1.17.0` and max version `1.18.6`. Any Kubernetes version below `1.17.0` and above `1.18.6` is not valid.

</TabItem>

<TabItem label="notSupported" value="pack_dependency_notSupported">
| Attribute | Description |
|-------|-------------|
| `packName` | Name of the dependent pack. |
| `layer` | The layer type of the dependent pack. Refer to the [Layer Types](#layer-types) section to learn more. |
| `minVersion` | Minimum supported dependent pack version, any version below the minimum version is not valid. |
| `maxVersion` | Maximum supported dependent pack version, any version above the maximum version is not valid. |
| `type` | The defined type for the dependency. Refer to the [Dependency Types](#dependency-types) section to learn more.|


In the example code snippet from earlier, the three dependent packs are identified by unique pack names such as `vault`, `csi-vsphere-volume`, and `kubernetes`. A `minVersion`, `maxVersion`, and `type` are defined for each dependent pack.

```json {3,10,17} hideClipboard
"dependencies": [
{
"packName": "vault",
"layer": "addon",
"minVersion": "0.6.0",
"maxVersion": "",
"type": "optional"
},
{
"packName": "csi-vsphere-volume",
"layer": "csi",
"minVersion": "1.0.0",
"maxVersion": "",
"type": "notSupported"
},
{
"packName": "kubernetes",
"layer": "k8s",
"minVersion": "1.17.0",
"maxVersion": "1.18.6",
"type": "required"
}
]
```

Pack versions within the range of the mentioned minimum and maximum (including the minimum and maximum) are not supported.

**Example**: `csi-vsphere-volume` pack is not supported if the version selected falls within the min and max versions.
#### Layer Types

:::info
The `layer` attribute defines the layer where the dependent pack can be found in the Cluster Profile. The following table lists the different layer types.

If the minimum and maximum versions are not mentioned, the validation is skipped and all versions are allowed.
| Layer | Description |
|-------|-------------|
| `os` | The dependent pack can only be found in the operating system layer of the Cluster Profile. The `os` layer contains packs such as Ubuntu, CentOS or Bring Your Own OS (BYOOS). |
| `k8s` | The dependent pack can only be found in the Kubernetes layer of the Cluster Profile. The `k8s` layer contains packs such as [Palette eXtended Kubernetes](../integrations/kubernetes.md), RKE2, k3s or MicroK8s. |
| `cni` | The dependent pack can only be found in the network layer of the Cluster Profile. The `cni` layer contains packs such as Calico, Cilium, Flannel and Antrea. |
| `csi` | The dependent pack can only be found in the storage layer of the Cluster Profile. The `csi` layer contains packs such as vSphere CSI, Amazon EBS CSI, Amazon EFS, Azure Disk and Portworx.|
| `addon` | The dependent pack can only be found in the add-on layers of the Cluster Profile. The `addon` layer contains packs such as ArgoCD, Vault, Nginx, and many more. |

:::

</TabItem>
#### Dependency Types

</Tabs>
The `type` attribute defines the type of dependency. The following table lists the different dependency types.

</TabItem>
| Type | Description |
|-------|-------------|
| `optional` | The dependent pack is optional but validates minimum or maximum versions if the pack is selected. In the example, the `vault` pack is optional. |
| `required` | The dependent pack is mandatory and must contain a version within the minimum or maximum supported versions, if defined. In the example, the `kubernetes` pack is required with a minimum version of `1.17.0` and a max version of `1.18.6`. Any Kubernetes version below `1.17.0` and above `1.18.6` is not valid. |
| `notSupported` | The pack versions within the range of the mentioned minimum and maximum are not supported. The `csi-vsphere-volume` pack is not supported if the version selected falls within the min and max versions. |

</Tabs>

## Pack Resource Constraints

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You can add a private OCI based Helm Chart registry to Palette. For more informa

## 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.
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 synchronization is enabled, Palette will automatically synchronize the Helm Chart registry metadata every 24 hours.

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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Registries are added at the tenant level and are available to all users in the t

## Synchronization

Registries are automatically synchronized with Palette. Helm registries are different as you can choose to disable synchronization. When you disable synchronization, you must manually synchronize the Helm registry with Palette. Refer to the [Helm Registry](helm-charts.md#synchronization-behavior) resource to learn more about the synchronization behavior of Helm registries.
Registries are automatically synchronized with Palette every 24 hours. Helm registries are different as you can choose to disable synchronization. When you disable synchronization, you must manually synchronize the Helm registry with Palette. Refer to the [Helm Registry](helm-charts.md#synchronization-behavior) resource to learn more about the synchronization behavior of Helm registries.



Expand Down

0 comments on commit c0e69b9

Please sign in to comment.