From 48a12e3e9fef5ef133f380fba635fb7e48404179 Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Sat, 30 Apr 2022 11:41:08 -0700 Subject: [PATCH] Update private instance deployment config to use custom stat var info (#1592) --- deploy/base/deployment.yaml | 6 + deploy/base/kustomization.yaml | 3 + deploy/base/memdb.json | 0 .../feedingamerica/kustomization.yaml | 4 + deploy/overlays/feedingamerica/memdb.json | 105 ++++++++++++++++++ 5 files changed, 118 insertions(+) create mode 100644 deploy/base/memdb.json create mode 100644 deploy/overlays/feedingamerica/memdb.json diff --git a/deploy/base/deployment.yaml b/deploy/base/deployment.yaml index 2a0e774ec0..03dc5520a4 100644 --- a/deploy/base/deployment.yaml +++ b/deploy/base/deployment.yaml @@ -47,6 +47,9 @@ spec: - name: ai-config configMap: name: ai-config + - name: memdb-config + configMap: + name: memdb-config containers: - name: website image: gcr.io/datcom-ci/datacommons-website:latest @@ -109,9 +112,12 @@ spec: - --serve_recon_service=true - --schema_path=/datacommons/mapping - --import_group_tables=$(IMPORT_GROUP_TABLES) + - --memdb_path=/datacommons/memdb volumeMounts: - name: schema-mapping mountPath: /datacommons/mapping + - name: memdb-config + mountPath: /datacommons/memdb env: - name: MIXER_PROJECT valueFrom: diff --git a/deploy/base/kustomization.yaml b/deploy/base/kustomization.yaml index 6936f9fcb1..e545a84051 100644 --- a/deploy/base/kustomization.yaml +++ b/deploy/base/kustomization.yaml @@ -30,3 +30,6 @@ configMapGenerator: - name: ai-config files: - ai.yaml + - name: memdb-config + files: + - memdb.json diff --git a/deploy/base/memdb.json b/deploy/base/memdb.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/deploy/overlays/feedingamerica/kustomization.yaml b/deploy/overlays/feedingamerica/kustomization.yaml index 1d527ea8a9..17764cf184 100644 --- a/deploy/overlays/feedingamerica/kustomization.yaml +++ b/deploy/overlays/feedingamerica/kustomization.yaml @@ -34,6 +34,10 @@ configMapGenerator: - mixerProject=datcom-feedingamerica - serviceName=website-esp.endpoints.datcom-feedingamerica.cloud.goog name: mixer-configmap + - name: memdb-config + behavior: replace + files: + - memdb.json patchesStrategicMerge: - |- diff --git a/deploy/overlays/feedingamerica/memdb.json b/deploy/overlays/feedingamerica/memdb.json new file mode 100644 index 0000000000..8a557024f7 --- /dev/null +++ b/deploy/overlays/feedingamerica/memdb.json @@ -0,0 +1,105 @@ +{ + "importName": "Feeding America", + "provenanceUrl": "https://www.feedingamerica.org/", + "dataDownloadUrl": "https://www.feedingamerica.org/", + "rootSvg": "g/Feeding_America", + "statVarGroups": { + "g/Feeding_America": { + "childStatVarGroups": [ + { + "id": "g/Child_FoodInsecure", + "specializedEntity": "Food Insecure Children" + }, + { + "id": "g/Person_FoodInsecure", + "specializedEntity": "Food Insecure People" + } + ], + "childStatVars": [ + { + "id": "Annual_FoodBudgetShortfall", + "searchNames": ["Annual Food Budget Shortfall"], + "displayName": "Annual Food Budget Shortfall" + }, + { + "id": "Mean_MealCost_Person_FoodSecure", + "searchNames": ["Food Secure Person Mean Meal Cost"], + "displayName": "Average Meal Cost for Food Secure Persons" + } + ] + }, + "g/Child_FoodInsecure": { + "childStatVarGroups": [ + { + "id": "g/Child_FoodInsecure_ChildNutritionBenefits", + "specializedEntity": "Child Nutrition Benefits" + } + ], + "childStatVars": [ + { + "id": "Count_Child_FoodInsecure", + "searchNames": ["Count of Food Insecure Child"], + "displayName": "Population" + } + ] + }, + "g/Child_FoodInsecure_ChildNutritionBenefits": { + "childStatVars": [ + { + "id": "Count_Child_FoodInsecure_EligibleForManyChildNutritionBenefits", + "searchNames": [ + "Count of Child Food Insecure Eligible for Many Child Nutrition Benefits" + ], + "displayName": "Eligible" + }, + { + "id": "Count_Child_FoodInsecure_IneligibleForChildNutritionBenefits", + "searchNames": [ + "Count of Child Food Insecure Ineligible for Many Child Nutrition Benefits" + ], + "displayName": "Ineligible" + } + ] + }, + "g/Person_FoodInsecure": { + "childStatVarGroups": [ + { + "id": "g/Person_FoodInsecure_FederalBenefits", + "specializedEntity": "Federal Benefits" + } + ], + "childStatVars": [ + { + "id": "Count_Person_FoodInsecure", + "searchNames": ["Count of Person Food Insecure"], + "displayName": "Population" + } + ] + }, + "g/Person_FoodInsecure_FederalBenefits": { + "childStatVars": [ + { + "id": "Count_Person_FoodInsecure_EligibleForAllFederalBenefits", + "searchNames": [ + "Count of Person with Food Insecure Eligible for All Federal Benefits" + ], + "displayName": "Eligible for All Federal Benefits" + }, + { + "id": "Count_Person_FoodInsecure_EligibleForSomeFederalBenefits", + "searchNames": [ + "Count of Person with Food Insecure Eligible for Some Federal Benefits" + ], + "displayName": "Eligible for Some Federal Benefits" + }, + { + "id": "Count_Person_FoodInsecure_IneligibleForFederalBenefits", + "searchNames": [ + "Count of Person with Food Insecure Ineligible for Federal Benefits" + ], + "displayName": "Ineligible for Federal Benefits" + } + ] + } + } +}