Commit Graph

100 Commits

Author SHA1 Message Date
LiaoSirui f9af6f9c18 fix(notebook-controller): fix typo (kubeflow/kubeflow#7305)
namesace -> namespace in file components/notebook-controller/controllers/notebook_controller.go
2023-10-26 14:46:10 +00:00
dependabot[bot] 390da620bb build(deps): bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0 in /components/notebook-controller (kubeflow/kubeflow#7256)
Bumps gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0.

---
updated-dependencies:
- dependency-name: gopkg.in/yaml.v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 18:42:29 +00:00
Narayanamurthi Mari b9507167d8 feat(notebooks): propagate annotations from notebook cr to pods (kubeflow/kubeflow#7076)
Co-authored-by: osd530 <narayanamurthi.mari@capitalone.com>
2023-07-31 16:43:28 +00:00
一条肥鱼 07d88db222 fix: deprecation of 'go get' for installing modules (kubeflow/kubeflow#7177)
Co-authored-by: esacif <esacif@gmail.com>
2023-07-20 09:35:25 +00:00
Kimonas Sotirchos 0dc4261955 Fix Python linting (kubeflow/kubeflow#7060)
* gh-action: Workflow for testing python lint

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* lint: Run autopep8 to lint files

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* linting: Manual changes

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

---------

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2023-03-30 09:32:05 +00:00
amitmukati-2604 28778701d9 Adding changes to build nb-controller on pull_request (kubeflow/kubeflow#7054) 2023-03-23 15:28:21 +00:00
dependabot[bot] 89e0b98ac3 build(deps): bump github.com/prometheus/client_golang from 1.11.0 to 1.11.1 in /components/notebook-controller (kubeflow/kubeflow#6955)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.11.0...v1.11.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 13:44:06 +00:00
apoger d2c76a0739 Implement a culling controller for Notebooks (kubeflow/kubeflow#6807)
* Implement a culling controller for notebooks

Changes:

 * Move the idleness/culling logic into a separate controller
   as part of the Notebooks Controller/Operator.

 * Introduce an "notebooks.kubeflow.org/last_activity_check_timestamp".
   annotation in each Notebook CR to keep the timestamp of the last
   performed idleness check

The controller can then compare this timestamp with the current time to
ensure that notebooks will get reconciled every IDLENESS_CHECK_PERIOD
minutes.

The culling-controller will:

* reconcile only notebooks CRs
* set/update culling annotations
  - 'notebooks.kubeflow.org/last_activity'
  - 'notebooks.kubeflow.org/last_activity_check_timestamp'
* perform idleness checks every 'IDLENESS_CHECK_PERIOD' minutes
  and set the 'kubeflow-resource-stopped' annotation, if a notebook
  needs to be culled.

Refs: kubeflow/kubeflow#6767

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* review: Remove culling annotations when Pod is not found

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* review: Improve logs

Add a log message at the beginning of the reconciliation loop
to make it clear that a Reconcile was called for a notebook.

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* Run the controller locally

* Introduce make rule for running the controller locally with
  culling enabled

* Introduce a dev_culling_authorization_policy which must be
  applied when testing the culling-controller locally

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* Update README instructions

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>
2023-01-26 13:32:10 +00:00
apoger 6b3fd05ea2 Update KF manifests and gh-action workflows to use the tag=`latest` (kubeflow/kubeflow#6854)
Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

review changes

* build images with the latest tag only when a PR
  is merged to master branch

* revert changes  in manifests/workflows for the
  notebook-server images

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>
2022-12-20 15:59:18 +00:00
apoger 54ab6a815e Fix workflows for publishing images only when PR is merged (kubeflow/kubeflow#6842)
* Fix docker-publish workflows

* Remove workflow that builds/push all images

* Remove redundant files from manifests
2022-12-15 09:51:21 +00:00
apoger 0e3834305f notebook-controller: Extend tests for using images of each PR (kubeflow/kubeflow#6830)
* Introduce intergration test workflow for notebook-controller

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* Publish Docker image only when PR is merged

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* Remove kind & manifest gh-action workflows

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* Update tag in manifests to v1.6.0

This change is required as images with v1.5.0 do not
exist in Dockerhub.

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>
2022-12-12 14:16:28 +00:00
apoger 10e0e93085 Cherry-pick commits for using DockerHub for all images (kubeflow/kubeflow#6825)
cherry-picking: #6548
* Update all images to use DockerHub
* Update releasing script for dockerhub

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Cherry-picked-by: Apostolos Gerakaris <apoger@arrikto.com>

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Co-authored-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-12-08 15:37:10 +00:00
adilhusain-s b7fa846b03 Adding multi-arch support for linux-ppc64le in CI for notebook-controller (kubeflow/kubeflow#6771) 2022-12-02 13:32:17 +00:00
apoger 46f14d4e97 Use K8s 1.25 for the tests (kubeflow/kubeflow#6751)
* kind: Introduce config file for 1.25

* Add a new KinD configuration file for testing with K8s 1.25.3
* Install kind v0.17.0 for testing with K8s 1.25.3

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* gh-actions: Use 1.25 for testing

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* testing: Install Istio 1.16 for testing

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* Test commit for enabling the tests

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

* notebook-controller: Fix Makefile

Remove the test rule as a prerequisite for running docker-build

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>
2022-11-24 08:30:10 +00:00
Pranav Pandit d83d55a892 updated compatible base images & removed arch dependencies in different components for multiple arch support (kubeflow/kubeflow#6650)
* updated base images in Volume Web component for multiple arch

* updated base images in Tensorboard Web component for multiple arch

* updated base images in Jupyter Web component for multiple arch

* updated admission webhook component for multiple arch

* removed goarch depedency for multiarch building

* removed goarch depedency for multiarch building in admission webhook component

* removed goarch depedency & added powerPC case for multiarch building in access-management component

* removed goarch depedency for multiarch building in tensorboard controller

* removed goarch depedency for multiarch building in notebook Controller

* Removing empty computation to resolve future build issues
2022-11-23 13:42:42 +00:00
jsitu777 3049459c18 change pull policy from always to ifNotPresent (kubeflow/kubeflow#6724) 2022-11-09 10:52:40 +00:00
Mathew Wicks 803c02a48f add manifest parameters for notebook culling (kubeflow/kubeflow#6689) 2022-11-08 06:38:38 +00:00
apoger b46583df63 Fix notebook culling (kubeflow/kubeflow#6659)
The notebook controller writes the last-activity annotation
before culling the Notebook, however, doesn't remove this
annotation before start. This causes the Notebook to be culled
again before is has a chance to start.

Fix:
* calculate correctly the podFound variable and ensure its value
  its true only if the Pod is actually found. This way the culling
  annotation will be removed when there is no Pod.

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>

Signed-off-by: Apostolos Gerakaris <apoger@arrikto.com>
2022-09-22 14:07:38 +00:00
apoger 02e2fa4c65 Fix #6056: Update Notebook status properly (kubeflow/kubeflow#6628)
* Fix #6056: Update Notebook status properly

Signed-off-by: Apostolos Gerakaris apoger@arrikto.com

* Added suggested code changes

Signed-off-by: Apostolos Gerakaris apoger@arrikto.com

* notebook-controller: Add unit tests

*Introduce basic unit tests for "createNotebookStatus" function
*Add GH action for unit tests

Signed-off-by: Apostolos Gerakaris apoger@arrikto.com

* Fix PodCoditionsMirroringToNotebook & Unit-tests

We encountered an error during testing. It seems that
the pod.status.conditions.condition.LastProbeTime remains
always null and so the controller ends up applying a Notebook
CR instance with null condition values.

Relevant Issues:
*https://github.com/kubernetes/kubernetes/issues/109958
*https://github.com/kubernetes/kubernetes/issues/79402
*https://github.com/kubernetes/kubernetes/issues/14393

Fix: Check if the Pod's condition.LastProbeTime
and condition.LastTransitionTime timestamp fields are null.
If so, initialize them so we dont end up applying
a Notebook instance with null condition values.

Other changes:
*Fix basic unit tests
*Introduced a unit test for the case where Notebook's Pod
 is unschedulable

Signed-off-by: Apostolos Gerakaris apoger@arrikto.com

Signed-off-by: Apostolos Gerakaris apoger@arrikto.com
2022-08-30 13:47:55 +00:00
Midhun Nair 40ef0ffe74 Fix #6528: Mirroring Pod conditions to Notebook (kubeflow/kubeflow#6619)
* Fix #6528: Mirroring Pod conditions to Notebook

* Added missing fields which are part of PodConditions into NotebookConditions

* Added suggested changes
2022-08-26 10:25:49 +00:00
mofanke 79df9e86b2 notebooks: Fix notebook endless restarts (kubeflow/kubeflow#6337) (kubeflow/kubeflow#6603) 2022-07-28 15:33:54 +00:00
Hyunwoo Kim 958df81ff7 Fix typo in notebook_controller.go (kubeflow/kubeflow#6577) 2022-07-18 18:37:08 +00:00
apoger 939e1e22ca Introduce a mechanism to build all Kubeflow images (kubeflow/kubeflow#6555)
* build: Update components makefiles for building

We'll create a top-level Makefile under components/ dir
that has the following rules:

* build-all:
  To build all images locally

* push-all:
  * We can use a specific REGISTRY and retag the images
  * Push all the images

This top-level Makefile will run the sub-Makefiles that every
component has for building and pushing the images.

We modified every sub-Makefile as follows:
* We don't use a registry in images by default
* Removed unused rules and vars
* Use the --dirty flag of git describe in TAG

        --dirty[=<mark>]
               Describe the working tree. It means describe HEAD and
               appends <mark> (-dirty by default) if the working tree
               is dirty.

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Create makefiles for notebook servers

The common starting point of building the notebook-server
images are the following 4 *base* images:
- base
- codeserver
- jupyter
- rstudio

All other server images need to build on top of them. We'll
dynamically pass the base images in every Dockerfile by
using an ARG IMG. We can set the value of this ARG during
docker build with the --build-arg CLI argument.

This way we build both the base images with a tag locally,
and then we pass that image as arg via the Makefile and build the rest

So we modified our building procedure as follows:
1. Build the base image since everything starts from there

2. Pass the base image as an ARG in the Dockerfiles of
jupyter, codeserver, rstudio images and build on top

3. Pass the base images in all other server images and build
on top

For that we will:

1. Create a Makefile for each of the notebook servers, in each folder
   a. Each makefile will be responsible for building the bases and use args for passing them on

2. Use the central Makefile to call each Makefile from above

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* cherry-pick: Notebook server upstream fixes

Relevant upstream PR: https://github.com/kubeflow/kubeflow/pull/6466/files

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Fix Makefiles

- Remove build-gcp and build-gcr rules as we don't use them anywhere in
the project
- Fix code conficts

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Fix Dockerfiles for notbook-server images

We remove the previous logic of using already built images as bases.
The users must use only the Makefiles to pass the appropriate BASE_IMG
and build the images correctly.

Thus, we have Makefiles everywhere that:

- Can build any base image
- If an image requires another notebook base, then we first build that one using its makefile,
  and then use it as docker ARG for building the next one

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Fix notebook-controller Makefile

Removed a misplaced "|" char that breaks the Makefile

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Update GH action workflows

* Update workflow for notebook-server images:
  - Add a step for building all images by using the
  central-Makefile under components/example-notebook-servers/ dir.
  - Add a step for pushing all images by using the
  central-Makefile under components/example-notebook-servers/ dir.

* Update workflow for all Kubeflow images:
  - Add a step for building & pushing all images by using the
  top-level Makefile under components/ dir.

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Remove completely ECR references from images

Replace everywhere the "public.ecr.aws/j1r0q0g6/notebooks/notebook-servers"
prefix with "kubeflownotebookswg"

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Fix GH actions for Kubeflow components

Fix GH actions to use the updated make rules
when building the Kubeflow component images.

Remove the "docker.io" prefix when building with
GH action workflows

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>
2022-07-01 17:54:06 +00:00
Jeongwook Park bba1bf22ee notebooks: Allow notebook controller to patch events (kubeflow/kubeflow#6523) 2022-06-20 12:25:37 +00:00
mofanke f41667515e notebooks: notebook controller config RESTClient QPS and Burst in com… (kubeflow/kubeflow#6453) 2022-05-13 18:52:35 +00:00
Samu 0215857aa9 Support K8s 1.22 in notebook controller (kubeflow/kubeflow#6374)
Fix https://github.com/kubeflow/kubeflow/issues/6366

Migrating to Kubebuilder v3 leads to the following changes:
- Add .dockerignore file.
- Upgrade Go version from v1.15 to v1.17.
- Adapt Makefile.
- Add image (build + push) target to makefile.
- Upgrade EnvTest to use K8s v1.22.
- Update PROJECT template.
- Migrate CRD apiVersion from v1beta to v1.
- Add livenessProbe and readinessProbe to controller manager.
- Upgrade controller-runtime from v0.2.0 to v0.11.0.

Other changes:
- Build image using public.ecr.aws registry instead of gcr.io.
- Update README.md documentation.
- Update 3rd party licences.
- Fix notebook.spec description.
- Add 3 sample notebooks (v1, v1alpha1 and v1beta1).

Signed-off-by: Samuel Veloso <svelosol@redhat.com>
2022-05-03 15:49:01 +00:00
Kimonas Sotirchos a61650ee88 release: Images for the 1.5.0 tag (kubeflow/kubeflow#6398)
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-03-09 22:37:11 +00:00
Kimonas Sotirchos 9ba5be1c1c releasing: Create v1.5.0-rc.2 images (kubeflow/kubeflow#6394)
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-03-04 17:55:59 +00:00
Kimonas Sotirchos 5530e00467 notebooks: Don't reconcile on Events deletion (kubeflow/kubeflow#6391)
The controller should not trigger the reconcile loop when an Event is
deleted. Previously the controller would run the reconciliation loop on
any event deletion.

This commit updates it to not run the loop for ANY event.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-03-04 17:09:59 +00:00
Kimonas Sotirchos fff5155e1e releasing: Update tags for v1.5.0-rc.1 (kubeflow/kubeflow#6343)
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-02-10 18:57:15 +00:00
Kimonas Sotirchos 1d24b75f57 notebooks: Fix endless restarts (kubeflow/kubeflow#6341)
* notebooks: Update notebook if timestamp changed

We don't want to be updating the spec of the notebook if the timestamp
hasn't changed, since this will lead to constant updates and
reconciliation loops.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* notebooks: Use a deep-copy of the notebook spec

The controller should use a deep-copy of the notebook spec when
calculating the spec for the StatefulSet. If not then we could
update the notebook object without wanting it, since the spec could have
been changed when calculating the STS spec.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* notebooks: Add prefix env var only if missing

The controller should be setting OR updating the NB_PREFIX env var.
Previously it would always blindly append it to the spec, which could
result in double entries for the same env var.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-02-09 17:32:07 +00:00
Kimonas Sotirchos 9510a2b913 notebooks: Graceful handling of events (kubeflow/kubeflow#6338)
* notebooks: Handle events gracefully

The controller is not exiting the reconciliation loop after it has
re-emitted a Pod/STS Event as a Notebook Event. This results in the
controller to later on try and GET a Notebook with the name of the Event
that triggered the reconciliation loop.

The controller should exit the reconciliation function once it has
emitted the event.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* notebooks: Don't reconcile on deleted events

We don't want to trigger the reconciliation function when an event gets
deleted.

If a Notebook would be deleted then the underlying events would
be deleted as well, which results in the reconcile function to get
triggered and try to GET Events and Notebooks with the name of the
deleted event.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-02-09 15:01:07 +00:00
Athanasios Markou fbf5110f01 notebooks: Extend Notebook Controller to expose idleness for Jupyter (kubeflow/kubeflow#6297)
* notebooks: Update image's tag in make

Modify Makefile to update properly the TAG
based on the git TAG.

Signed-off-by: Athanasios Markou <athamark@arrikto.com>
Reviewed-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* notebooks: Expose last-activity

Extend the notebook-controller to:
* cull idle Notebook Servers based on their new `last-activity`
  annotation
* expose the last activity of each Notebook Server as an annotation
  on the metadata of the corresponding CR object

Modify notebook_controller.go to:
* update the Last Activity of each Notebook Server that has a
  Running pod
* delete the Last Activity Annotation for every Notebook Server
  that does not have a Running pod

Extend culler.go to:
* perform culling based on the new `last-activity` annotation and
  not based on the `/api/status` endpoint.
* update the last activity of a Notebook Server, based on the
  kernels' execution states.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Athanasios Markou <athamark@arrikto.com>

* notebooks: Introduce a DEV env var

We introduce a DEV ENV var to allow admins
develop and test on their local machine their
custom Notebook Controller.
We provide information and instructions inside
the components/notebook-controller/README.md.

Signed-off-by: Athanasios Markou <athamark@arrikto.com>
Reviewed-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* notebooks: Add unit tests for last-activity

* Introduce new tests for allKernelsAreIdle()
* Extend the tests for NotebookIsIdle() and for
  NotebookNeedsCulling().

Signed-off-by: Athanasios Markou <athamark@arrikto.com>
Reviewed-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* review: UpdateNotebookLastActivityAnnotation()

Ensure that UpdateNotebookLastActivityAnnotation() does not return
"true". This function should not return any value.

Signed-off-by: Athanasios Markou <athamark@arrikto.com>
2022-02-07 15:19:17 +00:00
Kimonas Sotirchos 64903665dc Update images for the 1.5 rc0 release (kubeflow/kubeflow#6319)
* Update the releasing version tag

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* Run automated script for updating versions

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-01-27 14:16:10 +00:00
Tobia De Koninck b223e29a9d fix(notebooks) make culling work with multi-user (kubeflow/kubeflow#5128) (kubeflow/kubeflow#5980) 2022-01-21 11:25:19 +00:00
Abe Sharp 5e960331fd Remove virtualservice timeout to prevent websocket disconnect (kubeflow/kubeflow#6126)
In the existing version, the 'timeout: 300s' added to the notebook's virtual service would cause websockets to disconnect at the 5 minute mark, causing the Jupyter Notebook web terminal function to hang. This is described in https://github.com/kubeflow/kubeflow/issues/6124.
2021-09-09 03:07:01 -07:00
Filinto Duran 5ae1de4dcc Correct missing predicates in controller watches. Fixes #5326 (kubeflow/kubeflow#5873)
Co-authored-by: Filinto Duran <fduran@d2iq.com>
2021-08-11 09:17:26 -07:00
DavidSpek 4842c53f7a Update manifests to use ECR and fix fieldPath in kustomization files (kubeflow/kubeflow#5765)
* Update manifests to use ECR and latest image tags

* remove duplicate value in central-dashboard kustomization.yaml
2021-03-24 07:35:45 -07:00
Yannis Zarkadas 22e4cecf56 fix notebook controller manifests (kubeflow/kubeflow#5729)
* notebook-controller: Remove manager from gitignore

Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>

* notebook-controller: Add missing manifests

Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
2021-03-19 16:09:17 -07:00
Yannis Zarkadas ae3b53f8d2 Notebook Controller: Consolidate manifests (kubeflow/kubeflow#5723)
* notebook-controller: Modify kubebuilder manifests

Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>

* notebook-controller: Set storageVersion to v1

Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>

* notebook-controller: Fix RBAC

Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>

* notebook-controller: Regenerate manifests

Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>

* notebook-controller: Remove unused kubebuilder manifests

Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
2021-03-19 10:22:16 -07:00
DavidSpek a1e52c2b9e (Notebook-controller): Add `http-rewrite-uri` and `http-headers-request-set` annotations (kubeflow/kubeflow#5660)
Co-authored-by: Mathew Wicks <thesuperzapper@users.noreply.github.com>
2021-03-12 04:14:24 -08:00
Yannis Zarkadas 3f94f691c3 Notebook Controller: Move manifests development upstream (kubeflow/kubeflow#5608)
As part of the work of wg-manifests for 1.3
(https://github.com/kubeflow/manifests/issues/1735), we are moving manifests
development in upstream repos. This gives the application developers full
ownership of their manifests, tracked in a single place.

This commit copies the manifests for application `Notebook Controller`
from path `apps/jupyter/notebook-controller/upstream` of kubeflow/manifests to path
`components/notebook-controller/config` of the upstream repo (https://github.com/kubeflow/kubeflow).

Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
2021-02-17 18:24:51 -08:00
Naveen e2555c4797 Upgrading the `go` compiler version. (kubeflow/kubeflow#5394)
Upgrade go version of the notebook-controller to 1.15, across the
Dockerfile, Makefile and README. We used the same Golang version as our Kubernetes
dependency, after @Jeffwan's suggestion.
2021-01-12 04:10:25 -08:00
gilbeckers 82c04b3be1 Correct ContainerStatus of Notebook CR (kubeflow/kubeflow#5314)
* Correct ContainerStatus of Notebook CR

The Notebook Controller doesn't set the State of the CR correctly. In some cases
the first container is the istio-sidecar which results in an incorrect state being
shown to the Notebook CR. This is fix now by showing the Notebook container
ContainerState to the Notebook CR ContainerState

* Changed log statement and added a comment
Implemented remarks of @yanniszark and @kimwnasptd

* Small reorganization of some if statements
2021-01-04 01:27:55 -08:00
Josh Risley fa5d1e7f9c Use valid commit for kubeflow/components/common module. (kubeflow/kubeflow#5309)
We use the local `../common` module to build `notebook-controller`. We
also need to specify a valid pseudo-version for `common` to support
importing the Notebook API in other modules. This is because according
to the `go.mod` docs [1]:

> exclude and replace directives only operate on the current (“main”)
> module. exclude and replace directives in modules other than the main
> module are ignored when building the main module.

If we don't replace the default "zero version" for `common` that is
generated in our require directive, then then builds fail for modules
that require the Notebook API. They will encounter an an "invalid
version" error for `common` at commit hash "000000000000".

[1]: https://github.com/golang/go/wiki/Modules#gomod
2020-12-01 12:24:52 -08:00
Naveen bc8df5407e Implemented functional tests using ginkgo for notebook controller (kubeflow/kubeflow#5378)
* Implemented functional tests using ginkgo

The notebook controller can be tested using sigs.k8s.io/controller-runtime/pkg/envtest which comes as part of kubebuilder. With this we should be able to measurable test coverage.

* Fixed the incorrect test condition and included fix to download the envtest binaries.

Fixed the incorrect test condition and included fix to download the envtest binaries.

* Some tweaks based on review.

* Removed the check-license as it was blocking the test.
Included some of the tweaked yaml's files that were being generated.
2020-11-11 05:57:49 -08:00
Naveen a75404d6d8 Included the instructions to contribute notebook-controller. (kubeflow/kubeflow#5383)
* Instructions to contribute.

* Update based on feedback.
2020-11-09 01:52:25 -08:00
Naveen 396ace7a83 Fixes the default leader election ID (kubeflow/kubeflow#5374)
The default leader election  ID is controller-leader-election-helper which could conflict when multiple controllers run within the same namespace. This is a required field in later versions of controller-runtime.
2020-11-02 23:22:17 -08:00
Mathew Wicks e9bbe43418 Add thesuperzapper to notebook OWNERS (kubeflow/kubeflow#5363) 2020-10-27 08:24:00 -07:00
MartinForReal 97a8be52a4 Add MartinForReal as reviewer (kubeflow/kubeflow#5241)
Add MartinForReal as reviewer
2020-09-06 19:27:41 -07:00