Skip to content

Commit

Permalink
feat(k8s): add repo parameter to helm module type
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Jul 10, 2018
1 parent 67946eb commit 5d3af14
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/kubernetes/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import { GARDEN_SYSTEM_NAMESPACE } from "./system"

export interface HelmServiceSpec extends ServiceSpec {
chart: string
repo?: string
dependencies: string[]
version?: string
parameters: { [key: string]: Primitive }
Expand All @@ -83,6 +84,8 @@ const helmModuleSpecSchema = Joi.object().keys({
chart: Joi.string()
.required()
.description("A valid Helm chart name or URI."),
repo: Joi.string()
.description("The repository URL to fetch the chart from."),
dependencies: joiArray(joiIdentifier())
.description("List of names of services that should be deployed before this chart."),
version: Joi.string()
Expand Down Expand Up @@ -161,6 +164,9 @@ async function buildModule({ ctx, provider, module, logEntry }: BuildModuleParam
if (config.spec.version) {
fetchArgs.push("--version", config.spec.version)
}
if (config.spec.repo) {
fetchArgs.push("--repo", config.spec.repo)
}
logEntry && logEntry.setState("Fetching chart...")
await helm(provider, ...fetchArgs)

Expand Down

0 comments on commit 5d3af14

Please sign in to comment.