From 88769f9f1aaebcae232d46717fb9f3b22a19df56 Mon Sep 17 00:00:00 2001 From: David Gauldie Date: Thu, 26 Sep 2024 15:25:04 -0400 Subject: [PATCH] add table extraction taskrunner --- .../kustomization.yaml | 6 ++++ ...able-extraction-taskrunner-deployment.yaml | 31 ++++++++++++++++ .../overlays/prod/base/kustomization.yaml | 1 + ...tion-extraction-taskrunner-deployment.yaml | 2 +- ...able-extraction-taskrunner-deployment.yaml | 36 +++++++++++++++++++ ...text-extraction-taskrunner-deployment.yaml | 2 +- .../overlays/askem-dev/kustomization.yaml | 5 +++ .../askem-production/kustomization.yaml | 5 +++ .../overlays/askem-staging/kustomization.yaml | 5 +++ 9 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 kubernetes/base/services/table-extraction-taskrunner/kustomization.yaml create mode 100644 kubernetes/base/services/table-extraction-taskrunner/table-extraction-taskrunner-deployment.yaml create mode 100644 kubernetes/overlays/prod/base/services/table-extraction-taskrunner/table-extraction-taskrunner-deployment.yaml diff --git a/kubernetes/base/services/table-extraction-taskrunner/kustomization.yaml b/kubernetes/base/services/table-extraction-taskrunner/kustomization.yaml new file mode 100644 index 00000000..1aae7132 --- /dev/null +++ b/kubernetes/base/services/table-extraction-taskrunner/kustomization.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: terarium +resources: + - table-extraction-taskrunner-deployment.yaml diff --git a/kubernetes/base/services/table-extraction-taskrunner/table-extraction-taskrunner-deployment.yaml b/kubernetes/base/services/table-extraction-taskrunner/table-extraction-taskrunner-deployment.yaml new file mode 100644 index 00000000..31c0e5b0 --- /dev/null +++ b/kubernetes/base/services/table-extraction-taskrunner/table-extraction-taskrunner-deployment.yaml @@ -0,0 +1,31 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: table-extraction-taskrunner + labels: + software.uncharted.terarium/name: table-extraction-taskrunner + software.uncharted.terarium/component: taskrunner + software.uncharted.terarium/service: table-extraction + software.uncharted.terarium/part-of: services +spec: + replicas: 1 + selector: + matchLabels: + software.uncharted.terarium/name: table-extraction-taskrunner + strategy: + type: Recreate + template: + metadata: + labels: + software.uncharted.terarium/name: table-extraction-taskrunner + spec: + containers: + - name: table-extraction-taskrunner + image: table-extraction-taskrunner-image + imagePullPolicy: Always + resources: {} + imagePullSecrets: + - name: ghcr-cred + restartPolicy: Always +status: {} diff --git a/kubernetes/overlays/prod/base/kustomization.yaml b/kubernetes/overlays/prod/base/kustomization.yaml index c11eefbc..65f8408d 100644 --- a/kubernetes/overlays/prod/base/kustomization.yaml +++ b/kubernetes/overlays/prod/base/kustomization.yaml @@ -46,6 +46,7 @@ patches: - path: services/skema/skema-memgraph-deployment.yaml - path: services/skema/skema-rs-deployment.yaml - path: services/skema/skema-unified-deployment.yaml + - path: services/table-extraction-taskrunner/table-extraction-taskrunner-deployment.yaml - path: services/text-extraction-taskrunner/text-extraction-taskrunner-deployment.yaml configMapGenerator: diff --git a/kubernetes/overlays/prod/base/services/equation-extraction-taskrunner/equation-extraction-taskrunner-deployment.yaml b/kubernetes/overlays/prod/base/services/equation-extraction-taskrunner/equation-extraction-taskrunner-deployment.yaml index d8efbb1c..61b4b9b3 100644 --- a/kubernetes/overlays/prod/base/services/equation-extraction-taskrunner/equation-extraction-taskrunner-deployment.yaml +++ b/kubernetes/overlays/prod/base/services/equation-extraction-taskrunner/equation-extraction-taskrunner-deployment.yaml @@ -28,4 +28,4 @@ spec: name: mq-creds key: password - name: TERARIUM_TASKRUNNER_REQUEST-TYPE - value: 'equation-extraction' + value: 'equation_extraction' diff --git a/kubernetes/overlays/prod/base/services/table-extraction-taskrunner/table-extraction-taskrunner-deployment.yaml b/kubernetes/overlays/prod/base/services/table-extraction-taskrunner/table-extraction-taskrunner-deployment.yaml new file mode 100644 index 00000000..1bddec5f --- /dev/null +++ b/kubernetes/overlays/prod/base/services/table-extraction-taskrunner/table-extraction-taskrunner-deployment.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: table-extraction-taskrunner +spec: + strategy: + type: RollingUpdate + template: + spec: + containers: + - name: table-extraction-taskrunner + imagePullPolicy: Always + env: + - name: ASKEM_DOC_AI_API_KEY + valueFrom: + secretKeyRef: + name: chat-gpt-secrets + key: chatgptkey + - name: SPRING_RABBITMQ_ADDRESSES + valueFrom: + secretKeyRef: + name: mq-creds + key: address + - name: TERARIUM_MQ-USERNAME + valueFrom: + secretKeyRef: + name: mq-creds + key: username + - name: TERARIUM_MQ-PASSWORD + valueFrom: + secretKeyRef: + name: mq-creds + key: password + - name: TERARIUM_TASKRUNNER_REQUEST-TYPE + value: 'table_extraction' diff --git a/kubernetes/overlays/prod/base/services/text-extraction-taskrunner/text-extraction-taskrunner-deployment.yaml b/kubernetes/overlays/prod/base/services/text-extraction-taskrunner/text-extraction-taskrunner-deployment.yaml index 03241703..c6c3d6a5 100644 --- a/kubernetes/overlays/prod/base/services/text-extraction-taskrunner/text-extraction-taskrunner-deployment.yaml +++ b/kubernetes/overlays/prod/base/services/text-extraction-taskrunner/text-extraction-taskrunner-deployment.yaml @@ -28,4 +28,4 @@ spec: name: mq-creds key: password - name: TERARIUM_TASKRUNNER_REQUEST-TYPE - value: 'text-extraction' + value: 'text_extraction' diff --git a/kubernetes/overlays/prod/overlays/askem-dev/kustomization.yaml b/kubernetes/overlays/prod/overlays/askem-dev/kustomization.yaml index db4574b7..9fe3ad0f 100644 --- a/kubernetes/overlays/prod/overlays/askem-dev/kustomization.yaml +++ b/kubernetes/overlays/prod/overlays/askem-dev/kustomization.yaml @@ -118,6 +118,11 @@ images: newName: ghcr.io/darpa-askem/text-extraction-taskrunner newTag: 'latest' + # Table extraction (CPU) + - name: table-extraction-taskrunner-image + newName: ghcr.io/darpa-askem/table-extraction-taskrunner + newTag: 'latest' + # climate data - name: climate-data-image newName: ghcr.io/darpa-askem/climate-data-service diff --git a/kubernetes/overlays/prod/overlays/askem-production/kustomization.yaml b/kubernetes/overlays/prod/overlays/askem-production/kustomization.yaml index 76467534..e8fe900c 100644 --- a/kubernetes/overlays/prod/overlays/askem-production/kustomization.yaml +++ b/kubernetes/overlays/prod/overlays/askem-production/kustomization.yaml @@ -95,6 +95,11 @@ images: newName: ghcr.io/darpa-askem/text-extraction-taskrunner newTag: '2.21.3' + # Table extraction (CPU) + - name: table-extraction-taskrunner-image + newName: ghcr.io/darpa-askem/table-extraction-taskrunner + newTag: 'latest' + # Integration Dashboard - name: integration-dashboard-image newName: ghcr.io/darpa-askem/integration-dashboard diff --git a/kubernetes/overlays/prod/overlays/askem-staging/kustomization.yaml b/kubernetes/overlays/prod/overlays/askem-staging/kustomization.yaml index 7fbdc720..16fbfe1e 100644 --- a/kubernetes/overlays/prod/overlays/askem-staging/kustomization.yaml +++ b/kubernetes/overlays/prod/overlays/askem-staging/kustomization.yaml @@ -103,6 +103,11 @@ images: newName: ghcr.io/darpa-askem/text-extraction-taskrunner newTag: 'latest' + # Table extraction (CPU) + - name: table-extraction-taskrunner-image + newName: ghcr.io/darpa-askem/table-extraction-taskrunner + newTag: 'latest' + # climate data - name: climate-data-image newName: ghcr.io/darpa-askem/climate-data-service