|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "mcp-victorialogs.fullname" . }} |
| 5 | + labels: {{ include "mcp-victorialogs.labels" . | nindent 4 }} |
| 6 | +spec: |
| 7 | + replicas: {{ .Values.replicaCount }} |
| 8 | + selector: |
| 9 | + matchLabels: {{ include "mcp-victorialogs.selectorLabels" . | nindent 6 }} |
| 10 | + template: |
| 11 | + metadata: |
| 12 | + {{- with .Values.podAnnotations }} |
| 13 | + annotations: {{ toYaml . | nindent 8 }} |
| 14 | + {{- end }} |
| 15 | + labels: |
| 16 | + {{- include "mcp-victorialogs.labels" . | nindent 8 }} |
| 17 | + {{- with .Values.podLabels }} |
| 18 | + {{- toYaml . | nindent 8 }} |
| 19 | + {{- end }} |
| 20 | + spec: |
| 21 | + {{- with .Values.imagePullSecrets }} |
| 22 | + imagePullSecrets: {{ toYaml . | nindent 8 }} |
| 23 | + {{- end }} |
| 24 | + serviceAccountName: {{ include "mcp-victorialogs.serviceAccountName" . }} |
| 25 | + {{- with .Values.podSecurityContext }} |
| 26 | + securityContext: {{ toYaml . | nindent 8 }} |
| 27 | + {{- end }} |
| 28 | + containers: |
| 29 | + - name: {{ .Chart.Name }} |
| 30 | + {{- with .Values.securityContext }} |
| 31 | + securityContext: {{ toYaml . | nindent 12 }} |
| 32 | + {{- end }} |
| 33 | + {{- $repo := .Values.image.repository }} |
| 34 | + {{- with .Values.image.registry }} |
| 35 | + {{- $repo = printf "%s/%s" . $repo }} |
| 36 | + {{- end }} |
| 37 | + image: "{{ $repo }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 38 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 39 | + env: |
| 40 | + - name: MCP_LISTEN_ADDR |
| 41 | + value: "0.0.0.0:{{ .Values.service.port }}" |
| 42 | + - name: MCP_SERVER_MODE |
| 43 | + value: "{{ .Values.mcp.mode }}" |
| 44 | + - name: VL_INSTANCE_ENTRYPOINT |
| 45 | + value: "{{ required ".Values.vl.entrypoint should be set" .Values.vl.entrypoint }}" |
| 46 | + {{- with .Values.vl.bearerToken }} |
| 47 | + - name: VL_INSTANCE_BEARER_TOKEN |
| 48 | + {{- if kindIs "map" . }} |
| 49 | + valueFrom: {{ toYaml . | nindent 16 }} |
| 50 | + {{- else }} |
| 51 | + value: "{{ . }}" |
| 52 | + {{- end }} |
| 53 | + {{- end }} |
| 54 | + {{- with .Values.vl.headers }} |
| 55 | + - name: VL_INSTANCE_HEADERS |
| 56 | + value: "{{ join "," . }}" |
| 57 | + {{- end }} |
| 58 | + {{- with .Values.mcp.disable.resources }} |
| 59 | + - name: MCP_DISABLE_RESOURCES |
| 60 | + value: "{{ . }}" |
| 61 | + {{- end }} |
| 62 | + {{- with .Values.mcp.disable.tools }} |
| 63 | + - name: MCP_DISABLED_TOOLS |
| 64 | + value: "{{ join "," . }}" |
| 65 | + {{- end }} |
| 66 | + {{- with .Values.mcp.heartbeatInterval }} |
| 67 | + - name: MCP_HEARTBEAT_INTERVAL |
| 68 | + value: "{{ . }}" |
| 69 | + {{- end }} |
| 70 | + {{- with .Values.env }} |
| 71 | + {{- toYaml . | nindent 12 }} |
| 72 | + {{- end }} |
| 73 | + ports: |
| 74 | + - name: http |
| 75 | + containerPort: {{ .Values.service.port }} |
| 76 | + protocol: TCP |
| 77 | + {{- with .Values.livenessProbe }} |
| 78 | + livenessProbe: {{ toYaml . | nindent 12 }} |
| 79 | + {{- end }} |
| 80 | + {{- with .Values.readinessProbe }} |
| 81 | + readinessProbe: {{ toYaml . | nindent 12 }} |
| 82 | + {{- end }} |
| 83 | + {{- with .Values.resources }} |
| 84 | + resources: {{ toYaml . | nindent 12 }} |
| 85 | + {{- end }} |
| 86 | + {{- with .Values.volumeMounts }} |
| 87 | + volumeMounts: {{ toYaml . | nindent 12 }} |
| 88 | + {{- end }} |
| 89 | + {{- with .Values.volumes }} |
| 90 | + volumes: {{ toYaml . | nindent 8 }} |
| 91 | + {{- end }} |
| 92 | + {{- with .Values.nodeSelector }} |
| 93 | + nodeSelector: {{ toYaml . | nindent 8 }} |
| 94 | + {{- end }} |
| 95 | + {{- with .Values.affinity }} |
| 96 | + affinity: {{ toYaml . | nindent 8 }} |
| 97 | + {{- end }} |
| 98 | + {{- with .Values.tolerations }} |
| 99 | + tolerations: {{ toYaml . | nindent 8 }} |
| 100 | + {{- end }} |
0 commit comments