2023-08-13 12:13:53 -05:00
---
apiVersion : helm.toolkit.fluxcd.io/v2beta1
kind : HelmRelease
metadata :
name : ingress-nginx
spec :
interval : 30m
chart :
spec :
chart : ingress-nginx
2023-10-12 10:00:43 -05:00
version : 4.8 .2
2023-08-13 12:13:53 -05:00
sourceRef :
kind : HelmRepository
name : ingress-nginx
namespace : flux-system
interval : 30m
values :
controller :
replicaCount : 3
updateStrategy :
2023-10-03 12:32:41 -05:00
type : RollingUpdate
2023-10-11 12:52:04 -05:00
allowSnippetAnnotations : true
2023-08-13 12:13:53 -05:00
service :
enabled : true
type : LoadBalancer
annotations :
2023-10-01 19:53:28 -05:00
load-balancer.hetzner.cloud/location : fsn1
2023-10-01 21:32:49 -05:00
load-balancer.hetzner.cloud/protocol : tcp
load-balancer.hetzner.cloud/name : valinor-nginx
load-balancer.hetzner.cloud/use-private-ip : true
load-balancer.hetzner.cloud/uses-proxyprotocol : true
2023-10-01 19:53:28 -05:00
2023-08-13 12:13:53 -05:00
publishService :
enabled : true
metrics :
enabled : true
serviceMonitor :
enabled : true
namespace : network
namespaceSelector :
any : true
ingressClassResource :
default : true
config :
2023-10-11 12:52:04 -05:00
block-user-agents : "GPTBot,~*GPTBot*,ChatGPT-User,~*ChatGPT-User*,Google-Extended,~*Google-Extended*,CCBot,~*CCBot*,Omgilibot,~*Omgilibot*,FacebookBot,~*FacebookBot*" # taken from https://github.com/superseriousbusiness/gotosocial/blob/main/internal/web/robots.go
2023-08-13 12:13:53 -05:00
client-header-timeout : 120
client-body-buffer-size : "100M"
client-body-timeout : 120
enable-brotli : "true"
2023-10-11 12:52:04 -05:00
enable-ocsp : "true"
2023-08-13 12:13:53 -05:00
enable-real-ip : "true"
use-proxy-protocol : "true"
2023-10-11 12:52:04 -05:00
hide-headers : Server,X-Powered-By
2023-08-13 12:13:53 -05:00
hsts-max-age : "31449600"
keep-alive : 120
keep-alive-requests : 10000
proxy-body-size : 0
proxy-buffer-size : "16k"
ssl-protocols : "TLSv1.3 TLSv1.2"
use-forwarded-headers : "true"
2023-10-10 16:15:00 -05:00
plugins : "crowdsec"
lua-shared-dicts : "crowdsec_cache: 50m"
server-snippet : |
resolver local=on ipv6=off;
2023-08-13 12:13:53 -05:00
extraArgs :
default-ssl-certificate : "network/valinor-social-tls"
topologySpreadConstraints :
- maxSkew : 2
topologyKey : kubernetes.io/hostname
whenUnsatisfiable : DoNotSchedule
labelSelector :
matchLabels :
app.kubernetes.io/instance : ingress-nginx
app.kubernetes.io/component : controller
affinity :
podAntiAffinity :
requiredDuringSchedulingIgnoredDuringExecution :
- labelSelector :
matchExpressions :
- key : app.kubernetes.io/component
operator : In
values :
- controller
- key : app.kubernetes.io/instance
operator : In
values :
- ingress-nginx
topologyKey : kubernetes.io/hostname
resources :
requests :
cpu : 23m
memory : 381M
2023-10-10 16:15:00 -05:00
extraVolumes :
- name : crowdsec-bouncer-plugin
emptyDir : {}
extraInitContainers :
- name : init-clone-crowdsec-bouncer
image : crowdsecurity/lua-bouncer-plugin
imagePullPolicy : IfNotPresent
env :
- name : API_URL
value : "http://crowdsec-service.security.svc.cluster.local:8080" # crowdsec lapi service-name
- name : API_KEY
2023-10-10 16:19:50 -05:00
valueFrom :
secretKeyRef :
name : nginx-ingress-secrets
key : nginx-ingress-bouncer-apikey
2023-10-10 16:15:00 -05:00
- name : BOUNCER_CONFIG
value : "/crowdsec/crowdsec-bouncer.conf"
- name : BAN_TEMPLATE_PATH
value : /etc/nginx/lua/plugins/crowdsec/templates/ban.html
command : [ 'sh' , '-c' , "sh /docker_start.sh; mkdir -p /lua_plugins/crowdsec/; cp -R /crowdsec/* /lua_plugins/crowdsec/" ]
volumeMounts :
- name : crowdsec-bouncer-plugin
mountPath : /lua_plugins
extraVolumeMounts :
- name : crowdsec-bouncer-plugin
mountPath : /etc/nginx/lua/plugins/crowdsec
subPath : crowdsec
2023-08-13 12:13:53 -05:00
defaultBackend :
enabled : false