Skip to content

Commit

Permalink
feat(simple-app): only require readinessProbe when virtaulService is …
Browse files Browse the repository at this point in the history
…enabled (#319)
  • Loading branch information
stlava authored Jul 18, 2024
1 parent 41c5725 commit fdcc31c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/simple-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: simple-app
description: Default Microservice Helm Chart
type: application
version: 1.8.2
version: 1.9.0
appVersion: latest
maintainers:
- name: diranged
Expand Down
7 changes: 6 additions & 1 deletion charts/simple-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Default Microservice Helm Chart

![Version: 1.8.2](https://img.shields.io/badge/Version-1.8.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 1.9.0](https://img.shields.io/badge/Version-1.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

[deployments]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
[hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Expand All @@ -13,6 +13,11 @@ defaults for you like the Kubernetes [Horizontal Pod Autoscaler][hpa].

## Upgrade Notes

### 1.8.x -> 1.9.x

`readinessProbe` is now only required when `virtualService.enabled` is `true`. This
provides the flexibility to use this chart for non request serving services.

### 1.6.x -> 1.7.x

**BREAKING: Istio Alerts have changed**
Expand Down
5 changes: 5 additions & 0 deletions charts/simple-app/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ defaults for you like the Kubernetes [Horizontal Pod Autoscaler][hpa].

## Upgrade Notes

### 1.8.x -> 1.9.x

`readinessProbe` is now only required when `virtualService.enabled` is `true`. This
provides the flexibility to use this chart for non request serving services.

### 1.6.x -> 1.7.x

**BREAKING: Istio Alerts have changed**
Expand Down
7 changes: 6 additions & 1 deletion charts/simple-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ through $deploymentZones
{{- /*
Verify that some required inputs are supplied
*/}}

{{- if .Values.virtualService.enabled }}
{{- $readinessProbe := required "readinessProbe is required" .Values.readinessProbe }}
{{- end }}

{{- /*
By default, we do run the topology spread function - letting it decide
Expand Down Expand Up @@ -294,8 +297,10 @@ spec:
livenessProbe:
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
{{- with $.Values.readinessProbe }}
readinessProbe:
{{- tpl (toYaml $.Values.readinessProbe) $ | nindent 12 }}
{{- tpl (toYaml . ) $ | nindent 12 }}
{{- end }}

---

Expand Down

0 comments on commit fdcc31c

Please sign in to comment.