-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh: move notion garbage collector to its own worker (#7373)
Co-authored-by: Henry Fontanier <[email protected]>
- Loading branch information
1 parent
02e1e40
commit 07a85f3
Showing
8 changed files
with
108 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export const WORKFLOW_VERSION = 39; | ||
export const QUEUE_NAME = `notion-queue-v${WORKFLOW_VERSION}`; | ||
export const GARBAGE_COLLECT_QUEUE_NAME = `notion-gc-queue-v${WORKFLOW_VERSION}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
k8s/deployments/connectors-worker-notion-gc-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: connectors-worker-notion-gc-deployment | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: connectors-worker | ||
worker: notion-gc | ||
template: | ||
metadata: | ||
labels: | ||
app: connectors-worker | ||
name: connectors-worker-pod | ||
worker: notion-gc | ||
admission.datadoghq.com/enabled: "true" | ||
annotations: | ||
ad.datadoghq.com/web.logs: '[{"source": "connectors-worker","service": "connectors-worker","tags": ["env:prod"]}]' | ||
spec: | ||
containers: | ||
- name: web | ||
image: gcr.io/or1g1n-186209/connectors-image:latest | ||
command: ["npm", "run", "start:worker"] | ||
args: ["--", "--workers", "notion_garbage_collector"] | ||
imagePullPolicy: Always | ||
envFrom: | ||
- configMapRef: | ||
name: connectors-worker-specific-config | ||
- secretRef: | ||
name: connectors-secrets | ||
env: | ||
- name: DD_AGENT_HOST | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.hostIP | ||
|
||
volumeMounts: | ||
- name: cert-volume | ||
mountPath: /etc/certs | ||
- name: private-key-volume | ||
mountPath: /etc/private-keys | ||
|
||
resources: | ||
requests: | ||
cpu: 2000m | ||
memory: 4Gi | ||
|
||
limits: | ||
cpu: 2000m | ||
memory: 4Gi | ||
|
||
volumes: | ||
- name: cert-volume | ||
secret: | ||
secretName: temporal-cert | ||
|
||
- name: private-key-volume | ||
secret: | ||
secretName: github-app-private-key |