diff --git a/charts/webservice/Chart.yaml b/charts/webservice/Chart.yaml index abf4ab91..78d194eb 100644 --- a/charts/webservice/Chart.yaml +++ b/charts/webservice/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: webservice description: OSC webservice bootstrap Helm Chart type: application -version: 0.36.3 +version: 0.37.0 appVersion: "0.1.0" maintainers: - name: treydock diff --git a/charts/webservice/templates/deployment.yaml b/charts/webservice/templates/deployment.yaml index cbb9ad60..c115498a 100644 --- a/charts/webservice/templates/deployment.yaml +++ b/charts/webservice/templates/deployment.yaml @@ -127,10 +127,12 @@ spec: {{- end }} {{- end }} {{- $probeType := "httpGet" }} - {{- if index $root.Values.probes.typeDefaults $root.Values.appType }} - {{- $probeType = (index $root.Values.probes.typeDefaults $root.Values.appType) }} + {{- if $container.probeType }} + {{- $probeType = $container.probeType }} {{- else if $root.Values.probes.type }} {{- $probeType = $root.Values.probes.type }} + {{- else if index $root.Values.probes.typeDefaults $root.Values.appType }} + {{- $probeType = (index $root.Values.probes.typeDefaults $root.Values.appType) }} {{- end }} startupProbe: {{ $probeType }}: {{ tpl (toYaml (index $root.Values.startupProbe $probeType)) $root | nindent 12 }} diff --git a/charts/webservice/templates/tests/test.yaml b/charts/webservice/templates/tests/test.yaml index 31e61e75..865cd9bd 100644 --- a/charts/webservice/templates/tests/test.yaml +++ b/charts/webservice/templates/tests/test.yaml @@ -14,7 +14,7 @@ spec: image: busybox:latest imagePullPolicy: Always command: ['wget'] - args: ['-O-','-S','{{ include "webservice.name" . }}:{{ .Values.service.port }}{{ .Values.startupProbe.httpGet.path }}'] + args: ['-O-','-S','{{ include "webservice.name" . }}:{{ .Values.service.port }}{{ tpl .Values.startupProbe.httpGet.path . }}'] securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/charts/webservice/values.yaml b/charts/webservice/values.yaml index ebec8440..f533c389 100644 --- a/charts/webservice/values.yaml +++ b/charts/webservice/values.yaml @@ -46,6 +46,8 @@ containers: port: ~ portName: http startCommand: ~ + probePath: ~ + probeType: ~ ingressPath: / auth: ~ @@ -97,11 +99,12 @@ service: probes: type: ~ + path: / typeDefaults: rshiny: tcpSocket startupProbe: httpGet: - path: / + path: '{{ .probePath | default .Values.probes.path }}' port: '{{ .portName | default .name }}' tcpSocket: port: '{{ .portName | default .name }}' @@ -110,7 +113,7 @@ startupProbe: timeoutSeconds: 5 livenessProbe: httpGet: - path: / + path: '{{ .probePath | default .Values.probes.path }}' port: '{{ .portName | default .name }}' tcpSocket: port: '{{ .portName | default .name }}' @@ -119,7 +122,7 @@ livenessProbe: timeoutSeconds: 5 readinessProbe: httpGet: - path: / + path: '{{ .probePath | default .Values.probes.path }}' port: '{{ .portName | default .name }}' tcpSocket: port: '{{ .portName | default .name }}'