diff --git a/charts/universal-chart/CHANGELOG.md b/charts/universal-chart/CHANGELOG.md index 94af725..e0f61ca 100644 --- a/charts/universal-chart/CHANGELOG.md +++ b/charts/universal-chart/CHANGELOG.md @@ -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 diff --git a/charts/universal-chart/Chart.yaml b/charts/universal-chart/Chart.yaml index 777c986..c799987 100644 --- a/charts/universal-chart/Chart.yaml +++ b/charts/universal-chart/Chart.yaml @@ -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: r.andreev@nixys.ru diff --git a/charts/universal-chart/README.md b/charts/universal-chart/README.md index 8dfc25b..e37517d 100644 --- a/charts/universal-chart/README.md +++ b/charts/universal-chart/README.md @@ -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 | `[]` | diff --git a/charts/universal-chart/results/ingress-rendering.yaml b/charts/universal-chart/results/ingress-rendering.yaml index 4c522a4..9f252c7 100644 --- a/charts/universal-chart/results/ingress-rendering.yaml +++ b/charts/universal-chart/results/ingress-rendering.yaml @@ -59,6 +59,11 @@ spec: ports: - containerPort: 1337 name: http + readinessProbe: + initialDelaySeconds: 5 + periodSeconds: 10 + tcpSocket: + port: 1337 volumeMounts: [] diff --git a/charts/universal-chart/results/sample.yml b/charts/universal-chart/results/sample.yml index 9f94de6..954b850 100644 --- a/charts/universal-chart/results/sample.yml +++ b/charts/universal-chart/results/sample.yml @@ -79,6 +79,10 @@ spec: ports: - containerPort: 8000 name: http + livenessProbe: + httpGet: + path: /health + port: http resources: limits: cpu: 250m diff --git a/charts/universal-chart/results/web-app.values.yml b/charts/universal-chart/results/web-app.values.yml index 82e440b..7fe51ad 100644 --- a/charts/universal-chart/results/web-app.values.yml +++ b/charts/universal-chart/results/web-app.values.yml @@ -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 diff --git a/charts/universal-chart/samples/ingress-rendering.yaml b/charts/universal-chart/samples/ingress-rendering.yaml index 42cf856..0b16e93 100644 --- a/charts/universal-chart/samples/ingress-rendering.yaml +++ b/charts/universal-chart/samples/ingress-rendering.yaml @@ -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 }}' diff --git a/charts/universal-chart/samples/sample.yml b/charts/universal-chart/samples/sample.yml index 3c606c8..aa77d6c 100644 --- a/charts/universal-chart/samples/sample.yml +++ b/charts/universal-chart/samples/sample.yml @@ -23,6 +23,10 @@ deployments: API: containers: - name: API + livenessProbe: + httpGet: + path: /health + port: http envSecrets: - secret-envs envConfigmaps: diff --git a/charts/universal-chart/samples/web-app.values.yml b/charts/universal-chart/samples/web-app.values.yml index 3838a2e..8838fdb 100644 --- a/charts/universal-chart/samples/web-app.values.yml +++ b/charts/universal-chart/samples/web-app.values.yml @@ -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 diff --git a/charts/universal-chart/templates/cronjob.yml b/charts/universal-chart/templates/cronjob.yml index be2daf4..428de68 100644 --- a/charts/universal-chart/templates/cronjob.yml +++ b/charts/universal-chart/templates/cronjob.yml @@ -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 }} @@ -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 }} diff --git a/charts/universal-chart/templates/deployment.yml b/charts/universal-chart/templates/deployment.yml index 47cae91..76eae1d 100644 --- a/charts/universal-chart/templates/deployment.yml +++ b/charts/universal-chart/templates/deployment.yml @@ -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 }} @@ -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 }} diff --git a/charts/universal-chart/templates/helm-hooks.yml b/charts/universal-chart/templates/helm-hooks.yml index 0043f2b..b850ee4 100644 --- a/charts/universal-chart/templates/helm-hooks.yml +++ b/charts/universal-chart/templates/helm-hooks.yml @@ -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 }} @@ -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 }} diff --git a/charts/universal-chart/templates/job.yml b/charts/universal-chart/templates/job.yml index cd571b5..e5e7f6d 100644 --- a/charts/universal-chart/templates/job.yml +++ b/charts/universal-chart/templates/job.yml @@ -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 }} @@ -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 }}