feat: IngressのproxyBodySizeもuploadMaxSizeに自動連動 (v8.5.9-c)
Helm Chart Release / release-chart (push) Successful in 5s
Helm Chart Release / release-chart (push) Successful in 5s
uploadMaxSizeでnginx/PHPのアップロード上限は連動していたが、 ingress.enabled: true の場合、ingress-nginx側にも独自の上限 (デフォルト1MB)があり、そこで先に弾かれるケースが残っていた。 templates/ingress.yaml で、ingress.annotationsに nginx.ingress.kubernetes.io/proxy-body-sizeが明示指定されていない 場合、uploadMaxSizeの値を自動的に付与するようにした(merge使用、 明示指定があればそちらを優先)。 これでuploadMaxSize 1箇所の設定でnginx・PHP・Ingressの3箇所すべてに 反映される。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+8
-4
@@ -23,20 +23,24 @@ service:
|
||||
port: 80
|
||||
|
||||
# アップロード可能な最大サイズ
|
||||
# nginxの client_max_body_size と、PHPの upload_max_filesize / post_max_size に
|
||||
# 同じ値を反映する(両方を揃えないと、どちらか一方の上限で失敗するため)
|
||||
# 以下3箇所に同じ値を反映する(どれか一つでも小さいと、そこで上限に達して失敗するため):
|
||||
# - nginx(Podコンテナ内)の client_max_body_size
|
||||
# - PHPの upload_max_filesize / post_max_size
|
||||
# - ingress.enabled: true の場合、ingress-nginxの nginx.ingress.kubernetes.io/proxy-body-size
|
||||
# 単位はnginx/PHP共通でk/m/g(大文字小文字問わず)が使用可能(例: "100m", "1g")
|
||||
uploadMaxSize: "100m"
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
# nginx.ingress.kubernetes.io/proxy-body-size は uploadMaxSize の値が自動的に付与されるため
|
||||
# 明示的に指定する必要はない(Ingress側の上限もnginx/PHPと揃う)
|
||||
# 別の値にしたい場合や別コントローラーを使う場合は、ここに明示指定すれば上書きされる
|
||||
annotations: {}
|
||||
# {
|
||||
# acme.cert-manager.io/http01-ingress-class: "nginx",
|
||||
# cert-manager.io/cluster-issuer: "letsencrypt-issuer",
|
||||
# nginx.ingress.kubernetes.io/from-to-www-redirect: "true",
|
||||
# nginx.ingress.kubernetes.io/proxy-body-size: "100m"
|
||||
# nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
|
||||
# }
|
||||
hosts:
|
||||
- host: example.tld
|
||||
|
||||
Reference in New Issue
Block a user