Skip to content

Commit

Permalink
fix(openfaas): override release name to avoid conflict across namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Feb 1, 2019
1 parent eb76d00 commit 2eea9bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions garden-service/src/plugins/kubernetes/helm/tiller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ export async function checkTillerStatus(ctx: PluginContext, provider: Kubernetes
}

export async function installTiller(ctx: PluginContext, provider: KubernetesProvider, log: LogEntry) {
const namespace = await getAppNamespace(ctx, provider)
const context = provider.config.context

const entry = log.info({
section: "tiller",
msg: "Installing...",
msg: `Installing to ${namespace}...`,
status: "active",
})

const namespace = await getAppNamespace(ctx, provider)
const context = provider.config.context

// Need to install the RBAC stuff ahead of Tiller
const roleResources = getRoleResources(namespace)
await applyMany(context, roleResources, { namespace })
Expand Down
3 changes: 3 additions & 0 deletions garden-service/src/plugins/openfaas/openfaas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ export async function getOpenFaasGarden(ctx: PluginContext): Promise<Garden> {
variables: {
"function-namespace": functionNamespace,
"gateway-hostname": hostname,
// Need to scope the release name, because the OpenFaaS Helm chart installs some cluster-wide resources
// that could conflict across projects/users.
"release-name": `${functionNamespace}--openfaas`,
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ module:
type: helm
repo: https://openfaas.github.io/faas-netes/
chart: openfaas
version: 1.2.3
version: 1.7.0
releaseName: ${variables.release-name}
values:
exposeServices: false
functionNamespace: ${variables.function-namespace}
Expand Down

0 comments on commit 2eea9bd

Please sign in to comment.