fp/charts/fp/templates/capture.yaml
CJ_Clippy ebe65e067d
Some checks failed
ci / build (push) Failing after 7m5s
progress
2024-07-30 12:34:25 -08:00

109 lines
2.6 KiB
YAML

---
apiVersion: v1
kind: Service
metadata:
name: capture-api
namespace: futureporn
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: capture
ports:
- name: http
port: {{ .Values.capture.api.port }}
targetPort: http
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: capture-worker
namespace: futureporn
labels:
app.kubernetes.io/name: capture-worker
spec:
replicas: {{ .Values.capture.worker.replicas }}
selector:
matchLabels:
app: capture-worker
template:
metadata:
labels:
app: capture-worker
spec:
containers:
- name: capture-worker
image: "{{ .Values.capture.imageName }}"
env:
- name: FUNCTION
value: worker
- name: PGBOSS_URL
valueFrom:
secretKeyRef:
name: capture
key: pgbossUrl
- name: PORT
value: "{{ .Values.capture.api.port }}"
- name: S3_ENDPOINT
value: "{{ .Values.s3.endpoint }}"
- name: S3_REGION
value: "{{ .Values.s3.region }}"
- name: S3_BUCKET_NAME
value: "{{ .Values.s3.buckets.usc }}"
- name: S3_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: capture
key: s3AccessKeyId
- name: S3_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: capture
key: s3SecretAccessKey
resources:
limits:
cpu: 250m
memory: 512Mi
restartPolicy: Always
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: capture-api
namespace: futureporn
labels:
app.kubernetes.io/name: capture
spec:
replicas: {{ .Values.capture.api.replicas }}
selector:
matchLabels:
app: capture-api
template:
metadata:
labels:
app: capture-api
spec:
containers:
- name: capture
image: "{{ .Values.capture.imageName }}"
ports:
- name: http
containerPort: {{ .Values.capture.api.port }}
env:
- name: FUNCTION
value: api
- name: PGBOSS_URL
valueFrom:
secretKeyRef:
name: capture
key: pgbossUrl
- name: PORT
value: "{{ .Values.capture.api.port }}"
resources:
limits:
cpu: 100m
memory: 128Mi
restartPolicy: Always