Skip to content

Commit

Permalink
feat: expose envFrom in helm generated chart (#981)
Browse files Browse the repository at this point in the history
## Description
Adds `envFrom` to generated helm chart for admission and watcher
deployments

## Related Issue
Fixes #980

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed
  • Loading branch information
rjferguson21 authored Jul 24, 2024
1 parent 22b0d41 commit 126ffc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/assets/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ export function watcherDeployTemplate(buildTimestamp: string) {
{{- toYaml .Values.watcher.resources | nindent 12 }}
env:
{{- toYaml .Values.watcher.env | nindent 12 }}
envFrom:
{{- toYaml .Values.watcher.envFrom | nindent 12 }}
securityContext:
{{- toYaml .Values.watcher.containerSecurityContext | nindent 12 }}
volumeMounts:
Expand Down Expand Up @@ -187,6 +189,8 @@ export function admissionDeployTemplate(buildTimestamp: string) {
{{- toYaml .Values.admission.resources | nindent 12 }}
env:
{{- toYaml .Values.admission.env | nindent 12 }}
envFrom:
{{- toYaml .Values.admission.envFrom | nindent 12 }}
securityContext:
{{- toYaml .Values.admission.containerSecurityContext | nindent 12 }}
volumeMounts:
Expand Down
2 changes: 2 additions & 0 deletions src/lib/assets/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export async function overridesFile({ hash, name, image, config, apiToken }: Ass
failurePolicy: config.onError === "reject" ? "Fail" : "Ignore",
webhookTimeout: config.webhookTimeout,
env: envMapToArray(mergePkgJSONEnv(pkgJSONAdmissionEnv, config.env)),
envFrom: [],
image,
annotations: {
"pepr.dev/description": `${config.description}` || "",
Expand Down Expand Up @@ -85,6 +86,7 @@ export async function overridesFile({ hash, name, image, config, apiToken }: Ass
watcher: {
terminationGracePeriodSeconds: 5,
env: envMapToArray(mergePkgJSONEnv(pkgJSONWatchEnv, config.env)),
envFrom: [],
image,
annotations: {
"pepr.dev/description": `${config.description}` || "",
Expand Down

0 comments on commit 126ffc0

Please sign in to comment.