summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdc/charts/sdc-es/templates/deployment.yaml
diff options
context:
space:
mode:
authorMandeep Khinda <mandeep.khinda@amdocs.com>2018-03-22 02:12:15 +0000
committerMandeep Khinda <mandeep.khinda@amdocs.com>2018-03-28 16:06:31 +0000
commita1047f40ac83218e9b34bbfabcc3cd775687b693 (patch)
tree76e60310b2c0234d07957a4673de61524b2d6abc /kubernetes/sdc/charts/sdc-es/templates/deployment.yaml
parentb4ba14c5fea54a4e7a3e51bdc8aa58f5eb0c79fe (diff)
standardizing SDC helm charts
all pods come up robot health reports HTTP 500 -> mostly due to missing dmaap resolving filebeat merge conflict addressing CI comments do we need a pv/pvc for the logs? Issue-ID: OOM-747 Change-Id: Id6f1e57fdaf3cd6d9f75e8bc1e5bfde39b91235e Signed-off-by: Mandeep Khinda <mandeep.khinda@amdocs.com> Signed-off-by: Areli Fuss <af732p@intl.att.com> (cherry picked from commit fe3e499547c91eadd71bde630594720b918c2af9)
Diffstat (limited to 'kubernetes/sdc/charts/sdc-es/templates/deployment.yaml')
-rw-r--r--kubernetes/sdc/charts/sdc-es/templates/deployment.yaml102
1 files changed, 102 insertions, 0 deletions
diff --git a/kubernetes/sdc/charts/sdc-es/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-es/templates/deployment.yaml
new file mode 100644
index 0000000000..bb08a2aecd
--- /dev/null
+++ b/kubernetes/sdc/charts/sdc-es/templates/deployment.yaml
@@ -0,0 +1,102 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ initContainers:
+ - name: {{ include "common.name" . }}-logs-init
+ command:
+ - /bin/bash
+ - "-c"
+ - |
+ mkdir -p /ubuntu-init/ASDC/ASDC-ES/
+ chmod -R 777 /ubuntu-init/
+ image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.global.ubuntuInitImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ volumeMounts:
+ - name: {{ include "common.fullname" . }}-logs
+ mountPath: /ubuntu-init/
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ - containerPort: {{ .Values.service.internalPort2 }}
+ # disable liveness probe when breakpoints set in debugger
+ # so K8s doesn't restart unresponsive container
+ {{- if eq .Values.liveness.enabled true }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end -}}
+ readinessProbe:
+ httpGet:
+ path: "_cluster/health?wait_for_status=yellow&timeout=120s"
+ port: {{ .Values.service.internalPort }}
+ scheme: HTTP
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ env:
+ - name: ENVNAME
+ value: {{ .Values.global.env.name }}
+ - name: HOST_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: ES_HEAP_SIZE
+ value: {{ .Values.config.elasticHeapSize }}
+ volumeMounts:
+ - name: {{ include "common.fullname" . }}-environments
+ mountPath: /root/chef-solo/environments/
+ - name: {{ include "common.fullname" . }}-localtime
+ mountPath: /etc/localtime
+ readOnly: true
+ - name: {{ include "common.fullname" . }}-logs
+ mountPath: /var/lib/jetty/logs
+ - name: {{ include "common.fullname" . }}-data
+ mountPath: /usr/share/elasticsearch/data/
+ resources:
+{{ toYaml .Values.resources | indent 12 }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+ {{- end }}
+ volumes:
+ - name: {{ include "common.fullname" . }}-localtime
+ hostPath:
+ path: /etc/localtime
+ {{- if .Values.persistence.enabled }}
+ - name: {{ include "common.fullname" . }}-data
+ persistentVolumeClaim:
+ claimName: {{ include "common.fullname" . }}
+ {{- else }}
+ emptyDir: {}
+ {{- end }}
+ - name: {{ include "common.fullname" . }}-environments
+ configMap:
+ name: {{ .Release.Name }}-sdc-environments-configmap
+ defaultMode: 0755
+ - name: {{ include "common.fullname" . }}-logs
+ emptyDir: {}
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key" \ No newline at end of file