diff --git a/code/kubes/nocodb/nocodb/nocodb-server.yaml b/code/kubes/nocodb/nocodb/nocodb-server.yaml index 2f1ac86..1023bf2 100644 --- a/code/kubes/nocodb/nocodb/nocodb-server.yaml +++ b/code/kubes/nocodb/nocodb/nocodb-server.yaml @@ -10,6 +10,7 @@ spec: selector: matchLabels: pod-label: nocodb-server-pod + replicas: 4 template: metadata: labels: @@ -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 diff --git a/code/kubes/nocodb/today.py b/code/kubes/nocodb/today.py index 9ab63db..fde0fe3 100755 --- a/code/kubes/nocodb/today.py +++ b/code/kubes/nocodb/today.py @@ -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), @@ -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__": diff --git a/code/kubes/web/org/xinutec/amun/assetlinks.yaml b/code/kubes/web/org/xinutec/amun/assetlinks.yaml new file mode 100644 index 0000000..11e05e5 --- /dev/null +++ b/code/kubes/web/org/xinutec/amun/assetlinks.yaml @@ -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"] + } + }] diff --git a/code/kubes/web/org.xinutec.amun.yaml b/code/kubes/web/org/xinutec/amun/service.yaml similarity index 78% rename from code/kubes/web/org.xinutec.amun.yaml rename to code/kubes/web/org/xinutec/amun/service.yaml index abcd8f1..58d8965 100644 --- a/code/kubes/web/org.xinutec.amun.yaml +++ b/code/kubes/web/org/xinutec/amun/service.yaml @@ -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