Skip to content

Commit

Permalink
Merge branch 'feature/probes' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	values.yaml
  • Loading branch information
tde committed Dec 14, 2021
2 parents c6c2686 + 18247f1 commit 3d1d4f8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
apiVersion: v2
name: microservice
version: 0.3.0
appVersion: 0.3.0
version: 0.3.1
appVersion: 0.3.1
description: A Helm chart which provide a DRY microservice deployment mechanism
keywords:
- microservice
Expand Down
17 changes: 17 additions & 0 deletions templates/_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,23 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.liveness.enabled }}
livenessProbe:
httpGet:
path: {{ .Values.liveness.path }}
port: {{ .Values.liveness.port }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
{{- end}}
{{- if .Values.readiness.enabled }}
readinessProbe:
httpGet:
path: {{ .Values.readiness.path }}
port: {{ .Values.readiness.port }}
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
failureThreshold: {{ .Values.readiness.failureThreshold }}
{{- end }}
{{- if .Values.volumes.enabled }}
volumes:
{{- range $conf := .Values.volumes.configMaps }}
Expand Down
28 changes: 19 additions & 9 deletions values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
# Default values for microservice.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
Expand All @@ -11,7 +10,7 @@ global:

## Set default image, imageTag, and imagePullPolicy.
## ref: https://hub.docker.com/r/apache/nifi/
##
##
image:
repository: "crccheck/hello-world"
tag: "latest"
Expand All @@ -32,7 +31,7 @@ fullnameOverride: ""
# imagePullSecrets: myRegistrKeySecretName


# serviceAccount:
# serviceAccount:

# Annotation for the Deployment
annotations: {}
Expand All @@ -53,6 +52,21 @@ services:
environment: {}
# VAR1: value1

#Probes
liveness:
enabled: false
path: /alive
port: 8001
initialDelaySeconds: 3
periodSeconds: 3
readiness:
enabled: false
path: /ready
port: 8001
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 3

volumes:
enabled: false
pvc:
Expand All @@ -72,8 +86,6 @@ volumes:
# test.conf: |
# hello

## Configure Ingress based on the documentation here: https://kubernetes.io/docs/concepts/services-networking/ingress/
##
ingress:
enabled: false
annotations: {}
Expand All @@ -89,13 +101,11 @@ ingress:
# hosts:
# - chart-example.local

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
limits:
cpu: 2
memory: 2000Mi
requests:
cpu: 500m
memory: 500Mi
memory: 500Mi

0 comments on commit 3d1d4f8

Please sign in to comment.