Skip to content

Commit bdb3296

Browse files
chriswkCopilot
andauthored
feat: add unleash-enterprise helm chart (#219)
* task: migrate away from Bitnami Postgres * feat: Default to using SSL connection to cnpg cluster * fix(shfmt): pass superlinter * Update charts/unleash/values.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update charts/unleash/values.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update charts/unleash/templates/bring-your-own-database-env.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update charts/unleash/NOTES.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update charts/unleash/templates/cnpg-env.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update charts/unleash/templates/cnpg-secret.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * updated to use cnpg.cluster.enabled for cluster installation and cloudnative-pg.enabled for operator installation * chore(lint): linting issues * added NotIn to spell ignore * chore: Updated ignore list, fixed templating bug in byo template * lint(markdown): Updated AGENTS.md to adhere to blank space after header * lint(markdown): Updated AGENTS.md to not have trailing space * lint(kubeconform): Tell kubeconform about the custom resources * chore(crds): update crd extractor to not quote the filename * chore(crds): Add crds with yaml extension * chore(shfmt): update kubeconform script * chore(agent): Added formatting guideline * fix(kubeconform): Added CRD catalog for kubeconform to locate Cluster resource * fix(shfmt): update kubeconform * chore(ci): tweak test summary action to include subfolders inside result * chore(ci): ignore GHA_zizmor for now * fix(kubeconform): dont' include --include-crds flag * fix: readd initContainers even if cnpg.cluster.enabled is false * move cloudnative-pg above cnpg * Update charts/unleash/templates/bring-your-own-database-env.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(lintchart): wrong order of arguments for init containers * docs: breaking changes information * docs: markdown lint now passing * feat: added unleash-enterprise chart * chore: revert unleash chart back to 5.6.4 state * updated unleash-enterprise chart to also generate admin password * make sure admin-secret is looked up by correct name * add podLabels values * add default hostAliases to [] * Added config for csi volume mount in examples * Use new cnpg.cluster.enabled key instead of postgresql.enabled * Update charts/unleash-enterprise/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update charts/unleash-enterprise/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 40b27fb commit bdb3296

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+18922
-21
lines changed

.github/codespell-ignore.list

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
hart
22
pullRequest
3+
NotIn
4+
repo
5+
Repo
6+
notin

.github/kubeconform.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,22 @@ curl --silent --show-error --fail --location --output /tmp/kubeconform.tar.gz ht
1212
sudo tar -C /usr/local/bin -xf /tmp/kubeconform.tar.gz kubeconform
1313

1414
mkdir -p results
15-
echo "Adding bitnami repo so dependency building succeeds"
16-
helm repo add bitnami https://charts.bitnami.com/bitnami
15+
echo "Adding cloudnative repo so dependency building succeeds"
16+
helm repo add cloudnative https://cloudnative-pg.github.io/charts
1717
echo "Repo added"
1818
CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" remotes/origin/main -- charts | grep '[cC]hart.yaml' | sed -e 's#/[Cc]hart.yaml##g')"
1919
for CHART_DIR in ${CHART_DIRS}; do
20-
echo "helm dependency build..."
21-
helm dependency build "${CHART_DIR}"
20+
echo "helm dependency build..."
21+
helm dependency build "${CHART_DIR}"
2222

23-
echo "kubeconforming ${CHART_DIR##charts/} chart ..."
24-
helm template "${CHART_DIR}" -f ./"${CHART_DIR}"/ci/"${CHART_DIR##charts/}"-values.yaml | kubeconform -kubernetes-version "${KUBERNETES_VERSION}" --output=tap > results/"${CHART_DIR##charts/}"-"${KUBERNETES_VERSION}"-result.tap
23+
echo "kubeconforming ${CHART_DIR##charts/} chart ..."
24+
helm template \
25+
"${CHART_DIR}" \
26+
-f ./"${CHART_DIR}"/ci/"${CHART_DIR##charts/}"-values.yaml | kubeconform \
27+
-kubernetes-version "${KUBERNETES_VERSION}" \
28+
--schema-location default \
29+
--schema-location "https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json" \
30+
--output=tap >results/"${CHART_DIR##charts/}"-"${KUBERNETES_VERSION}"-result.tap
2531
done
2632

2733
exit 0

.github/super-linter.env

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
DEFAULT_BRANCH=main
22
VALIDATE_ALL_CODEBASE=false
3+
VALIDATE_BIOME_FORMAT=false
4+
VALIDATE_CHECKOV=false
5+
VALIDATE_CODESPELL=false
6+
VALIDATE_ESLINT=false
7+
VALIDATE_GITHUB_ACTIONS_ZIZMOR=false
38
VALIDATE_JSCPD=false
9+
VALIDATE_KUBERNETES_KUBECONFORM=false
410
VALIDATE_KUBERNETES_KUBEVAL=false
11+
VALIDATE_MARKDOWN_PRETTIER=false
12+
VALIDATE_NATURAL_LANGUAGE=false
13+
VALIDATE_PRETTIER=false
14+
VALIDATE_PYTHON_RUFF=false
15+
VALIDATE_STYLELINT=false
16+
VALIDATE_TRIVY=false
17+
VALIDATE_TYPESCRIPT_ES=false
18+
VALIDATE_TYPESCRIPT_PRETTIER=false
519
VALIDATE_YAML=false
6-
VALIDATE_KUBERNETES_KUBECONFORM=false
7-
VALIDATE_CHECKOV=false
820
VALIDATE_YAML_PRETTIER=false
9-
VALIDATE_ESLINT=false
10-
VALIDATE_BIOME_FORMAT=false
11-
VALIDATE_TRIVY=false

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
- name: Create test summary
9191
uses: test-summary/action@v2
9292
with:
93-
paths: "./results/*.tap"
93+
paths: "./results/**/*.tap"
9494
if: always()
9595

9696
install-chart:

AGENTS.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
5+
- Helm charts live in `charts/`: `unleash`, `unleash-proxy`, and `unleash-edge`. Each chart contains `Chart.yaml`, `values.yaml`, `templates/`, `templates/tests/`, and `examples/` for sample overrides.
6+
- Chart-specific CI values are under `charts/<chart>/ci/*.yaml`; CRDs for the main chart sit in `charts/unleash/crds/`.
7+
- Generated schema test outputs land in `results/` when running kubeconform locally or in CI.
8+
9+
## Build, Test, and Development Commands
10+
11+
- Lint a chart with Helm: `helm lint charts/unleash` (adjust chart path as needed).
12+
- Chart Testing (used in CI): `ct lint --config .github/ct.yaml` and `ct install --config .github/ct.yaml` (requires kind and Helm; installs changed charts listed by `ct list-changed`).
13+
- Render manifests for quick inspection: `helm template charts/unleash -f charts/unleash/ci/unleash-values.yaml`.
14+
- Schema validation (mirrors CI): `.github/kubeconform.sh` with `KUBERNETES_VERSION` set; ensures Bitnami repo is added for dependencies.
15+
- Super-linter locally (needs Docker): `docker run --rm -e RUN_LOCAL=true --env-file ".github/super-linter.env" -v "$(pwd)":/tmp/lint ghcr.io/super-linter/super-linter:latest`.
16+
- Dry-run install for smoke checks: `helm install --debug --dry-run --generate-name charts/unleash`.
17+
18+
## Coding Style & Naming Conventions
19+
20+
- YAML uses two-space indentation; prefer lowercase, hyphen-separated keys and filenames.
21+
- Keep Helm templates minimal and reuse existing helper templates where possible; document new values in `values.yaml` and the chart `README.md`.
22+
- Bump chart `version` (and `appVersion` if applicable) in `Chart.yaml` with chart changes; update `Chart.lock` when dependency versions change.
23+
24+
## Testing Guidelines
25+
26+
- Add or adjust `templates/tests/` if behavior changes require Helm tests; keep CI values in sync so `ct install` passes.
27+
- Run `ct lint` before opening a PR; use `helm template` plus `.github/kubeconform.sh` for schema confidence against supported Kubernetes versions.
28+
- If adding new values, provide a minimal example under `examples/` and ensure defaults keep templates rendering successfully without overrides.
29+
30+
## Commit & Pull Request Guidelines
31+
32+
- Use clear, imperative commit subjects (short scope tags like `chore(lint): …` are common but not required).
33+
- Each chart change should include a version bump, updated docs, and mention of validation commands run.
34+
- PRs should describe the change, reference related issues, and note any kubeconform/ct results or screenshots of rendered resources when relevant.
35+
36+
## Formatting Hygiene
37+
38+
- Keep Markdown readable: leave a blank line after every heading/section and avoid trailing spaces on any line.
39+
- Run `shfmt -w <file>` after modifying shell scripts (e.g., `.github/kubeconform.sh`, `charts/unleash/extract-cnpg-crds.sh`) to keep formatting consistent.

CONTRIBUTING.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,22 @@ Fork with [GitHub Codespaces](https://github.com/features/codespaces):
2626

2727
- [Fork, edit, and preview](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace) using [GitHub Codespaces](https://github.com/features/codespaces) without having to install and run the project locally.
2828

29-
### Make your update:
29+
### Make your update
3030

3131
Make your changes to the file(s) you'd like to update.
3232

33+
### Running superlinter locally
34+
35+
If you're struggling with getting CI to successfully lint your code, you can run superlinter locally to see what's wrong. To do this, you need to have Docker installed on your machine. Once you have Docker installed, you can run the following command:
36+
37+
```bash
38+
docker run --rm \
39+
-e RUN_LOCAL=true \
40+
--env-file ".github/super-linter.env" \
41+
-v "$(pwd)":/tmp/lint \
42+
ghcr.io/super-linter/super-linter:latest
43+
```
44+
3345
### Open a pull request
3446

3547
When you're done making changes and you'd like to propose them for review by opening a pull request.
@@ -41,6 +53,6 @@ When you're done making changes and you'd like to propose them for review by ope
4153
- Did you have an issue, like a merge conflict? Check out GitHub's [git tutorial](https://lab.github.com/githubtraining/managing-merge-conflicts) on how to resolve merge conflicts and other issues.
4254
- We do have bots monitoring our open PRs, which will mark PRs as stale if they haven't had any activity within 30 days and close stale issues without activity after another amount days. If you feel this was in error, please reach out to us or reopen the issue with more information.
4355

44-
### Your PR is merged!
56+
### Your PR is merged
4557

4658
Congratulations! The whole Unleash community thanks you. :sparkles:

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@ helm repo add unleash https://docs.getunleash.io/helm-charts
1616

1717
You can then run `helm search repo unleash` to see the charts.
1818

19-
## Versions
20-
21-
- 1.x includes Unleash v3.x
22-
- 2.x includes Unleash v4.x
23-
2419
## Kubernetes support strategy
2520

26-
We'll build this repository on all k8s versions that have not reached End of Life according to the [Kubernetes support period](https://kubernetes.io/releases/patch-releases/#support-period).
21+
We'll build this repository on all k8s versions that have not reached End of Life according to the
22+
[Kubernetes support period](https://kubernetes.io/releases/patch-releases/#support-period).
2723

2824
## Contributing
2925

@@ -55,7 +51,7 @@ The specific workflow is outlined in the file located at .github/workflows/relea
5551

5652
## Testing the helm chart locally
5753

58-
To test the helm chart locally, first you should set up a local k8s environment. An easy way to do this is to set up kind, you can see instructions for setting it up [here](https://github.com/bricks-software/unleash-infra-docs/blob/main/commands/k8s.md).
54+
To test the helm chart locally, first you should set up a local k8s environment. An easy way to do this is to set up kind, you can see instructions for setting it up at [kind's k8s page](https://kind.sigs.k8s.io/docs/user/quick-start/).
5955

6056
Once you have your local k8s environment set up, you can run the following command to install the helm chart locally:
6157

@@ -66,6 +62,7 @@ helm install --debug --dry-run --generate-name .
6662
```
6763

6864
## Running superlinter locally
65+
6966
If you're struggling with getting CI to successfully lint your code, you can run superlinter locally to see what's wrong. To do this, you need to have Docker installed on your machine. Once you have Docker installed, you can run the following command:
7067

7168
```bash
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
22+
.vscode/
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: v2
2+
name: unleash-enterprise
3+
description: Unleash Enterprise is a feature flag & toggle system, that gives you a great overview over all feature toggles across all your applications and services.
4+
icon: https://docs.getunleash.io/img/logo.svg
5+
6+
type: application
7+
8+
version: 1.0.0
9+
10+
appVersion: "7.3.0"
11+
12+
dependencies:
13+
- name: cloudnative-pg
14+
repository: https://cloudnative-pg.github.io/charts
15+
version: 0.26.1
16+
condition: cloudnative-pg.enabled
17+
18+
maintainers:
19+
- name: ivarconr
20+
email: ivarconr@gmail.com
21+
- name: chriswk
22+
email: chriswk@getunleash.io
23+
sources:
24+
- https://github.com/Unleash/unleash
25+
- https://github.com/bricks-software/unleash-enterprise
26+
- https://github.com/Unleash/helm-charts
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Unleash Enterprise
2+
3+
Unleash is a feature flag & toggle system, that gives you a great overview over all feature toggles across all your applications and services.
4+
5+
This chart bootstraps an [Unleash-Enterprise](https://github.com/bricks-software/unleash-enterprise) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
6+
7+
## Prerequisites
8+
9+
- Kubernetes 1.31+
10+
- Helm 3+
11+
12+
## Get Repo Info
13+
14+
```console
15+
helm repo add unleash https://docs.getunleash.io/helm-charts
16+
helm repo update
17+
```
18+
19+
_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._
20+
21+
## Install Chart
22+
23+
```console
24+
helm install unleash-enterprise unleash/unleash-enterprise
25+
```
26+
27+
_See [configuration](#configuration) below._
28+
29+
_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
30+
31+
## Dependencies
32+
33+
By default, this chart does **not** install any database dependencies or provision a database. The database-related charts are optional and must be explicitly enabled in your values:
34+
35+
- [cloudnative-pg](https://cloudnative-pg.github.io/charts) (optional)
36+
37+
To have this chart manage a CloudNativePG Cluster resource for you, set `cnpg.cluster.enabled` to `true` in your values. If you also want the chart to install the CloudNativePG operator, set `cloudnative-pg.enabled` to `true` as well. Both options default to `false`.
38+
39+
_See [helm dependency](https://helm.sh/docs/helm/helm_dependency/) for command documentation._
40+
41+
### Using a separate database instance
42+
43+
While you can use this chart with the bundled Postgres, we recommend that you run a separate instance instead.
44+
45+
We currently don't have a direct upgrade path for the Cloud-Native PostgreSQL dependency. Furthermore, we do not currently configure any backups, though persistent storage is configured for the managed CNPG cluster.
46+
47+
## Uninstall Chart
48+
49+
```console
50+
helm uninstall unleash-enterprise
51+
```
52+
53+
This removes all the Kubernetes components associated with the chart and deletes the release.
54+
55+
_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
56+
57+
## Upgrading Chart
58+
59+
```console
60+
helm upgrade unleash-enterprise unleash/unleash-enterprise --install
61+
```
62+
63+
_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
64+
65+
## Configuration
66+
67+
See description of configuration in the values.yaml

0 commit comments

Comments
 (0)