Skip to content

Commit 4c36d81

Browse files
authored
Merge branch 'main' into fix/caSecret
2 parents 8d0cd90 + 9436a76 commit 4c36d81

File tree

13 files changed

+2121
-781
lines changed

13 files changed

+2121
-781
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
- name: Run Tests
7474
run: make cover
7575
- name: Upload coverage to Codecov
76-
uses: codecov/codecov-action@40a12dcee2df644d47232dde008099a3e9e4f865 # v3.1.2
76+
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # v3.1.3
7777
with:
7878
files: ./coverage.txt
7979

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ repos:
4545
- id: golangci-lint
4646
args: [--new-from-patch=/tmp/diff.patch]
4747
- repo: https://github.com/asottile/pyupgrade
48-
rev: v3.3.1
48+
rev: v3.3.2
4949
hooks:
5050
- id: pyupgrade
5151
- repo: https://github.com/PyCQA/isort

deployments/common/crds/k8s.nginx.org_virtualservers.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ spec:
8686
format: int64
8787
recordType:
8888
type: string
89+
gunzip:
90+
type: string
8991
host:
9092
type: string
9193
http-snippets:

deployments/helm-chart/crds/k8s.nginx.org_virtualservers.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ spec:
8686
format: int64
8787
recordType:
8888
type: string
89+
gunzip:
90+
type: string
8991
host:
9092
type: string
9193
http-snippets:

docs/content/configuration/virtualserver-and-virtualserverroute-resources.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ spec:
2626
host: cafe.example.com
2727
tls:
2828
secret: cafe-secret
29+
gunzip: on
2930
upstreams:
3031
- name: tea
3132
service: tea-svc
@@ -53,6 +54,7 @@ spec:
5354
| ---| ---| ---| --- |
5455
|``host`` | The host (domain name) of the server. Must be a valid subdomain as defined in RFC 1123, such as ``my-app`` or ``hello.example.com``. When using a wildcard domain like ``*.example.com`` the domain must be contained in double quotes. The ``host`` value needs to be unique among all Ingress and VirtualServer resources. See also [Handling Host and Listener Collisions](/nginx-ingress-controller/configuration/handling-host-and-listener-collisions). | ``string`` | Yes |
5556
|``tls`` | The TLS termination configuration. | [tls](#virtualservertls) | No |
57+
|``gunzip`` | Enables or disables [decompression](https://docs.nginx.com/nginx/admin-guide/web-server/compression/) of gzipped responses for clients. Allowed values are: "on" or "off". If the ``gunzip`` value is not set, it defaults to ``off``. | ``string`` | No |
5658
|``externalDNS`` | The externalDNS configuration for a VirtualServer. | [externalDNS](#virtualserverexternaldns) | No |
5759
|``dos`` | A reference to a DosProtectedResource, setting this enables DOS protection of the VirtualServer. | ``string`` | No |
5860
|``policies`` | A list of policies. | [[]policy](#virtualserverpolicy) | No |

internal/configs/version2/http.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ type Server struct {
7979
VSNamespace string
8080
VSName string
8181
DisableIPV6 bool
82+
Gunzip string
8283
}
8384

8485
// SSL defines SSL configuration for a server.

internal/configs/version2/nginx-plus.virtualserver.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ match {{ $m.Name }} {
6868
{{ end }}
6969

7070
server {
71+
{{ if (eq $s.Gunzip "on") }}gunzip {{ $s.Gunzip }};{{end}}
7172
listen 80{{ if $s.ProxyProtocol }} proxy_protocol{{ end }};
7273
{{ if not $s.DisableIPV6 }}listen [::]:80{{ if $s.ProxyProtocol }} proxy_protocol{{ end }};{{ end }}
7374

internal/configs/version2/nginx.virtualserver.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ limit_req_zone {{ $z.Key }} zone={{ $z.ZoneName }}:{{ $z.ZoneSize }} rate={{ $z.
4040

4141
{{ $s := .Server }}
4242
server {
43+
{{ if (eq $s.Gunzip "on") }}gunzip {{ $s.Gunzip }};{{end}}
4344
listen 80{{ if $s.ProxyProtocol }} proxy_protocol{{ end }};
4445
{{ if not $s.DisableIPV6 }}listen [::]:80{{ if $s.ProxyProtocol }} proxy_protocol{{ end }};{{ end }}
4546

0 commit comments

Comments
 (0)