Skip to content

Commit

Permalink
Give nocodb 4 replicas.
Browse files Browse the repository at this point in the history
  • Loading branch information
pippijn committed Oct 27, 2024
1 parent a8290cf commit 1b41e22
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
3 changes: 2 additions & 1 deletion code/kubes/nocodb/nocodb/nocodb-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
selector:
matchLabels:
pod-label: nocodb-server-pod
replicas: 4
template:
metadata:
labels:
Expand All @@ -22,7 +23,7 @@ spec:
claimName: nocodb-storage
containers:
- name: nocodb
image: nocodb/nocodb:latest
image: nocodb/nocodb:0.257.2
imagePullPolicy: Always
volumeMounts:
- name: server-storage
Expand Down
9 changes: 5 additions & 4 deletions code/kubes/nocodb/today.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ def nutrient_order(nutrient_names, k):
return -nutrient_names.index(k)


def print_ingredients(meal, ingredients, nutrient_names):
print(f"\n## {meal}\n")
def print_ingredients(ingredients, nutrient_names):
keys = sorted(
(k for k in ingredients[0].keys() if k not in ("Name", "UpdatedAt")),
key=lambda k: nutrient_order(nutrient_names, k),
Expand Down Expand Up @@ -173,11 +172,13 @@ def main():
meals, date, nutrient_names = db.today()
print(f"# {date}")
for meal, ingredients in meals.items():
print_ingredients(meal, ingredients, nutrient_names)
print(f"\n## {meal}\n")
print_ingredients(ingredients, nutrient_names)

sum_amounts(total, (ingredient for ingredient in ingredients if ingredient["Name"] == "Total"))

print_ingredients("Total", [total], nutrient_names)
print(f"\n## Total\n")
print_ingredients([total], nutrient_names)


if __name__ == "__main__":
Expand Down
23 changes: 23 additions & 0 deletions code/kubes/web/org/xinutec/amun/assetlinks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# First, create a ConfigMap whose contents are used
# as the nginx.conf file in the web server.
# This server uses /var/www/html as its
# root document directory. When the server gets a
# request for *.php, it will forward that request
# to our PHP-FPM container.
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: web
name: assetlinks-config
data:
assetlinks.json: |
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "org.xinutec.health",
"sha256_cert_fingerprints":
["FF:2A:CF:7B:DD:CC:F1:03:3E:E8:B2:27:7C:A2:E3:3C:DE:13:DB:AC:8E:EB:3A:B9:72:A1:0E:26:8A:F5:EC:AF"]
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ spec:
labels:
run: httpd-amun
spec:
volumes:
- name: assetlinks-config-volume
configMap:
name: assetlinks-config
containers:
- name: httpd-amun
image: nginx
ports:
- containerPort: 80
volumeMounts:
- name: assetlinks-config-volume
mountPath: /usr/share/nginx/html/.well-known/assetlinks.json
subPath: assetlinks.json
---
apiVersion: v1
kind: Service
Expand Down

0 comments on commit 1b41e22

Please sign in to comment.