feat(halo): halo增加cdn部署
这个提交包含在:
@@ -7,7 +7,7 @@ spec:
|
||||
repo: https://halo-sigs.github.io/charts/
|
||||
chart: halo
|
||||
targetNamespace: apps
|
||||
version: 1.1.0
|
||||
version: 1.2.0
|
||||
valuesContent: |-
|
||||
affinity:
|
||||
podAffinity:
|
||||
@@ -31,7 +31,7 @@ spec:
|
||||
- greenhk
|
||||
image:
|
||||
repository: halohub/halo-pro
|
||||
tag: 2.18.0
|
||||
tag: 2.19.0
|
||||
mysql:
|
||||
enabled: false
|
||||
postgresql:
|
||||
@@ -50,12 +50,16 @@ spec:
|
||||
ingressClassName: nginx
|
||||
annotations:
|
||||
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
|
||||
path: /
|
||||
pathType: Prefix
|
||||
haloUsername: rohow
|
||||
extraEnvVars:
|
||||
- name: HALO_EXTERNAL_URL
|
||||
value: https://dev.cm
|
||||
|
||||
haloExternalUrl: https://dev.cm
|
||||
|
||||
|
||||
|
||||
@@ -28,3 +28,26 @@ spec:
|
||||
name: halo
|
||||
port:
|
||||
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
|
||||
|
||||
@@ -30,6 +30,8 @@ spec:
|
||||
config:
|
||||
use-forwarded-headers: "true"
|
||||
allow-snippet-annotations: "true"
|
||||
# http to https重定向
|
||||
ssl-redirect: "true"
|
||||
# 自定义错误页面
|
||||
custom-http-errors: "404,503"
|
||||
# 缓存配置
|
||||
|
||||
在新议题中引用
屏蔽一个用户