mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Allow installing into cluster (#128)
* Dockerize it * Default chart layout * Installable * Starts and loads * Progressing * Hide cluster block * Add scanners * Add icon for helm chart (#130) Co-authored-by: Harshit Mehta <harshitm@nvidia.com> * Image build and push scripts * Build local img * Local img * ci stuff * ci and chart changes * add readme * modify readme * move readme location * update docs and delete file * remove file * allow write actions * allow write actions * update .gitignore * update readme * delete file * add persistence and update documentation * update logo * update volume paths and documentation * change pvc size * Comment Co-authored-by: Harshit Mehta <hdm23061993@gmail.com> Co-authored-by: Harshit Mehta <harshitm@nvidia.com> Co-authored-by: ronahk <rona@komodor.io>
This commit is contained in:
@@ -35,6 +35,7 @@ type StatusInfo struct {
|
||||
Analytics bool
|
||||
LimitedToNamespace string
|
||||
CacheHitRatio float64
|
||||
ClusterMode bool
|
||||
}
|
||||
|
||||
func (d *DataLayer) runCommand(cmd ...string) (string, error) {
|
||||
@@ -74,10 +75,17 @@ func (d *DataLayer) CheckConnectivity() error {
|
||||
}
|
||||
|
||||
if len(contexts) < 1 {
|
||||
return errors.New("did not find any kubectl contexts configured")
|
||||
log.Debugf("Did not find any contexts, will try checking k8s")
|
||||
_, err := d.runCommandKubectl("get", "pods")
|
||||
if err != nil {
|
||||
log.Debugf("The error were: %s", err)
|
||||
return errors.New("did not find any kubectl contexts configured")
|
||||
}
|
||||
log.Infof("Assuming k8s environment")
|
||||
d.StatusInfo.ClusterMode = true
|
||||
}
|
||||
|
||||
_, err = d.runCommandHelm("--help") // no point in doing is, since the default context may be invalid
|
||||
_, err = d.runCommandHelm("--help")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user