feat(halo): halo增加cdn部署

这个提交包含在:
2024-09-05 14:59:55 +08:00
未验证
父节点 8d148b942e
当前提交 15cebd58cd
修改 3 个文件,包含 35 行新增6 行删除
+10 -6
查看文件
@@ -7,7 +7,7 @@ spec:
repo: https://halo-sigs.github.io/charts/ repo: https://halo-sigs.github.io/charts/
chart: halo chart: halo
targetNamespace: apps targetNamespace: apps
version: 1.1.0 version: 1.2.0
valuesContent: |- valuesContent: |-
affinity: affinity:
podAffinity: podAffinity:
@@ -31,7 +31,7 @@ spec:
- greenhk - greenhk
image: image:
repository: halohub/halo-pro repository: halohub/halo-pro
tag: 2.18.0 tag: 2.19.0
mysql: mysql:
enabled: false enabled: false
postgresql: postgresql:
@@ -50,12 +50,16 @@ spec:
ingressClassName: nginx ingressClassName: nginx
annotations: annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "50m" nginx.ingress.kubernetes.io/proxy-body-size: "50m"
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_set_header Accept-Encoding "";
subs_filter_types text/html;
subs_filter '<(script|img|link)([^>]*) (src|href)="/' '<$1$2 $3="https://static.fillcode.com/dev-cm/' ri;
subs_filter 'url\(\/' 'url(https://static.fillcode.com/dev-cm/' ri;
subs_filter 'Halo' 'FillCode' r;
hostname: dev.cm hostname: dev.cm
path: / path: /
pathType: Prefix pathType: Prefix
haloUsername: rohow haloUsername: rohow
extraEnvVars: haloExternalUrl: https://dev.cm
- name: HALO_EXTERNAL_URL
value: https://dev.cm
+23
查看文件
@@ -28,3 +28,26 @@ spec:
name: halo name: halo
port: port:
number: 80 number: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: halo-static-cdn
namespace: apps
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
ingressClassName: nginx
rules:
- host: static.fillcode.com
http:
paths:
- path: /dev-cm(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: halo
port:
number: 80
+2
查看文件
@@ -30,6 +30,8 @@ spec:
config: config:
use-forwarded-headers: "true" use-forwarded-headers: "true"
allow-snippet-annotations: "true" allow-snippet-annotations: "true"
# http to https重定向
ssl-redirect: "true"
# 自定义错误页面 # 自定义错误页面
custom-http-errors: "404,503" custom-http-errors: "404,503"
# 缓存配置 # 缓存配置