add ingress / headers for proxy-body-size #22

Open
opened 2025-05-05 14:08:29 +00:00 by zramsay · 0 comments
Member
  1. For example, this script is run as a cron job every minute in order for deployed apps to handle large photo uploads.
$ cat ingress-patch/increase-proxy.sh 
#!/bin/bash

# to avoid using kubie
export KUBECONFIG=/home/dev/.kube/config-default.yaml
kubectl config use-context vs-narwhal

LATEST=$(kubectl get ingress -A --sort-by=.metadata.creationTimestamp | tail -n 1)

echo "latest: $LATEST"

NAMESPACE=$(echo "$LATEST" | awk '{print $1}')
INGRESS=$(echo "$LATEST" | awk '{print $2}')

RESULT=$(kubectl patch ingress $INGRESS -n $NAMESPACE -p '{"metadata":{"annotations":{"nginx.ingress.kubernetes.io/proxy-body-size":"50m"}}}')

echo "result: $RESULT"
  1. In another case, headers are added manually for each deployment
1. For example, this script is run as a cron job every minute in order for deployed apps to handle large photo uploads. ``` $ cat ingress-patch/increase-proxy.sh #!/bin/bash # to avoid using kubie export KUBECONFIG=/home/dev/.kube/config-default.yaml kubectl config use-context vs-narwhal LATEST=$(kubectl get ingress -A --sort-by=.metadata.creationTimestamp | tail -n 1) echo "latest: $LATEST" NAMESPACE=$(echo "$LATEST" | awk '{print $1}') INGRESS=$(echo "$LATEST" | awk '{print $2}') RESULT=$(kubectl patch ingress $INGRESS -n $NAMESPACE -p '{"metadata":{"annotations":{"nginx.ingress.kubernetes.io/proxy-body-size":"50m"}}}') echo "result: $RESULT" ``` 2. In another case, headers are added manually for each deployment
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/testnet-ops#22
No description provided.