Skip to content

helm: add Kubeflow Notebooks chart - #3525

Open
danish9039 wants to merge 15 commits into
kubeflow:masterfrom
danish9039:gsoc/kubeflow-notebooks-chart
Open

helm: add Kubeflow Notebooks chart#3525
danish9039 wants to merge 15 commits into
kubeflow:masterfrom
danish9039:gsoc/kubeflow-notebooks-chart

Conversation

@danish9039

@danish9039 danish9039 commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary of Changes

Adds the Kubeflow Notebooks v1 Helm wrapper chart as a co-located application chart under applications/notebooks-v1/helm.

This PR keeps the first reviewable slice focused on Kustomize parity for the customer-facing Notebooks platform install path. It retains the platform scenario, which maps to applications/notebooks-v1/overlays/istio, and does not introduce standalone, split-component, or broad customization modes in this initial chart PR.

The PR also updates Helm/Kustomize comparison wiring to the new chart path, uses Helm 4 in the comparison workflow, and extends scripts/synchronize-notebooks-v1-manifests.sh so future Notebooks upstream synchronizations refresh the Helm chart appVersion and regenerate the payloads.

Payloads are read, not evaluated

The synchronization script previously wrote the Kustomize build directly into applications/notebooks-v1/helm/templates/platform.yaml. Everything under templates/ is evaluated by the Helm template engine, so a Go template delimiter in an upstream manifest was interpreted rather than emitted. A ConfigMap value of "{{ .Values.notebookName }}-workspace" rendered as "-workspace", silently and with exit code 0. That held only because upstream currently ships no such delimiter, and the Notebook Controller exists to template pod specifications.

The generator now writes manifests/platform-crds.yaml and manifests/platform-resources.yaml, which two small templates load with .Files.Get. Helm does not send that content through the renderer, so upstream delimiters survive verbatim. The 15850-line template becomes six lines. render_kustomize_helm_template is removed from scripts/library.sh; it was the function that wrote into templates/ and nothing else used it.

Also in this pull request: a namespace guard, a customResourceDefinitions.enabled contract, helm lint and parity validation before the synchronization script commits, a blocking Notebooks comparison job, and a correction to the comparison namespace, which named kubeflow-system while every resource declares kubeflow.

The chart is placed under applications/notebooks-v1/helm because Notebooks v1 is an official application component, and this is the application-side equivalent of placing common wrappers under common/<component>/helm. The sync script owns applications/notebooks-v1/upstream, while the Helm chart lives as a sibling under applications/notebooks-v1/helm.

CI Note

This PR includes a focused update to tests/notebooks_install.sh because the Notebooks runtime jobs triggered by this PR were timing out while waiting for the existing Kustomize jupyter-web-app-deployment. The change only increases the rollout wait and adds diagnostics; it does not change manifests, Helm templates, chart values, or user-facing behavior.

Dependencies

Conceptually follows the foundation, wrapper, and Dashboard chart PRs for runtime installation order:

This pull request depends on #3524. Both add scripts/helm_manifest_generator.py, the shared generation engine, so that Notebooks reuses it rather than carrying a second copy. Whichever merges first, the other will be rebased onto it and the duplicate file resolved. Nothing else is shared.

Related Issues

Part of the Project 5 Helm chart work.

Contributor Checklist

  • I have tested these changes with kustomize. See Installation Prerequisites.
  • All commits are signed-off to satisfy the DCO check.
  • I have considered adding my company to the adopters page to support Kubeflow and help the community, since I expect help from the community for my issue (see 1. and 2.).

Synchronization Flow

The synchronization script refreshes six upstream components and atomically regenerates the complete platform template from the customer-facing Kustomize overlay.

flowchart LR
    A["Six upstream Notebook<br/>components"] --> B["Kustomize<br/>platform overlay"]
    B --> C["One complete<br/>Kustomize build"]
    C --> D["Shared helper writes<br/>platform.yaml atomically"]
    D --> E["Helm platform scenario"]
    E --> F["Helm/Kustomize<br/>parity validation"]
Loading

Relevant File Structure

applications/notebooks-v1/
├── upstream/jupyter-web-app/
├── upstream/volumes-web-app/
├── upstream/tensorboards-web-app/
├── upstream/notebook-controller/
├── upstream/tensorboard-controller/
├── upstream/pvcviewer-controller/
├── overlays/istio/
└── helm/
    ├── kustomize/kustomization.yaml
    ├── templates/platform.yaml
    ├── templates/validate.yaml
    ├── ci/values-platform.yaml
    ├── Chart.yaml
    ├── values.yaml
    └── README.md

Installation, supported scenarios, and chart configuration are documented in applications/notebooks-v1/helm/README.md.

Validation

helm lint applications/notebooks-v1/helm
./tests/helm_kustomize_compare.sh kubeflow-notebooks platform
./tests/helm_kustomize_compare_all.sh kubeflow-notebooks
bash -n scripts/synchronize-notebooks-v1-manifests.sh tests/helm_kustomize_compare.sh tests/helm_kustomize_compare_all.sh
python3 -m py_compile tests/helm_kustomize_compare.py
git diff --check

Also verified with temporary Helm v4.2.2:

helm lint applications/notebooks-v1/helm
./tests/helm_kustomize_compare_all.sh kubeflow-notebooks

Copilot AI review requested due to automatic review settings July 2, 2026 22:49
@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign juliusvonkohout for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Welcome to the Kubeflow Community Distribution Repository

Thanks for opening your first PR. Your contribution means a lot to the Kubeflow community.

Before making more PRs:
Please ensure your PR follows our Contributing Guide.
Please also be aware that many components are synchronized from upstream via the scripts in /scripts.
So in some cases you have to fix the problem in the upstream repositories first, but you can use a PR against kubeflow/community-distribution to test the platform integration.

Community Resources:

Thanks again for helping to improve Kubeflow.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a co-located Helm wrapper chart for Kubeflow Notebooks v1 under applications/notebooks-v1/helm, and wires it into the existing Helm/Kustomize render-parity comparison and synchronization workflow so future upstream refreshes also regenerate the chart payload.

Changes:

  • Introduce kubeflow-notebooks Helm wrapper chart (static Kustomize-parity “platform” scenario).
  • Extend Helm/Kustomize comparison scripts to include the new kubeflow-notebooks component/scenario.
  • Update the Notebooks v1 synchronization script and CI workflow to keep the chart’s appVersion and rendered platform template refreshed (and to install Helm v4.2.2 for the comparison job).

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
applications/notebooks-v1/helm/Chart.yaml New chart metadata for kubeflow-notebooks.
applications/notebooks-v1/helm/README.md Installation and parity-comparison instructions for the new chart.
applications/notebooks-v1/helm/values.yaml Default values, including the scenario switch.
applications/notebooks-v1/helm/ci/values-platform.yaml CI fixture values for the platform scenario.
applications/notebooks-v1/helm/templates/platform.yaml Generated static template containing the platform render payload.
applications/notebooks-v1/helm/templates/validate.yaml Scenario validation guardrail for supported values.
tests/helm_kustomize_compare.sh Adds kubeflow-notebooks wiring (chart path, kustomize overlay, values, namespace).
tests/helm_kustomize_compare_all.sh Adds kubeflow-notebooks to the “all components” scenario matrix and help text.
tests/helm_kustomize_compare.py Allows kubeflow-notebooks as a recognized component in the comparison tool.
scripts/synchronize-notebooks-v1-manifests.sh Extends sync to also update chart appVersion and regenerate templates/platform.yaml.
.github/workflows/helm-kustomize-comparison.yml Triggers on Notebooks changes and installs Helm v4.2.2 for parity checks.

Comment thread tests/helm_kustomize_compare.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Comment thread scripts/synchronize-notebooks-v1-manifests.sh Outdated
@danish9039
danish9039 force-pushed the gsoc/kubeflow-notebooks-chart branch 3 times, most recently from 1447480 to 20f8f1d Compare July 11, 2026 16:02
@danish9039
danish9039 marked this pull request as ready for review July 11, 2026 16:53
@google-oss-prow
google-oss-prow Bot requested a review from kimwnasptd July 11, 2026 16:53
Comment on lines +14 to +21
wait_for_notebooks_deployment() {
local deployment_name="$1"

if ! kubectl -n kubeflow rollout status "deployment/${deployment_name}" --timeout=180s; then
dump_notebooks_state "${deployment_name}"
exit 1
fi
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revet back to the original 60 seconds

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping 180s for now because the 60s rollout wait was flaky in hosted CI.

Comment thread tests/helm_kustomize_compare_all.sh Outdated
Comment thread scripts/synchronize-notebooks-v1-manifests.sh

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Comment thread tests/helm_kustomize_compare.sh Outdated
@danish9039
danish9039 force-pushed the gsoc/kubeflow-notebooks-chart branch from 8b7e89d to 13ae0cb Compare July 17, 2026 12:27
@juliusvonkohout
juliusvonkohout requested a review from Copilot July 17, 2026 12:38

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this named platform ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the consolidated platform scenario output containing all Notebook CRDs and workloads from the Kustomize overlay.

@juliusvonkohout juliusvonkohout Jul 17, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it have the same structure as kustomize? will it be automatically kept up to date on each release ? because to me it does not look easy to maintain

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think 10 releases into the future

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The synchronization is automatic today, and I will apply the Dashboard split-payload generator pattern here so the chart remains reviewable across releases.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.

Comment thread scripts/library.sh Outdated
@danish9039
danish9039 force-pushed the gsoc/kubeflow-notebooks-chart branch from 2ab0d2c to 7e062a7 Compare July 19, 2026 03:48
@danish9039

Copy link
Copy Markdown
Member Author

/retest

@danish9039
danish9039 force-pushed the gsoc/kubeflow-notebooks-chart branch 4 times, most recently from 10cf9a6 to fb5dbe7 Compare July 21, 2026 05:39
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
@danish9039
danish9039 force-pushed the gsoc/kubeflow-notebooks-chart branch from f953b27 to a8c703c Compare July 23, 2026 13:44
The synchronization script wrote the Kustomize build straight into
templates/platform.yaml. Everything under templates/ is evaluated by the Helm
template engine, so any Go template delimiter in an upstream manifest was
interpreted rather than emitted: a ConfigMap value of
"{{ .Values.notebookName }}-workspace" rendered as "-workspace", silently and
with exit code 0. It worked only because upstream currently ships no such
delimiter, and the Notebook Controller exists to template pod specifications.

Generate manifests/platform-crds.yaml and manifests/platform-resources.yaml and
load them with .Files.Get, which Helm does not send through the renderer. The
15850-line template becomes six lines.

Reuse the shared engine rather than copying it. Add the namespace guard, the
custom resource definition toggle, and lint plus parity validation before the
synchronization script commits.

Remove render_kustomize_helm_template from library.sh; it was the function that
wrote into templates/ and nothing else used it.

Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
The Notebooks comparison only reached the all-scenarios job, which carries
continue-on-error, so a parity regression could not fail the build.

Correct the comparison namespace, which named kubeflow-system while every
resource declares kubeflow, and add chart behaviour tests including a regression
for the upstream delimiter that previously rendered as an empty string.

Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Record the required namespace, the custom resource definition deviation and why
--skip-crds does not apply, that Kustomize-declared values are not exposed yet,
and that a clean regeneration proves determinism rather than correctness.

Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
The Notebooks synchronization script runs helm lint and the Helm/Kustomize parity
comparison before committing. The comparison imports PyYAML, which this job did
not install, so it failed with ModuleNotFoundError.

helm lint had been resolving from the runner image at whatever version it ships,
the same class of problem as an inert version pin. Install Helm 4.2.2 explicitly.

Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants