Allow to disable IPv6 for nginx ingress (#1392)

Co-authored-by: M. Mert Yildiran <me@mertyildiran.com>
This commit is contained in:
Adrian Wyssmann 2023-08-05 17:43:13 +02:00 committed by GitHub
parent b32f5f9e12
commit 250a878407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 0 deletions

View File

@ -61,6 +61,7 @@ helm install kubeshark kubeshark/kubeshark \
--set "tap.ingress.auth.approveddomains={gmail.com}" \
--set license=LICENSE_GOES_HERE
```
You can get your license [here](https://console.kubeshark.co/).
## Installing with Persistent Storage Enabled
@ -70,4 +71,14 @@ helm install kubeshark kubeshark/kubeshark \
--set tap.persistentstorage=true \
--set license=LICENSE_GOES_HERE
```
You can get your license [here](https://console.kubeshark.co/).
## Disabling IPV6
Not all have IPV6 enabled, hence this has to be disabled as follows:
```shell
helm install kubeshark kubeshark/kubeshark \
--set tap.ipv6=false
```

View File

@ -41,6 +41,15 @@ spec:
requests:
cpu: 50m
memory: 50Mi
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/conf.d/default.conf
subPath: default.conf
readOnly: true
volumes:
- name: nginx-config
configMap:
name: kubeshark-nginx-config
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: kubeshark-service-account
terminationGracePeriodSeconds: 0

View File

@ -0,0 +1,27 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kubeshark-nginx-config
namespace: {{ .Release.Namespace }}
apiVersion: v1
data:
default.conf: |
server {
listen 80;
{{- if .Values.tap.ipv6 }}
listen [::]:80;
{{- end }}
add_header Cache-Control no-cache;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
expires -1;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@ -56,6 +56,7 @@ tap:
approveddomains: []
certmanager: letsencrypt-prod
debug: false
ipv6: true
logs:
file: ""
kube: