Skip to content

Commit c495825

Browse files
authored
feat(schema): AS-706 helm values schema (#403)
1 parent d612122 commit c495825

19 files changed

Lines changed: 3950 additions & 77 deletions

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ jobs:
2020
- name: Temporary SQLite/LZMA - Install missing libraries
2121
run: sudo apt install -y libsqlite3-dev libbz2-dev
2222
- name: install asdf & tools
23-
uses: asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
23+
uses: asdf-vm/actions/install@v4.0.0
24+
- name: Install helm plugins
25+
run: make helm-plugins
2426
- uses: pre-commit/action@v3.0.1

.github/workflows/test-docker-pulls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Temporary SQLite/LZMA - Install missing libraries
2828
run: sudo apt install -y libsqlite3-dev libbz2-dev
2929
- name: install asdf & tools
30-
uses: asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
30+
uses: asdf-vm/actions/install@v4.0.0
3131
- name: Login to Docker Hub
3232
uses: docker/login-action@v3
3333
with:

.github/workflows/test-docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@v4.2.2
1919
- uses: actions/setup-python@v5.6.0
2020
- name: install asdf & tools
21-
uses: asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
21+
uses: asdf-vm/actions/install@v4.0.0
2222
- name: Run unit tests
2323
shell: bash
2424
run: |
@@ -34,7 +34,7 @@ jobs:
3434
- name: Temporary SQLite/LZMA - Install missing libraries
3535
run: sudo apt install -y libsqlite3-dev libbz2-dev
3636
- name: install asdf & tools
37-
uses: asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
37+
uses: asdf-vm/actions/install@v4.0.0
3838
- name: Authenticate to Google Cloud
3939
id: auth
4040
uses: google-github-actions/auth@v2.1.7
@@ -71,7 +71,7 @@ jobs:
7171
- uses: actions/checkout@v4.2.2
7272
- uses: actions/setup-python@v5.6.0
7373
- name: install asdf & tools
74-
uses: asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
74+
uses: asdf-vm/actions/install@v4.0.0
7575
- name: Authenticate to Google Cloud
7676
id: auth
7777
uses: google-github-actions/auth@v2.1.7

.github/workflows/test-helm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Temporary SQLite/LZMA - Install missing libraries
1313
run: sudo apt install -y libsqlite3-dev libbz2-dev
1414
- name: install asdf & tools
15-
uses: asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
15+
uses: asdf-vm/actions/install@v4.0.0
1616
- name: Run unit tests
1717
shell: bash
1818
run: |

.pre-commit-config.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ repos:
1414
- id: end-of-file-fixer
1515
- id: mixed-line-ending
1616
- id: pretty-format-json
17+
# Ignore generated files
18+
exclude: ^helm/fiftyone-teams-app/values.schema.json
1719
- id: trailing-whitespace
1820
- repo: https://github.com/Lucas-C/pre-commit-hooks
1921
rev: v1.5.5
@@ -30,11 +32,23 @@ repos:
3032
args:
3133
# Make the tool search for charts only under the `helm/fiftyone-teams-app` directory
3234
- --chart-search-root=helm/fiftyone-teams-app
33-
3435
# A base filename makes it relative to each chart directory found
3536
- --template-files=README.md.gotmpl
37+
- repo: https://github.com/dadav/helm-schema
38+
rev: 0.18.1
39+
hooks:
40+
- id: helm-schema
41+
args:
42+
- --chart-search-root=./helm/fiftyone-teams-app
43+
- --no-dependencies
44+
- --add-schema-reference
45+
- --skip-auto-generation=additionalProperties,required
46+
- --append-newline
47+
# This breaks type annotations
48+
# - --helm-docs-compatibility-mode
49+
3650
- repo: https://github.com/igorshubovych/markdownlint-cli
37-
rev: v0.44.0
51+
rev: v0.45.0
3852
hooks:
3953
- id: markdownlint
4054
- id: markdownlint-fix
@@ -96,7 +110,7 @@ repos:
96110
- --write
97111
- --simplify
98112
- repo: https://github.com/compilerla/conventional-pre-commit
99-
rev: v4.1.0
113+
rev: v4.2.0
100114
hooks:
101115
- id: conventional-pre-commit
102116
stages: [commit-msg]

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
make asdf
3333
```
3434

35+
1. Additionally, install the `helm` plugins we use:
36+
37+
```shell
38+
make helm-plugins
39+
```
40+
3541
## Quickstart to Skaffold in Minikube
3642

3743
1. Auth with gcloud for the project `computer-vision-team`

Makefile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,34 @@ hooks: ## Install git hooks (pre-commit)
4848
# Install environments for all available hooks now (rather than when they are first executed)
4949
@pre-commit install --install-hooks
5050

51+
helm-plugins-diff: ## Installs the helm diff plugin
52+
@echo "Checking if helm-diff plugin is installed..."
53+
@if helm plugin list | grep -qE '^\s*diff\s'; then \
54+
echo "helm-diff is already installed."; \
55+
else \
56+
echo "Installing helm-diff plugin..."; \
57+
helm plugin install https://github.com/databus23/helm-diff; \
58+
fi
59+
60+
helm-plugins-schema: ## Installs the helm schema plugin
61+
@echo "Checking if helm-schema plugin is installed..."
62+
@if helm plugin list | grep -qE '^\s*schema\s'; then \
63+
echo "helm-schema is already installed."; \
64+
else \
65+
echo "Installing helm-schema plugin..."; \
66+
helm plugin install https://github.com/dadav/helm-schema; \
67+
fi
68+
69+
helm-plugins: helm-plugins-diff helm-plugins-schema ## Install the helm plugins we use
70+
71+
helm-schema: ## Generates the `values.schema.json` using `helm schema`
72+
@helm schema \
73+
--chart-search-root=./helm/fiftyone-teams-app \
74+
--no-dependencies \
75+
--add-schema-reference \
76+
--skip-auto-generation=additionalProperties,required \
77+
--append-newline
78+
5179
pre-commit: ## Run pre-commit against all files
5280
@pre-commit run -a
5381

docker/README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,24 @@ The FiftyOne Enterprise App is exposed on port `3000`.
161161
The FiftyOne Enterprise CAS is exposed on port `3030`.
162162

163163
Configure an SSL endpoint (like a Load Balancer, Nginx Proxy, or similar)
164-
to route traffic to the appropriate endpoints. An example Nginx configuration
165-
for path-based routing can be found
166-
[here](./example-nginx-path-routing.conf).
167-
Example Nginx configurations for hostname-based routing can be found
168-
[here](./example-nginx-site.conf)
169-
for FiftyOne Enterprise App and FiftyOne Enterprise CAS services, and
170-
[here](./example-nginx-api.conf)
171-
for the FiftyOne Enterprise API service.
164+
to route traffic to the appropriate endpoints.
165+
166+
FiftyOne Enterprise can be routed via two main patterns:
167+
168+
1. Path-Based Routing:
169+
In this pattern, all services
170+
(including the FiftyOne Enterprise App, CAS, and API)
171+
are hosted behind a single DNS endpoint.
172+
Voxel51 providdes an
173+
[example nginx configuration](./example-nginx-path-routing.conf)
174+
for this pattern.
175+
176+
1. Hostname-Based Routing:
177+
A pattern where the FiftyOne Enterprise API has a separate DNS
178+
name to separate API traffic from other FiftyOne Enterprise Applications.
179+
Voxel51 provides separate Nginx configurations for:
180+
1. [FiftyOne Enterprise App and FiftyOne Enterprise CAS services](./example-nginx-site.conf)
181+
1. [FiftyOne Enterprise API service](./example-nginx-api.conf).
172182

173183
## Upgrades
174184

@@ -475,7 +485,7 @@ follow
475485
| `FIFTYONE_APP_PRIVACY_URL` | Privacy URL used in App | No |
476486
| `FIFTYONE_APP_IMPRINT_URL` | Imprint URL used in App | No |
477487
| `FIFTYONE_APP_TEAMS_SDK_RECOMMENDED_VERSION` | The recommended fiftyone SDK version. This will be displayed in install modal (i.e. `pip install ... fiftyone==0.11.0`) | No |
478-
| `FIFTYONE_APP_THEME` | The default theme configuration for your FiftyOne Enterprise application as described [here](https://docs.voxel51.com/user_guide/config.html#configuring-the-app) | No |
488+
| `FIFTYONE_APP_THEME` | The default theme configuration for your FiftyOne Enterprise application as described [in our documentation](https://docs.voxel51.com/user_guide/config.html#configuring-the-app) | No |
479489
| `FIFTYONE_APP_DEFAULT_QUERY_PERFORMANCE` | Controls whether Query Performance mode is enabled by default for every dataset for the application. Set to false to set default mode to off. | No |
480490
| `FIFTYONE_APP_ENABLE_QUERY_PERFORMANCE` | Controls whether Query Performance mode is enabled for the application. Set to false to disable Query Performance mode for entire application. | No |
481491
| `FIFTYONE_API_URI` | The URI to be displayed in the `Install FiftyOne` Modal and `API Keys` configuration screens | No |

docker/docs/upgrading.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,7 @@ Additionally,
359359

360360
1. Update your web server routes to include routing
361361
`/cas/*` traffic to the `teams-cas` service.
362-
Example nginx configurations can be found
363-
[here](../)
362+
Please see our [example nginx configurations](../) for more information.
364363
1. [Upgrade to FiftyOne Enterprise v2.10.0](#upgrading-from-previous-versions)
365364
with `FIFTYONE_DATABASE_ADMIN=true`
366365
(this is not the default for this release).

helm/docs/upgrading.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ the
4444
[Helm Chart](https://github.com/voxel51/fiftyone-teams-app-deploy)
4545
and update your deployment accordingly.
4646

47-
A minimal example `values.yaml` may be found
48-
[here](../values.yaml).
47+
Voxel51 provides a
48+
[minimum example `values.yaml`](../values.yaml).
4949

5050
1. Edit the `values.yaml` file
5151
1. To upgrade an existing helm installation

0 commit comments

Comments
 (0)