Skip to content

Commit fd9a2ea

Browse files
authored
Merge pull request #108 from GDATASoftwareAG/ingress-annotations
Ingress annotations
2 parents 7c22a48 + e3145e6 commit fd9a2ea

File tree

3 files changed

+11
-26
lines changed

3 files changed

+11
-26
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,13 @@ The `allowlistLookup` is a request of the hash to the G DATA Cloud, against a li
150150
<!-- tag::FileSize[] -->
151151

152152
### File size limit
153-
154-
If you want to scan larger files, you have to adjust the deployments body size limit in `vaas.gateway.ingress.annotations`. Should look like this:
153+
The current file size limit is set to 2G. If you want to adjust the file size for your use case, you have to set the deployments body size limit in `vaas.gateway.ingress.annotations`:
155154

156155
```yaml
157-
nginx.ingress.kubernetes.io/proxy-body-size: <your maximum filesize>
158-
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
156+
gateway:
157+
ingress:
158+
annotations:
159+
nginx.ingress.kubernetes.io/proxy-body-size: <your maximum filesize>
159160
```
160161

161162
<!-- end::FileSize[] -->

charts/vaas/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: vaas
3-
version: 2.8.1
3+
version: 2.9.0
44
description: Deployment of a Verdict-as-a-Service on-premise instance
55
maintainers:
66
- name: G DATA CyberDefense AG
Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,17 @@
11
{{- if .Values.gateway.ingress.enabled -}}
22
{{- $fullName := include "gateway.fullname" . -}}
3-
{{- if and .Values.gateway.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
4-
{{- if not (hasKey .Values.gateway.ingress.annotations "kubernetes.io/ingress.class") }}
5-
{{- $_ := set .Values.gateway.ingress.annotations "kubernetes.io/ingress.class" .Values.gateway.ingress.className}}
6-
{{- end }}
7-
{{- end }}
8-
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
3+
{{- $defaultAnnotations := dict "nginx.ingress.kubernetes.io/proxy-body-size" "2G" "nginx.ingress.kubernetes.io/proxy-request-buffering" "off" }}
4+
{{- $mergedAnnotations := merge (.Values.gateway.ingress.annotations | default dict) $defaultAnnotations }}
95
apiVersion: networking.k8s.io/v1
10-
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
11-
apiVersion: networking.k8s.io/v1beta1
12-
{{- else -}}
13-
apiVersion: extensions/v1beta1
14-
{{- end }}
156
kind: Ingress
167
metadata:
178
name: {{ $fullName }}
189
labels:
1910
{{- include "gateway.labels" . | nindent 4 }}
20-
{{- with .Values.gateway.ingress.annotations }}
2111
annotations:
22-
{{- toYaml . | nindent 4 }}
23-
{{- end }}
12+
{{- toYaml $mergedAnnotations | nindent 4 }}
2413
spec:
25-
{{- if and .Values.gateway.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
14+
{{- if .Values.gateway.ingress.className }}
2615
ingressClassName: {{ .Values.gateway.ingress.className }}
2716
{{- end }}
2817
{{- if .Values.gateway.ingress.tls }}
@@ -42,19 +31,14 @@ spec:
4231
paths:
4332
{{- range .paths }}
4433
- path: {{ .path }}
45-
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
34+
{{- if .pathType }}
4635
pathType: {{ .pathType }}
4736
{{- end }}
4837
backend:
49-
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
5038
service:
5139
name: {{ .service.name }}
5240
port:
5341
number: {{ .service.port }}
54-
{{- else }}
55-
serviceName: {{ .service.name }}
56-
servicePort: {{ .service.port }}
57-
{{- end }}
5842
{{- end }}
5943
{{- end }}
6044
{{- end }}

0 commit comments

Comments
 (0)