Files
deprecated-helm-charts/stable/apm-server/templates/deployment.yaml
T
Ali Essam 37ae135f88 [stable/apm-server] Add support for Service and Deployment (#11661)
* [stable/apm-server] Add support for Deployment

Signed-off-by: Ali Essam <ali.essam.arafa@gmail.com>

* [stable/apm-server] Update labels & apiVersion

Signed-off-by: Ali Essam <ali.essam.arafa@gmail.com>

* [stable/apm-server] Bump version to 1.0.0

Signed-off-by: Ali Essam <ali.essam.arafa@gmail.com>

* feat(probes): add probes to deployment. Set default host as 0.0.0.0

Signed-off-by: Mahdi Dibaiee <mdibaiee@aol.com>

* bump version for breaking change

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>
2019-04-15 04:38:03 -07:00

106 lines
3.1 KiB
YAML

{{- if eq .Values.kind "Deployment" }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "apm-server.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "apm-server.name" . }}
helm.sh/chart: {{ include "apm-server.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "apm-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
minReadySeconds: 10
strategy:
{{ toYaml .Values.updateStrategy | indent 4 }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "apm-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- range $key, $value := .Values.podLabels }}
{{ $key }}: {{ $value }}
{{- end }}
annotations:
checksum/secret: {{ toYaml .Values.config | sha256sum }}
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "-e"
{{- if .Values.plugins }}
- "--plugin"
- {{ .Values.plugins | join "," | quote }}
{{- end }}
{{- if .Values.extraArgs }}
{{ toYaml .Values.extraArgs | indent 8 }}
{{- end }}
env:
{{- range $key, $value := .Values.extraVars }}
- name: {{ $key }}
value: {{ $value }}
{{- end }}
ports:
- name: http
containerPort: 8200
protocol: TCP
livenessProbe:
httpGet:
path: /healthcheck
port: http
initialDelaySeconds: 60
readinessProbe:
httpGet:
path: /healthcheck
port: http
initialDelaySeconds: 60
securityContext:
runAsUser: 0
resources:
{{ toYaml .Values.resources | indent 10 }}
volumeMounts:
- name: apm-server-config
mountPath: /usr/share/apm-server/apm-server.yml
readOnly: true
subPath: apm-server.yml
- name: data
mountPath: /usr/share/apm-server/data
{{- if .Values.extraVolumeMounts }}
{{ toYaml .Values.extraVolumeMounts | indent 8 }}
{{- end }}
volumes:
- name: apm-server-config
secret:
secretName: {{ template "apm-server.fullname" . }}
- name: data
hostPath:
path: /var/lib/apm-server
type: DirectoryOrCreate
{{- if .Values.extraVolumes }}
{{ toYaml .Values.extraVolumes | indent 6 }}
{{- end }}
terminationGracePeriodSeconds: 60
serviceAccountName: {{ template "apm-server.serviceAccountName" . }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- end }}