diff --git a/infrastructures/ingress-nginx/env/k3s-cluster/config.json b/infrastructures/ingress-nginx/env/k3s-cluster/config.json.bak similarity index 100% rename from infrastructures/ingress-nginx/env/k3s-cluster/config.json rename to infrastructures/ingress-nginx/env/k3s-cluster/config.json.bak diff --git a/scripts/7.install-ingress-nginx.sh b/scripts/7.install-ingress-nginx.sh new file mode 100644 index 0000000..dc6cc58 --- /dev/null +++ b/scripts/7.install-ingress-nginx.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx \ + --version 1.16.1 --namespace ingress-nginx --create-namespace \ No newline at end of file diff --git a/scripts/ingress-values.yaml b/scripts/ingress-values.yaml new file mode 100644 index 0000000..831899b --- /dev/null +++ b/scripts/ingress-values.yaml @@ -0,0 +1,73 @@ +rbac: + create: true + +controller: + priorityClassName: system-cluster-critical + + extraArgs: + update-status-on-shutdown: "false" + + allowSnippetAnnotations: true + + config: + proxy-buffer-size: 16k + use-gzip: true + enable-brotli: true + hsts-max-age: 31536000 + hsts-preload: true + disable-ipv6: true + disable-ipv6-dns: true + keep-alive-requests: 1000 + use-geoip2: false + custom-http-errors: 401,403,404,500,501,502,503,504 + + extraEnvs: + - name: TZ + value: Australia/Sydney + + addHeaders: + Referrer-Policy: same-origin, strict-origin-when-cross-origin + X-Content-Type-Options: nosniff + X-Frame-Options: SAMEORIGIN + X-XSS-Protection: 1; mode=block + + ingressClassResource: + default: true + + service: + externalTrafficPolicy: Cluster + ipFamilyPolicy: SingleStack + + metrics: + enabled: ${metrics_enabled:=false} + # serviceMonitor: + # enabled: ${metrics_enabled:=false} + # scrapeInterval: 1m + + spec: + template: + spec: + containers: + volumeMounts: + - mountPath: /etc/nginx/template + name: nginx-template-volume + readOnly: true + volumes: + - name: nginx-template-volume + hostPath: + path: /mnt/nfs/AppData/ingress-nginx/etc/nginx/template + type: Directory + +defaultBackend: + enabled: true + image: + repository: ghcr.io/tarampampam/error-pages + tag: 3.3.0@sha256:43c9917e99ac1bb4df3c4e037327637e502e2ab4c3d84803b223d5b7db6d4cd7 + pullPolicy: IfNotPresent + extraEnvs: + - name: TEMPLATE_NAME + value: connection + - name: SHOW_DETAILS + value: "true" + - name: READ_BUFFER_SIZE + value: "8192" \ No newline at end of file