apiVersion: apps/v1 kind: StatefulSet metadata: name: clickhouse-{{ include "uptrace.fullname" . }} labels: app: clickhouse {{- include "uptrace.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: 1 {{- end }} serviceName: clickhouse-{{ include "uptrace.fullname" . }} selector: matchLabels: app: clickhouse {{- include "uptrace.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: app: clickhouse {{- include "uptrace.selectorLabels" . | nindent 8 }} spec: {{- with .Values.clickhouse.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "uptrace.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.clickhouse.image.repository }}:{{ .Values.clickhouse.image.tag | default "latest" }}" imagePullPolicy: {{ .Values.clickhouse.image.pullPolicy }} env: - name: CLICKHOUSE_DB value: uptrace volumeMounts: [] ports: - name: http containerPort: 8123 protocol: TCP - name: tcp containerPort: 9000 protocol: TCP livenessProbe: httpGet: path: / port: http readinessProbe: httpGet: path: / port: http resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} volumes: []