Skip to content

Commit

Permalink
Update private instance deployment config to use custom stat var info (
Browse files Browse the repository at this point in the history
  • Loading branch information
shifucun authored Apr 30, 2022
1 parent 8e11971 commit 48a12e3
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deploy/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions deploy/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ configMapGenerator:
- name: ai-config
files:
- ai.yaml
- name: memdb-config
files:
- memdb.json
Empty file added deploy/base/memdb.json
Empty file.
4 changes: 4 additions & 0 deletions deploy/overlays/feedingamerica/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- |-
Expand Down
105 changes: 105 additions & 0 deletions deploy/overlays/feedingamerica/memdb.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
}

0 comments on commit 48a12e3

Please sign in to comment.