Skip to content

Commit

Permalink
Imaginary: support for istio (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-nemet authored Feb 10, 2021
1 parent cb308d1 commit 795db68
Show file tree
Hide file tree
Showing 4 changed files with 27 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.2
version: 0.1.3
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: |
- Fix Container Image Annotation
- Adding configuration for istio sidecar(injection and resources). Support istio 1.8+ annotations.
artifacthub.io/images: |
- name: imaginary
image: h2non/imaginary:1.2.4
7 changes: 6 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.2](https://img.shields.io/badge/Version-0.1.2-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.3](https://img.shields.io/badge/Version-0.1.3-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 @@ -33,6 +33,11 @@ Simply add this Chart repository to Helm:
| 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. |
| imagePullPolicy | string | `"IfNotPresent"` | imagePullPolicy used by k8s |
| istio.cpu | string | `"10m"` | istio sidecar cpu request |
| istio.cpuLimit | string | `"10m"` | istio sidecar cpu request limit |
| istio.inject | bool | `false` | istio sidecar configuration, enable injecting sidecar |
| istio.memory | string | `"128Mi"` | istio sidecar memory request |
| istio.memoryLimit | string | `"128Mi"` | istio sidecar memory limit |
| livenessProbe.failureThreshold | int | `3` | |
| livenessProbe.periodSeconds | int | `10` | |
| livenessProbe.successThreshold | int | `1` | |
Expand Down
7 changes: 7 additions & 0 deletions charts/imaginary/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ spec:
{{ $key }}: {{ $value }}
{{- end }}
annotations:
{{- if .Values.istio.inject }}
sidecar.istio.io/inject: {{ quote .Values.istio.inject }}
sidecar.istio.io/proxyCPU: {{ .Values.istio.cpu }}
sidecar.istio.io/proxyCPULimit: {{ .Values.istio.cpuLimit }}
sidecar.istio.io/proxyMemory: {{ .Values.istio.memory }}
sidecar.istio.io/proxyMemoryLimit: {{ .Values.istio.memoryLimit }}
{{- end }}
{{ toYaml .Values.additionalAnnotations | indent 8 }}
spec:
{{- if .Values.nodeSelector }}
Expand Down
12 changes: 12 additions & 0 deletions charts/imaginary/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ additionalLabels: {}
additionalAnnotations: {}
# sumologic.com/exclude: "true"

istio:
# -- istio sidecar configuration, enable injecting sidecar
inject: false
# -- istio sidecar memory request
memory: 128Mi
# -- istio sidecar memory limit
memoryLimit: 128Mi
# -- istio sidecar cpu request
cpu: 10m
# -- istio sidecar cpu request limit
cpuLimit: 10m

# -- estimated time to propagate the information the pod is not part of the service anymore
gracefulShutdownDelaySeconds:
10
Expand Down

0 comments on commit 795db68

Please sign in to comment.