Skip to content

Commit

Permalink
Add configmap demo to podinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprodan committed Feb 12, 2019
1 parent 8a03ae1 commit 702f4fc
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
15 changes: 15 additions & 0 deletions charts/podinfo/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "podinfo.fullname" . }}
labels:
app: {{ template "podinfo.name" . }}
chart: {{ template "podinfo.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
config.yaml: |-
# http settings
http-client-timeout: 1m
http-server-timeout: 30s
http-server-shutdown-timeout: 5s
7 changes: 7 additions & 0 deletions charts/podinfo/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
- --level={{ .Values.logLevel }}
- --random-delay={{ .Values.faults.delay }}
- --random-error={{ .Values.faults.error }}
- --config-path=/podinfo/config
env:
{{- if .Values.message }}
- name: PODINFO_UI_MESSAGE
Expand Down Expand Up @@ -67,6 +68,9 @@ spec:
volumeMounts:
- name: data
mountPath: /data
- name: config
mountPath: /podinfo/config
readOnly: true
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
Expand All @@ -84,3 +88,6 @@ spec:
volumes:
- name: data
emptyDir: {}
- name: config
configMap:
name: {{ template "podinfo.fullname" . }}
5 changes: 5 additions & 0 deletions charts/podinfo/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "podinfo.fullname" . }}
labels:
app: {{ template "podinfo.name" . }}
chart: {{ template "podinfo.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
scaleTargetRef:
apiVersion: apps/v1beta2
Expand Down
4 changes: 2 additions & 2 deletions charts/podinfo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ canary:
host:
analysis:
# schedule interval (default 60s)
interval: 15s
interval: 10s
# max number of failed metric checks before rollback
threshold: 10
# max traffic percentage routed to canary
# percentage (0-100)
maxWeight: 50
# canary increment step
# percentage (0-100)
stepWeight: 2
stepWeight: 5
thresholds:
# minimum req success rate (non 5xx responses)
# percentage (0-100)
Expand Down

0 comments on commit 702f4fc

Please sign in to comment.