This is an automated email from the ASF dual-hosted git repository.
kaihsun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new b4de7ea SUBMARINE-811. Install local notebook-controller chart via
helm golang API
b4de7ea is described below
commit b4de7ea8ac0f574bc391b2476cd38dd9e9df7bb3
Author: Chi-Sheng Liu <[email protected]>
AuthorDate: Mon May 3 19:38:10 2021 +0800
SUBMARINE-811. Install local notebook-controller chart via helm golang API
### What is this PR for?
Install local notebook-controller chart via Helm golang API.
notebook-controller chart:
https://github.com/apache/submarine/tree/master/helm-charts/submarine/charts/notebook-controller
Helm golang API:
https://github.com/apache/submarine/blob/master/submarine-cloud-v2/pkg/helm/helm.go
### What type of PR is it?
[Feature]
### Todos
### What is the Jira issue?
https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-811
### How should this be tested?
https://travis-ci.org/github/MortalHappiness/submarine/builds/769140540
### Screenshots (if appropriate)
Helm install

In-cluster operator


### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
---
.../examples/submarine-operator-service-account.yaml | 6 ++++++
submarine-cloud-v2/controller.go | 11 +++++++++++
2 files changed, 17 insertions(+)
diff --git
a/submarine-cloud-v2/artifacts/examples/submarine-operator-service-account.yaml
b/submarine-cloud-v2/artifacts/examples/submarine-operator-service-account.yaml
index 08d047e..0083d4a 100644
---
a/submarine-cloud-v2/artifacts/examples/submarine-operator-service-account.yaml
+++
b/submarine-cloud-v2/artifacts/examples/submarine-operator-service-account.yaml
@@ -39,6 +39,12 @@ rules:
verbs:
- "*"
- apiGroups:
+ - kubeflow.org
+ resources:
+ - notebooks
+ verbs:
+ - "*"
+ - apiGroups:
- ""
resources:
- pods
diff --git a/submarine-cloud-v2/controller.go b/submarine-cloud-v2/controller.go
index 96fdac2..1af3a8a 100644
--- a/submarine-cloud-v2/controller.go
+++ b/submarine-cloud-v2/controller.go
@@ -725,6 +725,17 @@ func (c *Controller) newSubCharts(namespace string) error {
)
}
+ if !helm.CheckRelease("notebook-controller", namespace) {
+ klog.Info("[Helm] Install Notebook-Controller")
+ helm.HelmInstallLocalChart(
+ "notebook-controller",
+ "charts/notebook-controller",
+ "notebook-controller",
+ namespace,
+ map[string]string{},
+ )
+ }
+
// TODO: maintain "error"
// TODO: (sample-controller) controller.go:287 ~ 293
// TODO: port-forward
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]