Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tech preview for helm feature #190

Merged
merged 9 commits into from
Aug 28, 2019
14 changes: 6 additions & 8 deletions custom-src/frontend/app/custom/custom.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ import { KubernetesSetupModule } from './kubernetes/kubernetes.setup.module';
import { KubeHealthCheck } from './kubernetes/store/kubernetes.actions';
import { SuseAboutInfoComponent } from './suse-about-info/suse-about-info.component';
import { SuseLoginComponent } from './suse-login/suse-login.component';
// import { HelmModule } from './helm/helm.module';
// import { HelmSetupModule } from './helm/helm.setup.module';
import { HelmModule } from './helm/helm.module';
import { HelmSetupModule } from './helm/helm.setup.module';

const SuseCustomizations: CustomizationsMetadata = {
copyright: '© 2019 SUSE',
hasEula: true,
aboutInfoComponent: SuseAboutInfoComponent
aboutInfoComponent: SuseAboutInfoComponent,
alwaysShowNavForEndpointTypes: (typ) => false,
};

@NgModule({
Expand All @@ -29,11 +30,8 @@ const SuseCustomizations: CustomizationsMetadata = {
SharedModule,
MDAppModule,
KubernetesSetupModule,
// #150 - Uncomment to enable helm plugin
// ---------------------------------------
// HelmModule,
// HelmSetupModule
// ---------------------------------------
HelmModule,
HelmSetupModule
],
declarations: [
SuseLoginComponent,
Expand Down
3 changes: 2 additions & 1 deletion custom-src/frontend/app/custom/helm/helm.store.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const helmEndpointTypes: EndpointTypeExtensionConfig[] = [{
imagePath: '/core/assets/custom/helm.svg',
homeLink: (guid) => ['/monocular/repos', guid],
entitySchemaKeys: monocularEntityKeys,
doesNotSupportConnect: true
doesNotSupportConnect: true,
techPreview: true,
}];

@StratosExtension({
Expand Down
6 changes: 3 additions & 3 deletions src/jetstream/plugins/kubernetes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package kubernetes

import (
"net/url"
"strconv"

"errors"

Expand Down Expand Up @@ -89,15 +90,14 @@ func (c *KubernetesSpecification) Connect(ec echo.Context, cnsiRecord interfaces
// Init the Kubernetes Jetstream plugin
func (c *KubernetesSpecification) Init() error {

// Register all of the providers
c.AddAuthProvider(auth.InitGKEKubeAuth(c.portalProxy))
c.AddAuthProvider(auth.InitAWSKubeAuth(c.portalProxy))
c.AddAuthProvider(auth.InitCertKubeAuth(c.portalProxy))
c.AddAuthProvider(auth.InitAzureKubeAuth(c.portalProxy))
c.AddAuthProvider(auth.InitOIDCKubeAuth(c.portalProxy))
c.AddAuthProvider(auth.InitKubeConfigAuth(c.portalProxy))

c.portalProxy.GetConfig().PluginConfig[kubeDashboardPluginConfigSetting] = "false"
// Kube dashboard is enabled by Tech Preview mode
c.portalProxy.GetConfig().PluginConfig[kubeDashboardPluginConfigSetting] = strconv.FormatBool(c.portalProxy.GetConfig().EnableTechPreview)

return nil
}
Expand Down
18 changes: 9 additions & 9 deletions src/jetstream/plugins/monocular/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ func (m *Monocular) GetChartStore() chartsvc.ChartSvcDatastore {

// Init performs plugin initialization
func (m *Monocular) Init() error {
return errors.New("Manually disabled")

// #150 - Uncomment to enable helm plugin
// ---------------------------------------
// m.ConfigureSQL()
// m.chartSvcRoutes = chartsvc.GetRoutes()
// m.InitSync()
// m.syncOnStartup()
// return nil

if !m.portalProxy.GetConfig().EnableTechPreview {
return errors.New("Feature is in Tech Preview")
}
m.ConfigureSQL()
m.chartSvcRoutes = chartsvc.GetRoutes()
m.InitSync()
m.syncOnStartup()
return nil
}

func (m *Monocular) syncOnStartup() {
Expand Down