413请求实体太大(nginx openstack glance)

iqjalb3h  于 2023-10-17  发布在  Nginx
关注(0)|答案(1)|浏览(182)

使用Helm chart部署openstack。通过网络下载图像时出现问题;当尝试下载图像时,413 Request Entity Too Large。配置设置为默认nginx.ingress.kubernetes.io/proxy-body-size: "0"
Ingress部署代码的一部分,其中应用了Nginx设置:

ingress_component.yaml

ingress:
    node_port:
      enabled: false
      http_port: 30080
      https_port: 30443
    annotations:
      # NOTE(portdirect): if left blank this is populated from
      # .deployment.cluster.class
      kubernetes.io/ingress.class: null
      nginx.ingress.kubernetes.io/proxy-body-size: "0"
      nginx.ingress.kubernetes.io/configuration-snippet: |
        more_set_headers "X-Content-Type-Options: nosniff";
        more_set_headers "X-Frame-Options: deny";
        more_set_headers "X-Permitted-Cross-Domain-Policies: none";
        more_set_headers "Content-Security-Policy: script-src 'self'";
external_policy_local: false

ingress-kube-system.yaml

ingress:
    node_port:
      enabled: false
      http_port: 30080
      https_port: 30443
    annotations:
      # NOTE(portdirect): if left blank this is populated from
      # .deployment.cluster.class
      kubernetes.io/ingress.class: null
      nginx.ingress.kubernetes.io/proxy-body-size: "0"
      nginx.ingress.kubernetes.io/configuration-snippet: |
        more_set_headers "X-Content-Type-Options: nosniff";
        more_set_headers "X-Frame-Options: deny";
        more_set_headers "X-Permitted-Cross-Domain-Policies: none";
        more_set_headers "Content-Security-Policy: script-src 'self'";

我尝试添加参数nginx.ingress.kubernetes.io/client-body-buffer-size: "0",结果相同。

相关问题