Skip to content

Commit

Permalink
Possibility to add extra ENV variables to K8s Deployment POD (#33)
Browse files Browse the repository at this point in the history
* Posiability to add extra ENV variables to K8s Deployment POD

* readme update via helm-docs

Co-authored-by: Benjamin Buetikofer <[email protected]>
  • Loading branch information
vladchit and Benjamin Buetikofer authored Oct 19, 2021
1 parent 7fc5056 commit 81b75dd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/imaginary/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "1.2.4"
description: Deploy imaginary to process pictures on the fly
name: imaginary
version: 0.1.5
version: 0.1.6
home: https://github.com/h2non/imaginary
sources:
- https://github.com/ricardo-ch/helm-charts/tree/main/charts/imaginary
Expand All @@ -15,7 +15,7 @@ keywords:
- h2non
annotations:
artifacthub.io/changes: |
- Removing default value for Istio CPU limit
- Add env-vars to deployment
artifacthub.io/images: |
- name: imaginary
image: h2non/imaginary:1.2.4
3 changes: 2 additions & 1 deletion charts/imaginary/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Imaginary

![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![AppVersion: 1.2.4](https://img.shields.io/badge/AppVersion-1.2.4-informational?style=flat-square) ![Release Status](https://github.com/ricardo-ch/helm-charts/workflows/Release%20Charts/badge.svg) [![License](https://img.shields.io/github/license/ricardo-ch/helm-charts)](https://github.com/ricardo-ch/helm-charts/blob/main/LICENSE)
![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![AppVersion: 1.2.4](https://img.shields.io/badge/AppVersion-1.2.4-informational?style=flat-square) ![Release Status](https://github.com/ricardo-ch/helm-charts/workflows/Release%20Charts/badge.svg) [![License](https://img.shields.io/github/license/ricardo-ch/helm-charts)](https://github.com/ricardo-ch/helm-charts/blob/main/LICENSE)

This chart installs [Imaginary](https://github.com/h2non/imaginary).

Expand Down Expand Up @@ -28,6 +28,7 @@ Simply add this Chart repository to Helm:
| additionalLabels | object | `{}` | append labels to both the deployment, pdb, hpa and the pods label list |
| apikey | string | `""` | Define API key for authorization |
| config | object | `{}` | Imaginary arguments. use the same hyphen separated synthax for the key. use strings for the value or you might get a bad formatting. |
| env | object | `{}` | |
| gracefulShutdownDelaySeconds | int | `10` | estimated time to propagate the information the pod is not part of the service anymore |
| hpa | object | `{"maxReplicas":2,"minReplicas":2}` | Horizontal pod autoscaling configuration |
| httpPort | int | `8080` | Which port should Imaginary and its Kubernetes service listen |
Expand Down
6 changes: 6 additions & 0 deletions charts/imaginary/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ spec:
env:
- name: PORT
value: {{ .Values.httpPort | quote }}
{{- if .Values.env -}}
{{- range $name, $value := .Values.env }}
- name: {{ $name }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.apiKey }}
- name: API_KEY
valueFrom:
Expand Down
2 changes: 2 additions & 0 deletions charts/imaginary/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ livenessProbe:
config: {}
# example
# path-prefix: "/nya"
env: {}
# MALLOC_ARENA_MAX: 2

tls:
# -- Base64 encoded private key file for TLS certificate.
Expand Down

0 comments on commit 81b75dd

Please sign in to comment.