Merge "Allow configuration of armada-api/tiller probes"

This commit is contained in:
Zuul 2019-10-11 14:33:38 +00:00 committed by Gerrit Code Review
commit 5fae57d179
5 changed files with 90 additions and 54 deletions

View File

@ -14,6 +14,26 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "armadaApiProbeTemplate" }}
httpGet:
path: /api/v1.0/health
port: {{ tuple "armada" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
{{- define "tillerReadinessProbeTemplate" }}
httpGet:
path: /readiness
port: 44135
scheme: HTTP
{{- end }}
{{- define "tillerLivenessProbeTemplate" }}
httpGet:
path: /liveness
port: 44135
scheme: HTTP
{{- end }}
{{- if .Values.manifests.deployment_api }}
{{- $envAll := . }}
{{- $labels := tuple $envAll "armada" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" -}}
@ -113,19 +133,8 @@ spec:
ports:
- name: armada-api
containerPort: {{ tuple "armada" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
livenessProbe:
httpGet:
path: /api/v1.0/health
port: {{ tuple "armada" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 15
periodSeconds: 10
readinessProbe:
httpGet:
scheme: HTTP
path: /api/v1.0/health
port: {{ tuple "armada" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 15
periodSeconds: 10
{{ dict "envAll" $envAll "component" "armada" "container" "api" "type" "readiness" "probeTemplate" (include "armadaApiProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
{{ dict "envAll" $envAll "component" "armada" "container" "api" "type" "liveness" "probeTemplate" (include "armadaApiProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
volumeMounts:
- name: pod-tmp
mountPath: /tmp
@ -179,26 +188,8 @@ spec:
- name: tiller
containerPort: {{ .Values.conf.tiller.port }}
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /readiness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
failureThreshold: 3
httpGet:
path: /liveness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
{{ dict "envAll" $envAll "component" "armada" "container" "tiller" "type" "readiness" "probeTemplate" (include "tillerReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
{{ dict "envAll" $envAll "component" "armada" "container" "tiller" "type" "liveness" "probeTemplate" (include "tillerLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
{{- end }}
{{ if $mounts_armada_api.volumeMounts }}{{ toYaml $mounts_armada_api.volumeMounts | indent 12 }}{{ end }}
volumes:

View File

@ -225,6 +225,36 @@ monitoring:
port: 8000
pod:
probes:
armada:
api:
readiness:
enabled: true
params:
initialDelaySeconds: 15
periodSeconds: 10
liveness:
enabled: true
params:
initialDelaySeconds: 15
periodSeconds: 10
tiller:
readiness:
enabled: true
params:
failureThreshold: 3
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
liveness:
enabled: true
params:
failureThreshold: 3
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
security_context:
armada:
pod:

View File

@ -14,6 +14,20 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "tillerReadinessProbeTemplate" }}
httpGet:
scheme: HTTP
path: /readiness
port: 44135
{{- end }}
{{- define "tillerLivenessProbeTemplate" }}
httpGet:
scheme: HTTP
path: /liveness
port: 44135
{{- end }}
{{- if .Values.manifests.deployment_tiller }}
{{- $envAll := . }}
{{- $serviceAccountName := "tiller-deploy" }}
@ -98,25 +112,7 @@ spec:
- name: tiller
containerPort: 44134
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /readiness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
failureThreshold: 3
httpGet:
path: /liveness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
{{ dict "envAll" $envAll "component" "tiller" "container" "tiller" "type" "readiness" "probeTemplate" (include "tillerReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
{{ dict "envAll" $envAll "component" "tiller" "container" "tiller" "type" "liveness" "probeTemplate" (include "tillerLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
status: {}
{{- end }}

View File

@ -51,6 +51,25 @@ conf:
prestop_sleep: 30
pod:
probes:
tiller:
tiller:
readiness:
enabled: true
params:
failureThreshold: 3
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
liveness:
enabled: true
params:
failureThreshold: 3
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
enabled: false
tiller:

View File

@ -22,7 +22,7 @@ HELM=${1}
HELM_PIDFILE=${2}
SERVE_DIR=$(mktemp -d)
HTK_STABLE_COMMIT=${HTK_COMMIT:-"200b5e902b3a176fbfbe669b6a10a254c9b50f5d"}
HTK_STABLE_COMMIT=${HTK_COMMIT:-"22ef25ab295d6b7c6797cfffaa77cf181c673e9b"}
${HELM} init --client-only