pinpoint-collector deployment

This commit is contained in:
JacksChoco 2020-08-01 23:06:51 +09:00
parent fb54e8e5cb
commit 9e4b7dd5c1
4 changed files with 145 additions and 0 deletions

View File

@ -0,0 +1,6 @@
apiVersion: v1
name: pinpoint-collector
description: Helm chart for deploying Pinpoint collector
keywords:
- pinpoint
- collector

View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "pinpoint-collector.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "pinpoint-collector.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "pinpoint-collector.chart" -}}
{{- .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@ -0,0 +1,98 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "pinpoint-collector.name" . }}
chart: {{ template "pinpoint-collector.chart" . }}
component: "collector"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "pinpoint-collector.fullname" . }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "pinpoint-collector.name" . }}
component: "collector"
release: {{ .Release.Name }}
strategy:
rollingUpdate:
maxSurge: {{ .Values.rollingMaxSurge }}
maxUnavailable: {{ .Values.rollingMaxUnavailable }}
template:
metadata:
labels:
app: {{ template "pinpoint-collector.name" . }}
component: "collector"
release: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
containers:
- name: pinpoint-collector
{{- if contains "/" .Values.image }}
image: "{{ .Values.image }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.global.tag }}"
{{- end }}
imagePullPolicy: Always
env:
- name: CLUSTER_ENABLE
value: "{{ .Values.cluster.enalbe }}"
- name: CLUSTER_ZOOKEEPER_ADDRESS
value: "{{ .Values.cluster.zookeeperAddress }}"
- name: HBASE_HOST
value: "{{ .Values.hbase.host }}"
- name: HBASE_PORT
value: "{{ .Values.hbase.host }}"
- name: SPRING_PROFILES
value: "{{ .Values.profiles }}"
- name: FLINK_CLUSTER_ENABLE
value: "{{ .Values.flink.enable }}"
- name: FLINK_CLUSTER_ZOOKEEPER_ADDRESS
value: "{{ .Values.flink.zookeeperAddress }}"
- name: JAVA_OPTS
value: -Dspring.profiles.active=${SPRING_PROFILES}
- name: DEBUG_LEVEL
value: "{{ .Values.debugLevel }}"
ports:
- containerPort: 9080
- containerPort: 9991
- containerPort: 9992
- containerPort: 9993
- containerPort: 9994
- containerPort: 9995
- containerPort: 9996
livenessProbe:
failureThreshold: 3
httpGet:
path: /serverTime.pinpoint
port: 9080
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
name: pinpoint-collector
readinessProbe:
failureThreshold: 3
httpGet:
path: /serverTime.pinpoint
port: 9080
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
resources:
{{- if .Values.resources }}
{{ toYaml .Values.resources | indent 12 }}
{{- end }}
affinity:
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 6 }}
{{- end }}

View File

@ -0,0 +1,9 @@
#
# pinpoint collector configuration
#
replicaCount: 1
rollingMaxSurge: 1
rollingMaxUnavailable: 1
tolerations: []
resources: {}
image: pinpointdocker/pinpoint-collector:2.0.4