-
Notifications
You must be signed in to change notification settings - Fork 273
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
feat(helm): add valueFiles field to specify custom value files #1099
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ import { | |
import { Module, FileCopySpec } from "../../../types/module" | ||
import { containsSource, getReleaseName } from "./common" | ||
import { ConfigurationError } from "../../../exceptions" | ||
import { deline } from "../../../util/string" | ||
import { deline, dedent } from "../../../util/string" | ||
import { HotReloadableKind, hotReloadableKinds } from "../hot-reload" | ||
import { BaseTestSpec, baseTestSpecSchema } from "../../../config/test" | ||
import { BaseTaskSpec, baseTaskSpecSchema } from "../../../config/task" | ||
|
@@ -142,6 +142,7 @@ export interface HelmServiceSpec extends ServiceSpec { | |
tests: HelmTestSpec[] | ||
version?: string | ||
values: DeepPrimitiveMap | ||
valueFiles: string[] | ||
} | ||
|
||
export type HelmService = Service<HelmModule, ContainerModule> | ||
|
@@ -209,9 +210,23 @@ export const helmModuleSpecSchema = joi.object().keys({ | |
values: joi.object() | ||
.pattern(/.+/, parameterValueSchema) | ||
.default(() => ({}), "{}") | ||
.description( | ||
"Map of values to pass to Helm when rendering the templates. May include arrays and nested objects.", | ||
), | ||
.description(deline` | ||
Map of values to pass to Helm when rendering the templates. May include arrays and nested objects. | ||
When specified, these take precedence over the values in the \`values.yaml\` file (or the files specified | ||
in \`valueFiles\`). | ||
`), | ||
valueFiles: joiArray(joi.string().posixPath({ subPathOnly: true })) | ||
.description(dedent` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, that'll bunch up all the paragraphs, right? It's too much text for a single paragraph imo. |
||
Specify value files to use when rendering the Helm chart. These will take precedence over the \`values.yaml\` file | ||
bundled in the Helm chart, and should be specified in ascending order of precedence. Meaning, the last file in | ||
this list will have the highest precedence. | ||
|
||
If you _also_ specify keys under the \`values\` field, those will effectively be added as another file at the end | ||
of this list, so they will take precedence over other files listed here. | ||
|
||
Note that the paths here should be relative to the _module_ root, and the files should be contained in | ||
your module directory. | ||
`), | ||
}) | ||
|
||
export async function validateHelmModule({ moduleConfig }: ConfigureModuleParams<HelmModule>) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,6 +175,7 @@ async function configureProvider( | |
}, | ||
securityContext: false, | ||
}, | ||
valueFiles: [], | ||
}, | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment saying that the
gardenValuesPath
takes precedence over the other value files and is therefore appended last.