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

fix(openfaas): override release name to avoid conflict across namespaces #506

Merged
merged 1 commit into from
Feb 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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