|
| 1 | +{{- if .Values.otelCollector.enabled }} |
| 2 | +apiVersion: apps/v1 |
| 3 | +kind: StatefulSet |
| 4 | +metadata: |
| 5 | + name: otel-collector-sampler |
| 6 | + namespace: {{ .Release.Namespace }} |
| 7 | + labels: |
| 8 | + app: otel-collector-sampler |
| 9 | +spec: |
| 10 | + serviceName: otel-collector-sampler-headless |
| 11 | + replicas: {{ .Values.otelCollector.sampler.replicas }} |
| 12 | + selector: |
| 13 | + matchLabels: |
| 14 | + app: otel-collector-sampler |
| 15 | + template: |
| 16 | + metadata: |
| 17 | + labels: |
| 18 | + app: otel-collector-sampler |
| 19 | + annotations: |
| 20 | + checksum/config: {{ include (print $.Template.BasePath "/otel-collector-sampler-config.yaml") . | sha256sum }} |
| 21 | + spec: |
| 22 | + {{- if .Values.otelCollector.sampler.nodeSelector }} |
| 23 | + nodeSelector: |
| 24 | + {{- toYaml .Values.otelCollector.sampler.nodeSelector | nindent 8 }} |
| 25 | + {{- end }} |
| 26 | + {{- if .Values.otelCollector.sampler.tolerations }} |
| 27 | + tolerations: |
| 28 | + {{- toYaml .Values.otelCollector.sampler.tolerations | nindent 8 }} |
| 29 | + {{- end }} |
| 30 | + containers: |
| 31 | + - name: otel-collector-sampler |
| 32 | + image: {{ .Values.otelCollector.sampler.image }}:{{ .Values.otelCollector.sampler.imageTag }} |
| 33 | + imagePullPolicy: {{ .Values.otelCollector.sampler.imagePullPolicy | default "IfNotPresent" }} |
| 34 | + args: |
| 35 | + - "--config=/conf/otel-collector-config.yaml" |
| 36 | + ports: |
| 37 | + - name: otlp-grpc |
| 38 | + containerPort: 4317 |
| 39 | + protocol: TCP |
| 40 | + - name: otlp-http |
| 41 | + containerPort: 4318 |
| 42 | + protocol: TCP |
| 43 | + - name: health |
| 44 | + containerPort: 13133 |
| 45 | + protocol: TCP |
| 46 | + volumeMounts: |
| 47 | + - name: config |
| 48 | + mountPath: /conf |
| 49 | + resources: |
| 50 | + requests: |
| 51 | + memory: {{ .Values.otelCollector.sampler.resources.requests.memory }} |
| 52 | + cpu: {{ .Values.otelCollector.sampler.resources.requests.cpu }} |
| 53 | + limits: |
| 54 | + memory: {{ .Values.otelCollector.sampler.resources.limits.memory }} |
| 55 | + cpu: {{ .Values.otelCollector.sampler.resources.limits.cpu }} |
| 56 | + livenessProbe: |
| 57 | + httpGet: |
| 58 | + path: / |
| 59 | + port: health |
| 60 | + initialDelaySeconds: 30 |
| 61 | + periodSeconds: 10 |
| 62 | + readinessProbe: |
| 63 | + httpGet: |
| 64 | + path: / |
| 65 | + port: health |
| 66 | + initialDelaySeconds: 10 |
| 67 | + periodSeconds: 5 |
| 68 | + volumes: |
| 69 | + - name: config |
| 70 | + configMap: |
| 71 | + name: otel-collector-sampler-config |
| 72 | +{{- end }} |
0 commit comments