Skip to content

Commit

Permalink
Merge branch 'main' into custom-probes
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrohamLincoln committed Aug 9, 2022
2 parents a2ac4e0 + f158323 commit 13eb4cc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ their default values.
| `extraEnvVars` | Additional environment variables to the pod | `[]` |
| `livenessProbe` | Optional livenessProbe definition | `nil` |
| `readinessProbe` | Optional readinessProbe definition | `nil` |
| `initContainers` | Init containers to be created in the pod | `[]` |

Specify each parameter using the `--set key=value[,key=value]` argument to
`helm install`.
Expand Down
4 changes: 2 additions & 2 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Create a livenessProbe.
Allow the default value to be completely overriden by an optional value.
Retain he original livenessProbe logic.
*/}}
{{- define "livenessProbe" -}}
{{- define "docker-registry.livenessProbe" -}}
livenessProbe:
{{- if .Values.livenessProbe }}
{{ .Values.livenessProbe | toYaml | indent 2 }}
Expand All @@ -47,7 +47,7 @@ Create a readinessProbe.
Allow the default value to be completely overriden by an optional value.
Retain he original readinessProbe logic.
*/}}
{{- define "readinessProbe" -}}
{{- define "docker-registry.readinessProbe" -}}
readinessProbe:
{{- if .Values.readinessProbe }}
{{ .Values.readinessProbe | toYaml | indent 2 }}
Expand Down
8 changes: 6 additions & 2 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ spec:
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
{{- with .Values.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
Expand All @@ -64,8 +68,8 @@ spec:
name: http-metrics
protocol: TCP
{{- end }}
{{ include "livenessProbe" . | indent 10 }}
{{ include "readinessProbe" . | indent 10 }}
{{ include "docker-registry.livenessProbe" . | indent 10 }}
{{ include "docker-registry.readinessProbe" . | indent 10 }}
resources:
{{ toYaml .Values.resources | indent 12 }}
env:
Expand Down
10 changes: 8 additions & 2 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ autoscaling:
minReplicas: 1
maxReplicas: 2
targetCPUUtilizationPercentage: 60
targetMemoryUtilizationPercentage: 60 # available only on Kubernetes ≥1.23 [required "autoscaling/v2"]
behavior: {} # available only on Kubernetes ≥1.23 [required "autoscaling/v2"]
targetMemoryUtilizationPercentage: 60 # available only on Kubernetes ≥1.23 [required "autoscaling/v2"]
behavior: {} # available only on Kubernetes ≥1.23 [required "autoscaling/v2"]
# scaleDown:
# stabilizationWindowSeconds: 300
# policies:
Expand Down Expand Up @@ -223,3 +223,9 @@ extraEnvVars: []
# readinessProbe:
# tcpSocket:
# port: 5000

initContainers: []
## Init containers to add to the Deployment
# - name: init
# image: busybox
# command: []

0 comments on commit 13eb4cc

Please sign in to comment.