Skip to content

Commit

Permalink
fix(k8s): make sure Helm 3 migration is run for project namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Dec 18, 2019
1 parent 765b324 commit 7040373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions garden-service/src/plugins/kubernetes/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ export async function prepareEnvironment(params: PrepareEnvironmentParams): Prom
const k8sCtx = <KubernetesPluginContext>ctx

// Migrate from Helm 2.x and remove Tiller from project namespace, if necessary
const systemServiceNames = k8sCtx.provider.config._systemServices
const systemNamespace = k8sCtx.provider.config.gardenSystemNamespace

if (systemServiceNames.length === 0 && status.detail.projectTillerInstalled) {
if (k8sCtx.provider.config.namespace !== systemNamespace && status.detail.projectTillerInstalled) {
const api = await KubeApi.factory(log, k8sCtx.provider)
const namespace = await getAppNamespace(ctx, log, k8sCtx.provider)
await migrateToHelm3(k8sCtx, api, namespace, log)
Expand Down

0 comments on commit 7040373

Please sign in to comment.