Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
19 changes: 14 additions & 5 deletions .github/workflows/helm-chart-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,24 @@ jobs:
kubectl_version: v1.37.1

- name: Load the images into kind
run: kind load docker-image unitycatalog:ci unitycatalog-ui:ci --name chart-testing
# package-chart.sh 0.0.0-ci stamps app version v0.0.0-ci, which sets both image tags.
run: |
docker tag unitycatalog:ci unitycatalog:v0.0.0-ci
docker tag unitycatalog-ui:ci unitycatalog-ui:v0.0.0-ci
kind load docker-image unitycatalog:v0.0.0-ci unitycatalog-ui:v0.0.0-ci --name chart-testing

- name: Install the chart and run helm test
- name: Package the chart as a release, install it and run helm test
run: |
helm install uc helm --namespace uc --create-namespace --wait --timeout 600s \
helm/package-chart.sh 0.0.0-ci "$RUNNER_TEMP"
Comment thread
shba24 marked this conversation as resolved.
Resolved
# Upgrades rely on unchanged resource names: the PVC and signing key Secret are pre-install
# hooks, so nothing recreates them under a new name.
helm template unitycatalog "$RUNNER_TEMP/unitycatalog-chart-0.0.0-ci.tgz" > "$RUNNER_TEMP/names.yaml"
for name in unitycatalog-server unitycatalog-server-db unitycatalog-server-jwt-key unitycatalog-ui; do
grep -qE "^ name: \"?$name\"?\$" "$RUNNER_TEMP/names.yaml" || { echo "::error::No resource named $name"; exit 1; }
done
helm install uc "$RUNNER_TEMP/unitycatalog-chart-0.0.0-ci.tgz" --namespace uc --create-namespace --wait --timeout 600s \
--set server.deployment.image.repository=unitycatalog \
--set server.deployment.image.tag=ci \
--set server.deployment.image.pullPolicy=Never \
--set ui.deployment.image.repository=unitycatalog-ui \
--set ui.deployment.image.tag=ci \
--set ui.deployment.image.pullPolicy=Never
helm test uc --namespace uc --logs
2 changes: 2 additions & 0 deletions helm/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
.idea/
*.tmproj
.vscode/
# Maintainer scripts
*.sh

# Helm-docs files
README.md.gotmpl
7 changes: 3 additions & 4 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
apiVersion: v2
name: unitycatalog
name: unitycatalog-chart
Comment thread
shba24 marked this conversation as resolved.
Resolved
description: A Helm chart to deploy Unity Catalog on Kubernetes
home: "https://github.com/unitycatalog/unitycatalog/tree/main/helm"
sources: ["https://github.com/unitycatalog/unitycatalog/tree/main/helm"]
type: application

version: 0.0.1-pre.1

# Use latest unstable version until we have a stable version of UC Server that works with UI
# Placeholders: helm/package-chart.sh sets both at release, so chart X.Y.Z runs server image vX.Y.Z.
version: 0.0.0-dev
appVersion: main
35 changes: 18 additions & 17 deletions helm/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# unitycatalog

![Version: 0.0.1-pre.1](https://img.shields.io/badge/Version-0.0.1--pre.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: main](https://img.shields.io/badge/AppVersion-main-informational?style=flat-square)
# unitycatalog-chart

This chart deploys [Unity Catalog](https://github.com/unitycatalog/unitycatalog) on a Kubernetes cluster
using the [Helm](https://github.com/helm/helm) package manager.

## Prerequisites
- Kubernetes 1.20+ cluster
- Helm 3.1+
- Helm 3.8+

## Features
- Deploys Unity Catalog server and UI
Expand All @@ -16,21 +14,24 @@ using the [Helm](https://github.com/helm/helm) package manager.
- Customizable configuration for server and UI using Helm values

## Installing the Chart
To install the chart with the release name `unitycatalog`:
Starting with 0.8.0, each Unity Catalog release publishes this chart to Docker Hub, with the same version as the release.
To install release X.Y.Z with the release name `unitycatalog`:

```sh
helm install unitycatalog .
helm install unitycatalog oci://registry-1.docker.io/unitycatalog/unitycatalog-chart --version X.Y.Z
```

Chart version X.Y.Z runs the server image `unitycatalog/unitycatalog:vX.Y.Z` and the UI image `unitycatalog/unitycatalog-ui:vX.Y.Z`.

## Uninstalling the Chart
To uninstall the `unitycatalog` chart:

```sh
helm uninstall unitycatalog
```

The command removes all the Kubernetes components associated with the chart and deletes the release.
If persistent volumes are used, they are not deleted by default. To delete them, you need to manually delete the PVCs.
The command deletes the release. It keeps the H2 database PersistentVolumeClaim and the token signing key Secret;
delete both to remove the data.

## Configuration
The following table lists the configurable parameters of the Unity Catalog chart and their default values.
Expand Down Expand Up @@ -212,7 +213,7 @@ users:
<td>fullnameOverride</td>
<td>string</td>
<td><pre lang="">
derived from the chart parameters and metadata
derived from the release name and nameOverride
</pre>
</td>
<td>Override the full name of the chart</td>
Expand Down Expand Up @@ -321,10 +322,10 @@ If set, TLS will be enabled for the ingress
<td>nameOverride</td>
<td>string</td>
<td><pre lang="">
derived from the chart parameters and metadata
unitycatalog
</pre>
</td>
<td>Override the name of the chart</td>
<td>Override the name used in resource names</td>
</tr>
<tr>
<td>server.config.extraProperties</td>
Expand Down Expand Up @@ -406,10 +407,10 @@ not set
<td>server.createUsersJob.image.tag</td>
<td>string</td>
<td><pre lang="json">
"latest"
"3.24.2@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6"
</pre>
</td>
<td>Tag for the create users job image</td>
<td>Tag for the create users job image, pinned by digest</td>
</tr>
<tr>
<td>server.createUsersJob.ttlSecondsAfterFinished</td>
Expand Down Expand Up @@ -829,10 +830,10 @@ not set
<td>server.deployment.initContainer.image.tag</td>
<td>string</td>
<td><pre lang="json">
"latest"
"3.24.2@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6"
</pre>
</td>
<td>Tag for the render config container</td>
<td>Tag for the render config container, pinned by digest</td>
</tr>
<tr>
<td>server.deployment.initContainer.securityContext</td>
Expand Down Expand Up @@ -1400,10 +1401,10 @@ not set
<td>ui.deployment.initContainer.image.tag</td>
<td>string</td>
<td><pre lang="json">
"latest"
"1.37.0@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e"
Comment thread
shba24 marked this conversation as resolved.
Resolved
</pre>
</td>
<td>Tag for the UI init container</td>
<td>Tag for the UI init container, pinned by digest</td>
</tr>
<tr>
<td>ui.deployment.initContainer.securityContext</td>
Expand Down
15 changes: 8 additions & 7 deletions helm/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

This chart deploys [Unity Catalog](https://github.com/unitycatalog/unitycatalog) on a Kubernetes cluster
using the [Helm](https://github.com/helm/helm) package manager.

## Prerequisites
- Kubernetes 1.20+ cluster
- Helm 3.1+
- Helm 3.8+

## Features
- Deploys Unity Catalog server and UI
Expand All @@ -17,21 +15,24 @@ using the [Helm](https://github.com/helm/helm) package manager.
- Customizable configuration for server and UI using Helm values

## Installing the Chart
To install the chart with the release name `unitycatalog`:
Starting with 0.8.0, each Unity Catalog release publishes this chart to Docker Hub, with the same version as the release.
To install release X.Y.Z with the release name `unitycatalog`:

```sh
helm install unitycatalog .
helm install unitycatalog oci://registry-1.docker.io/unitycatalog/unitycatalog-chart --version X.Y.Z
Comment thread
shba24 marked this conversation as resolved.
Resolved
```

Chart version X.Y.Z runs the server image `unitycatalog/unitycatalog:vX.Y.Z` and the UI image `unitycatalog/unitycatalog-ui:vX.Y.Z`.

## Uninstalling the Chart
To uninstall the `unitycatalog` chart:

```sh
helm uninstall unitycatalog
```

The command removes all the Kubernetes components associated with the chart and deletes the release.
If persistent volumes are used, they are not deleted by default. To delete them, you need to manually delete the PVCs.
The command deletes the release. It keeps the H2 database PersistentVolumeClaim and the token signing key Secret;
delete both to remove the data.

## Configuration
The following table lists the configurable parameters of the Unity Catalog chart and their default values.
Expand Down
16 changes: 16 additions & 0 deletions helm/package-chart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Packages the chart for a Unity Catalog release: chart version X.Y.Z runs server image vX.Y.Z.
# Usage: helm/package-chart.sh <version> [destination]

set -euo pipefail

version="${1:?Usage: $0 <version without the leading v, e.g. 0.8.0> [destination]}"
destination="${2:-.}"

if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]; then
echo "Version must be X.Y.Z without a leading v, got: $version" >&2
exit 1
fi

helm package "$(dirname "$0")" --version "$version" --app-version "v$version" --destination "$destination"
10 changes: 6 additions & 4 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{{/*
Expand the name of the chart.
Base name for resources: nameOverride, else "unitycatalog". Resource names default to "unitycatalog",
not .Chart.Name, so they stay the same across chart renames and --reuse-values upgrades. Not
truncated: unitycatalog.fullname compares it with the release name, then truncates the result.
*/}}
{{- define "unitycatalog.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 56 | trimSuffix "-" }}
{{- default "unitycatalog" .Values.nameOverride }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 56 chars for all fullnames depending on this to fit 63 characters (longest suffix "-server").
Some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
If the release name contains the base name, the release name is the full name.
*/}}
{{- define "unitycatalog.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 56 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- $name := include "unitycatalog.name" . }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 56 | trimSuffix "-" }}
{{- else }}
Expand Down
18 changes: 9 additions & 9 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ server:
repository: alpine
# -- (string) Pull policy for the render config container
pullPolicy: IfNotPresent
# -- (string) Tag for the render config container
tag: latest
# -- (string) Tag for the render config container, pinned by digest
tag: "3.24.2@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6"
Comment thread
shba24 marked this conversation as resolved.
Resolved

# -- (object) Security context for the init container
# @default -- not set
Expand Down Expand Up @@ -550,8 +550,8 @@ server:
repository: alpine
# -- (string) Pull policy for the create users job image
pullPolicy: IfNotPresent
# -- (string) Tag for the create users job image
tag: latest
# -- (string) Tag for the create users job image, pinned by digest
tag: "3.24.2@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6"

# -- (object) Additional annotations for the create users job
# @default -- not set
Expand Down Expand Up @@ -643,8 +643,8 @@ ui:
repository: busybox
# -- (string) Pull policy for the UI init container
pullPolicy: IfNotPresent
# -- (string) Tag for the UI init container
tag: latest
# -- (string) Tag for the UI init container, pinned by digest
tag: "1.37.0@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e"

# -- (object) Security context for the init container
# @default -- not set
Expand Down Expand Up @@ -844,11 +844,11 @@ test:
#
imagePullSecrets:

# -- (string) Override the name of the chart
# @default -- derived from the chart parameters and metadata
# -- (string) Override the name used in resource names
# @default -- unitycatalog
nameOverride:
# -- (string) Override the full name of the chart
# @default -- derived from the chart parameters and metadata
# @default -- derived from the release name and nameOverride
fullnameOverride:


Expand Down
Loading