diff --git a/charts/imaginary/Chart.yaml b/charts/imaginary/Chart.yaml index af3a70b..901d104 100644 --- a/charts/imaginary/Chart.yaml +++ b/charts/imaginary/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "1.2.4" description: Deploy imaginary to process pictures on the fly name: imaginary -version: 0.1.0 +version: 0.1.1 home: https://github.com/h2non/imaginary sources: - https://github.com/ricardo-ch/helm-charts/tree/main/charts/imaginary diff --git a/charts/imaginary/README.md b/charts/imaginary/README.md index ec4f017..3bd7544 100644 --- a/charts/imaginary/README.md +++ b/charts/imaginary/README.md @@ -1,6 +1,6 @@ -# PromLens +# Imaginary -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-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.1](https://img.shields.io/badge/Version-0.1.1-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). @@ -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. | +| 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 | | image | string | `"h2non/imaginary:1.2.4"` | Docker image repository to pull it. | diff --git a/charts/imaginary/README.md.gotmpl b/charts/imaginary/README.md.gotmpl index 0700de6..b2b34e7 100644 --- a/charts/imaginary/README.md.gotmpl +++ b/charts/imaginary/README.md.gotmpl @@ -1,4 +1,4 @@ -# PromLens +# Imaginary {{ template "chart.deprecationWarning" . }} diff --git a/charts/imaginary/templates/deployment.yaml b/charts/imaginary/templates/deployment.yaml index da1c97d..c105ab4 100644 --- a/charts/imaginary/templates/deployment.yaml +++ b/charts/imaginary/templates/deployment.yaml @@ -92,6 +92,10 @@ spec: value: {{ print .Values.apiKey | quote }} {{- end }} initialDelaySeconds: 10 + lifecycle: + preStop: + exec: + command: ["sleep","{{ .Values.gracefulShutdownDelaySeconds }}"] {{- if and .Values.tls.certificate .Values.tls.privateKey }} volumes: - name: certificates diff --git a/charts/imaginary/values.yaml b/charts/imaginary/values.yaml index 9cfc9b1..ede0716 100644 --- a/charts/imaginary/values.yaml +++ b/charts/imaginary/values.yaml @@ -47,12 +47,6 @@ tls: # -- Base64 encoded TLS certificate file certificate: "" -# -- Horizontal pod autoscaling configuration -hpa: - minReplicas: 2 - maxReplicas: 2 - - # -- Define API key for authorization apikey: "" @@ -64,6 +58,15 @@ additionalLabels: {} additionalAnnotations: {} # sumologic.com/exclude: "true" +# -- estimated time to propagate the information the pod is not part of the service anymore +gracefulShutdownDelaySeconds: + 10 + pdb: # -- minAvailable field from k8s pdb minAvailable: 50% + +# -- Horizontal pod autoscaling configuration +hpa: + minReplicas: 2 + maxReplicas: 2