From 1e2d68f4a6fbeafa7fece43852042a2934aeb15b Mon Sep 17 00:00:00 2001 From: rohow Date: Fri, 11 Oct 2024 19:37:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(nginx):=20=E5=A2=9E=E5=8A=A0=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=E7=9B=B8=E5=85=B3=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/apps/fillcode/helmchart.yaml | 24 ++++++++++++++++++++++++ apps/apps/fillcode/ingress-http.yaml | 22 ---------------------- apps/infra/net/nginx/helmchart.yaml | 8 ++++++++ 3 files changed, 32 insertions(+), 22 deletions(-) create mode 100644 apps/apps/fillcode/helmchart.yaml delete mode 100644 apps/apps/fillcode/ingress-http.yaml diff --git a/apps/apps/fillcode/helmchart.yaml b/apps/apps/fillcode/helmchart.yaml new file mode 100644 index 0000000..4cadcc1 --- /dev/null +++ b/apps/apps/fillcode/helmchart.yaml @@ -0,0 +1,24 @@ +apiVersion: helm.cattle.io/v1 +kind: HelmChart +metadata: + name: fillcode + namespace: apps +spec: + repo: https://cowboysysop.github.io/charts/ + chart: whoami + targetNamespace: apps + version: 5.1.2 + valuesContent: |- + ingress: + enabled: true + ingressClassName: nginx + tls: + - hosts: + - fillcode.com + secretName: fillcode-com-crt + hosts: + - host: fillcode.com + paths: + - /whoami + + diff --git a/apps/apps/fillcode/ingress-http.yaml b/apps/apps/fillcode/ingress-http.yaml deleted file mode 100644 index ba89a61..0000000 --- a/apps/apps/fillcode/ingress-http.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: fillcode - namespace: apps -spec: - ingressClassName: nginx - tls: - - hosts: - - fillcode.com - secretName: fillcode-com-crt - rules: - - host: fillcode.com - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: fillcode - port: - number: 80 diff --git a/apps/infra/net/nginx/helmchart.yaml b/apps/infra/net/nginx/helmchart.yaml index ebf18ac..cf279b1 100644 --- a/apps/infra/net/nginx/helmchart.yaml +++ b/apps/infra/net/nginx/helmchart.yaml @@ -115,6 +115,14 @@ spec: value: "rgILO2mh/t+30LMvzyyMXbfHRmDfBkDDkhEflzHaoQ0" - name: BOUNCER_CONFIG value: "/crowdsec/crowdsec-bouncer.conf" + - name: CAPTCHA_PROVIDER + value: "turnstile" + - name: SITE_KEY + value: "0x4AAAAAAAxJ2RPNWzn2LCc-" + - name: SECRET_KEY + value: "0x4AAAAAAAxJ2dwFOaNg5ae3c6wYTmWH0bU" + - name: CAPTCHA_TEMPLATE_PATH + value: /etc/nginx/lua/plugins/crowdsec/templates/captcha.html command: ['sh', '-c', "bash /docker_start.sh; mkdir -p /lua_plugins/crowdsec/; cp -R /crowdsec/* /lua_plugins/crowdsec/"] volumeMounts: - name: crowdsec-bouncer-plugin