Skip to content

Commit

Permalink
[manifests]: add functionality for envFrom in containers (#53)
Browse files Browse the repository at this point in the history
* add functionality for envFrom in containers

Signed-off-by: Jan Fuhrer <[email protected]>
  • Loading branch information
janfuhrer authored Jun 15, 2021
1 parent 4d73a7c commit 3876056
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/manifests/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: manifests
description: "Bedag's Manifest chart. Library full of basic kubernetes manifests."
type: library
version: 0.7.0
version: 0.8.0
icon: "https://www.bedag.ch/wGlobal/wGlobal/layout/images/logo.svg"
keywords:
- Bedag
Expand All @@ -22,4 +22,4 @@ annotations:
artifacthub.io/prerelease: "false"
artifacthub.io/license: Apache-2.0
artifacthub.io/changes: |
- "[Added]: Common Utils (Label Wrappers, Templates & Documentation)"
- "[Added]: Functionality for environment from source"
2 changes: 1 addition & 1 deletion charts/manifests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Manifests Library

![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)
![Version: 0.8.0](https://img.shields.io/badge/Version-0.8.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)

This library's purpose is to have more flexibility as chart author but at the same time have kubernetes manifests managed in a central library. This way you can avoid big surprises when Kubernetes has breaking changes in any of their APIs. Currently we support a base set of resources. Resources may be added as soon as we see or get a request that there's a need for it. This chart is still under development and testing, since it's rather complex. Feel free to use it. Our goal is to get it as reliable as possible.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ env: {{- include "lib.utils.extras.environment" $context | nindent 2 }}
{{- include "lib.utils.strings.template" (dict "value" $filteredList "context" $context) | nindent 2 }}
{{- end }}
{{- end }}
{{- with $values.envFrom }}
envFrom: {{- include "lib.utils.strings.template" (dict "value" . "context" $context) | nindent 2 }}
{{- end }}
{{- if $values.command }}
command: {{- include "lib.utils.strings.template" (dict "value" $values.command "context" $context) | nindent 2 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@ environment: {{ toYaml (default list $_.data.environment) | nindent 2 }}
# valueFrom:
# fieldRef:
# fieldPath: spec.*
#

## Environment from Source
# {{ $_.path }}envFrom -- Configure Environment from Source
envFrom: {{ toYaml (default list $_.data.envFrom) | nindent 2 }}
#- configMapRef:
#name: configmapname
#- secretRef:
#name: secretname

## Container Ports
# {{ $_.path }}ports -- Configure Container Ports
Expand Down

0 comments on commit 3876056

Please sign in to comment.