2 # Copyright 2018 Intel Corporation, Inc
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
20 name: {{ include "common.fullname" . }}-healthcheck
21 namespace: {{ include "common.namespace" . }}
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25 release: {{ include "common.release" . }}
26 heritage: {{ .Release.Service }}
28 replicas: {{ .Values.replicaCount }}
32 app: {{ include "common.name" . }}
33 release: {{ include "common.release" . }}
36 - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
37 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
38 name: {{ include "common.name" . }}-readiness
49 fieldPath: metadata.namespace
51 - image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}"
52 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 name: {{ include "common.name" . }}-healthcheck
58 echo "INSERT HEALTHCHECK PLAN";
61 until [ $resp = "200" ]; do
62 resp=$(curl -k -s -o /dev/null --write-out %{http_code} -X POST https://{{.Values.config.music.serviceName}}.{{ include "common.namespace" . }}:{{.Values.config.music.port}}/MUSIC/rest/v2/keyspaces/conductor/tables/plans/rows?id=healthcheck \
63 -H "Content-Type: application/json" \
65 -H "Authorization: Basic Y29uZHVjdG9yOmMwbmR1Y3Qwcg==" \
66 --data @healthcheck.json);
72 - mountPath: /etc/localtime
75 - mountPath: /has/healthcheck.json
76 name: {{ .Values.global.commonConfigPrefix }}-config
77 subPath: healthcheck.json
79 {{ toYaml .Values.resources | indent 10 }}
81 {{- if .Values.nodeSelector }}
82 {{ toYaml .Values.nodeSelector | indent 8 }}
84 {{- if .Values.affinity }}
86 {{ toYaml .Values.affinity | indent 8 }}
92 - name: {{ .Values.global.commonConfigPrefix }}-config
94 name: {{ .Values.global.commonConfigPrefix }}-configmap
96 - key: healthcheck.json
97 path: healthcheck.json
98 restartPolicy: OnFailure
100 - name: "{{ include "common.namespace" . }}-docker-registry-key"