Skip to content

Commit

Permalink
Add startupProbe support (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
evgkrsk authored Feb 2, 2023
1 parent 4e9b3f9 commit eb3ae78
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 1 deletion.
4 changes: 4 additions & 0 deletions charts/universal-chart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## 3.5.0
* feat: add startupProbe support
* Add tests for all probe types

## 3.4.2 - Jul 16, 2022
* fix: add values templating in ingresses

Expand Down
2 changes: 1 addition & 1 deletion charts/universal-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: Nixys universal Helm chart for deploy your apps to Kubernetes
name: universal-chart
version: 3.4.2
version: 3.5.0
maintainers:
- name: Roman Andreev
email: [email protected]
Expand Down
1 change: 1 addition & 0 deletions charts/universal-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ The command removes all the Kubernetes components associated with the chart and
| `lifecycle` | Containers lifecycle hooks | `{}` |
| `livenessProbe` | Liveness probe object for container | `{}` |
| `readinessProbe` | Readiness probe object for container | `{}` |
| `startupProbe` | Startup probe object for container | `{}` |
| `resources` | The resources requests and limits for container | `{}` |
| `volumeMounts` | Array of the volume mounts | `[]` |

Expand Down
5 changes: 5 additions & 0 deletions charts/universal-chart/results/ingress-rendering.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ spec:
ports:
- containerPort: 1337
name: http
readinessProbe:
initialDelaySeconds: 5
periodSeconds: 10
tcpSocket:
port: 1337
volumeMounts:

[]
Expand Down
4 changes: 4 additions & 0 deletions charts/universal-chart/results/sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ spec:
ports:
- containerPort: 8000
name: http
livenessProbe:
httpGet:
path: /health
port: http
resources:
limits:
cpu: 250m
Expand Down
6 changes: 6 additions & 0 deletions charts/universal-chart/results/web-app.values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ spec:
name: test-envs
- secretRef:
name: test-secret-envs
startupProbe:
failureThreshold: 30
httpGet:
path: /health
port: liveness-port
periodSeconds: 10
volumeMounts:
- mountPath: /var/lib/secret
name: secret-files
Expand Down
5 changes: 5 additions & 0 deletions charts/universal-chart/samples/ingress-rendering.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ deployments:
ports:
- name: http
containerPort: 1337
readinessProbe:
tcpSocket:
port: 1337
initialDelaySeconds: 5
periodSeconds: 10
env:
- name: PUBLIC_URL
value: 'https://{{ .Values.defaultURL }}'
Expand Down
4 changes: 4 additions & 0 deletions charts/universal-chart/samples/sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ deployments:
API:
containers:
- name: API
livenessProbe:
httpGet:
path: /health
port: http
envSecrets:
- secret-envs
envConfigmaps:
Expand Down
6 changes: 6 additions & 0 deletions charts/universal-chart/samples/web-app.values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ deployments:
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
name: test
startupProbe:
httpGet:
path: /health
port: liveness-port
failureThreshold: 30
periodSeconds: 10
containerSecurityContext:
capabilities:
drop: # ref: https://raw.githubusercontent.com/FairwindsOps/polaris/master/checks/insecureCapabilities.yaml
Expand Down
6 changes: 6 additions & 0 deletions charts/universal-chart/templates/cronjob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ spec:
{{- with .readinessProbe }}
readinessProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 14 }}
{{- end }}
{{- with .startupProbe }}
startupProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 14 }}
{{- end }}
{{- with .resources }}
resources: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 14 }}
{{- end }}
Expand Down Expand Up @@ -225,6 +228,9 @@ spec:
{{- with .readinessProbe }}
readinessProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 14 }}
{{- end }}
{{- with .startupProbe }}
startupProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 14 }}
{{- end }}
{{- with .resources }}
resources: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 14 }}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions charts/universal-chart/templates/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ spec:
{{- with .readinessProbe }}
readinessProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
{{- with .startupProbe }}
startupProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
{{- with .resources }}
resources: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
Expand Down Expand Up @@ -154,6 +157,9 @@ spec:
{{- with .readinessProbe }}
readinessProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
{{- with .startupProbe }}
startupProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
{{- with .resources }}
resources: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions charts/universal-chart/templates/helm-hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ spec:
{{- with .readinessProbe }}
readinessProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 8 }}
{{- end }}
{{- with .startupProbe }}
startupProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 8 }}
{{- end }}
{{- with .resources }}
resources: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -174,6 +177,9 @@ spec:
{{- with .readinessProbe }}
readinessProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 8 }}
{{- end }}
{{- with .startupProbe }}
startupProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 8 }}
{{- end }}
{{- with .resources }}
resources: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 8 }}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions charts/universal-chart/templates/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ spec:
{{- with .readinessProbe }}
readinessProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
{{- with .startupProbe }}
startupProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
{{- with .resources }}
resources: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
Expand Down Expand Up @@ -198,6 +201,9 @@ spec:
{{- with .readinessProbe }}
readinessProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
{{- with .startupProbe }}
startupProbe: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
{{- with .resources }}
resources: {{- include "helpers.tplvalues.render" ( dict "value" . "context" $) | nindent 10 }}
{{- end }}
Expand Down

0 comments on commit eb3ae78

Please sign in to comment.