apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "firecrawl.fullname" . }}-api namespace: {{ .Values.namespace.name }} labels: {{- include "firecrawl.labels" . | nindent 4 }} app.kubernetes.io/component: api epcot.theme/service: spaceship-earth spec: replicas: {{ .Values.api.replicaCount }} selector: matchLabels: {{- include "firecrawl.selectorLabels" . | nindent 6 }} app.kubernetes.io/component: api template: metadata: labels: {{- include "firecrawl.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: api epcot.theme/service: spaceship-earth spec: terminationGracePeriodSeconds: 180 containers: - name: api image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: ["node"] args: ["--max-old-space-size=6144", "dist/src/index.js"] envFrom: - configMapRef: name: {{ include "firecrawl.fullname" . }}-config env: - name: FLY_PROCESS_GROUP value: "app" - name: NUQ_POD_NAME valueFrom: fieldRef: fieldPath: metadata.name ports: - containerPort: 3002 name: http resources: {{- toYaml .Values.api.resources | nindent 12 }} livenessProbe: httpGet: path: /v0/health/liveness port: 3002 initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 5 successThreshold: 1 failureThreshold: 3 readinessProbe: httpGet: path: /v0/health/readiness port: 3002 initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 5 successThreshold: 1 failureThreshold: 3 --- apiVersion: v1 kind: Service metadata: name: {{ include "firecrawl.fullname" . }}-api namespace: {{ .Values.namespace.name }} labels: {{- include "firecrawl.labels" . | nindent 4 }} app.kubernetes.io/component: api spec: type: {{ .Values.api.service.type }} ports: - port: {{ .Values.api.service.port }} targetPort: http protocol: TCP name: http selector: {{- include "firecrawl.selectorLabels" . | nindent 4 }} app.kubernetes.io/component: api