-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathhyperdx-deployment.yaml
More file actions
128 lines (128 loc) · 5.25 KB
/
hyperdx-deployment.yaml
File metadata and controls
128 lines (128 loc) · 5.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "clickstack.fullname" . }}-app
labels:
{{- include "clickstack.labels" . | nindent 4 }}
app.kubernetes.io/component: hyperdx
app: {{ include "clickstack.fullname" . }}
{{- if .Values.hyperdx.labels }}
{{- with .Values.hyperdx.labels }}
{{- toYaml . | nindent 4 }}
{{- end -}}
{{- end }}
spec:
replicas: {{ .Values.hyperdx.replicas | default 1 }}
selector:
matchLabels:
{{- include "clickstack.selectorLabels" . | nindent 6 }}
app: {{ include "clickstack.fullname" . }}
template:
metadata:
labels:
{{- include "clickstack.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: hyperdx
app: {{ include "clickstack.fullname" . }}
annotations:
{{- if .Values.hyperdx.annotations }}
{{- with .Values.hyperdx.annotations }}
{{- toYaml . | nindent 8 }}
{{- end -}}
{{- end }}
spec:
{{- if .Values.hyperdx.nodeSelector }}
nodeSelector:
{{- toYaml .Values.hyperdx.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.hyperdx.tolerations }}
tolerations:
{{- toYaml .Values.hyperdx.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.hyperdx.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml .Values.hyperdx.topologySpreadConstraints | nindent 8 }}
{{- end }}
{{- if .Values.hyperdx.priorityClassName }}
priorityClassName: {{ .Values.hyperdx.priorityClassName | quote }}
{{- end }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.mongodb.enabled }}
initContainers:
- name: wait-for-mongodb
image: {{ .Values.hyperdx.waitForMongodb.image }}
imagePullPolicy: {{ .Values.hyperdx.waitForMongodb.pullPolicy }}
command: ['sh', '-c', 'until nc -z {{ include "clickstack.fullname" . }}-mongodb {{ .Values.mongodb.port }}; do echo waiting for mongodb; sleep 2; done;']
{{- end }}
containers:
- name: app
image: "{{ .Values.hyperdx.image.repository }}:{{ .Values.hyperdx.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.hyperdx.image.pullPolicy }}
ports:
- name: app-port
containerPort: {{ .Values.hyperdx.appPort }}
- name: api-port
containerPort: {{ .Values.hyperdx.apiPort }}
- name: opamp-port
containerPort: {{ .Values.hyperdx.opampPort }}
{{- if .Values.hyperdx.resources }}
resources:
{{- toYaml .Values.hyperdx.resources | nindent 12 }}
{{- end }}
{{- if .Values.hyperdx.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /health
port: {{ .Values.hyperdx.apiPort }}
initialDelaySeconds: {{ .Values.hyperdx.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.hyperdx.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.hyperdx.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.hyperdx.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.hyperdx.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /health
port: {{ .Values.hyperdx.apiPort }}
initialDelaySeconds: {{ .Values.hyperdx.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.hyperdx.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.hyperdx.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.hyperdx.readinessProbe.failureThreshold }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "clickstack.fullname" . }}-app-config
env:
- name: HYPERDX_API_KEY
valueFrom:
secretKeyRef:
name: {{ include "clickstack.fullname" . }}-app-secrets
key: api-key
{{- if .Values.hyperdx.useExistingConfigSecret }}
- name: DEFAULT_CONNECTIONS
valueFrom:
secretKeyRef:
name: {{ .Values.hyperdx.existingConfigSecret | quote }}
key: {{ .Values.hyperdx.existingConfigConnectionsKey | quote }}
optional: false
- name: DEFAULT_SOURCES
valueFrom:
secretKeyRef:
name: {{ .Values.hyperdx.existingConfigSecret | quote }}
key: {{ .Values.hyperdx.existingConfigSourcesKey | quote }}
optional: false
{{- else }}
{{- if .Values.hyperdx.defaultConnections }}
- name: DEFAULT_CONNECTIONS
value: {{ tpl .Values.hyperdx.defaultConnections . | quote }}
{{- end }}
{{- if .Values.hyperdx.defaultSources }}
- name: DEFAULT_SOURCES
value: {{ tpl .Values.hyperdx.defaultSources . | quote }}
{{- end }}
{{- end }}
{{- with .Values.hyperdx.env }}
{{- toYaml . | nindent 12 }}
{{- end }}