feat(halo): 增加halo配置 & 优化apps结构
这个提交包含在:
@@ -0,0 +1,61 @@
|
|||||||
|
apiVersion: helm.cattle.io/v1
|
||||||
|
kind: HelmChart
|
||||||
|
metadata:
|
||||||
|
name: halo
|
||||||
|
namespace: apps
|
||||||
|
spec:
|
||||||
|
repo: https://halo-sigs.github.io/charts/
|
||||||
|
chart: halo
|
||||||
|
targetNamespace: apps
|
||||||
|
version: 1.1.0
|
||||||
|
valuesContent: |-
|
||||||
|
affinity:
|
||||||
|
podAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
cnpg.io/cluster: cnpg-cluster-hk
|
||||||
|
role: primary
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
namespaceSelector: {}
|
||||||
|
nodeAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 1
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- greenhk
|
||||||
|
image:
|
||||||
|
repository: halohub/halo-pro
|
||||||
|
tag: 2.18.0
|
||||||
|
mysql:
|
||||||
|
enabled: false
|
||||||
|
postgresql:
|
||||||
|
enabled: false
|
||||||
|
externalDatabase:
|
||||||
|
platform: postgresql
|
||||||
|
host: cnpg-cluster-hk-rw.infra-data
|
||||||
|
port: 5432
|
||||||
|
user: app
|
||||||
|
password: nyrHzh9WWlDZzvVw7bDFo74gKb9zsls0Sy7OwRTDWiRTNPQQQkW85taUFAoX2AIC
|
||||||
|
database: halo
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
ingressClassName: nginx
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
|
||||||
|
hostname: dev.cm
|
||||||
|
path: /
|
||||||
|
pathType: Prefix
|
||||||
|
haloUsername: rohow
|
||||||
|
extraEnvVars:
|
||||||
|
- name: HALO_EXTERNAL_URL
|
||||||
|
value: https://dev.cm
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: halo-static
|
||||||
|
namespace: apps
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-buffering: "on"
|
||||||
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
|
proxy_cache cache;
|
||||||
|
proxy_cache_valid 200 302 7d;
|
||||||
|
proxy_cache_valid 404 10m;
|
||||||
|
proxy_cache_valid any 1h;
|
||||||
|
proxy_cache_use_stale error timeout updating http_404 http_500 http_502 http_503 http_504;
|
||||||
|
proxy_cache_bypass $http_x_purge;
|
||||||
|
proxy_ignore_headers Cache-Control;
|
||||||
|
add_header X-Cache-Status $upstream_cache_status;
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: dev.cm
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /(.*\.(css|js|png|jpg|jpeg|gif|svg|webp|ico|woff|woff2|ttf|eot)|avatars/[^/]+)$
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: halo
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: apps
|
||||||
@@ -12,7 +12,8 @@ spec:
|
|||||||
affinity:
|
affinity:
|
||||||
podAffinity:
|
podAffinity:
|
||||||
preferredDuringSchedulingIgnoredDuringExecution:
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
- podAffinityTerm:
|
- weight: 1
|
||||||
|
podAffinityTerm:
|
||||||
labelSelector:
|
labelSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
cnpg.io/cluster: cnpg-cluster-sh
|
cnpg.io/cluster: cnpg-cluster-sh
|
||||||
@@ -20,16 +21,16 @@ spec:
|
|||||||
app.kubernetes.io/name: redis
|
app.kubernetes.io/name: redis
|
||||||
app.kubernetes.io/component: master
|
app.kubernetes.io/component: master
|
||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
weight: 1
|
namespaceSelector: {}
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
preferredDuringSchedulingIgnoredDuringExecution:
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
- preference:
|
- weight: 1
|
||||||
|
preference:
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
- key: kubernetes.io/hostname
|
- key: kubernetes.io/hostname
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- homea
|
- homea
|
||||||
weight: 1
|
|
||||||
redis-cluster:
|
redis-cluster:
|
||||||
enabled: false
|
enabled: false
|
||||||
postgresql-ha:
|
postgresql-ha:
|
||||||
@@ -8,7 +8,7 @@ metadata:
|
|||||||
nginx.ingress.kubernetes.io/proxy-buffering: "on"
|
nginx.ingress.kubernetes.io/proxy-buffering: "on"
|
||||||
nginx.ingress.kubernetes.io/configuration-snippet: |
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
proxy_cache cache;
|
proxy_cache cache;
|
||||||
proxy_cache_valid 200 302 1d;
|
proxy_cache_valid 200 302 7d;
|
||||||
proxy_cache_valid 404 10m;
|
proxy_cache_valid 404 10m;
|
||||||
proxy_cache_valid any 1h;
|
proxy_cache_valid any 1h;
|
||||||
proxy_cache_use_stale error timeout updating http_404 http_500 http_502 http_503 http_504;
|
proxy_cache_use_stale error timeout updating http_404 http_500 http_502 http_503 http_504;
|
||||||
@@ -21,7 +21,7 @@ spec:
|
|||||||
- host: git.dev.cm
|
- host: git.dev.cm
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /(assets|avatars)/.*
|
- path: /(.*\.(css|js|png|jpg|jpeg|gif|svg|webp|ico|woff|woff2|ttf|eot)|avatars/[^/]+)$
|
||||||
pathType: ImplementationSpecific
|
pathType: ImplementationSpecific
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
+2
-2
@@ -8,7 +8,7 @@ metadata:
|
|||||||
nginx.ingress.kubernetes.io/proxy-buffering: "on"
|
nginx.ingress.kubernetes.io/proxy-buffering: "on"
|
||||||
nginx.ingress.kubernetes.io/configuration-snippet: |
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
proxy_cache cache;
|
proxy_cache cache;
|
||||||
proxy_cache_valid 200 302 1d;
|
proxy_cache_valid 200 302 7d;
|
||||||
proxy_cache_valid 404 10m;
|
proxy_cache_valid 404 10m;
|
||||||
proxy_cache_valid any 1h;
|
proxy_cache_valid any 1h;
|
||||||
proxy_cache_use_stale error timeout updating http_404 http_500 http_502 http_503 http_504;
|
proxy_cache_use_stale error timeout updating http_404 http_500 http_502 http_503 http_504;
|
||||||
@@ -21,7 +21,7 @@ spec:
|
|||||||
- host: monitor.dev.cm
|
- host: monitor.dev.cm
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /(public|avatar)/.*
|
- path: /(.*\.(css|js|png|jpg|jpeg|gif|svg|webp|ico|woff|woff2|ttf|eot)|avatars/[^/]+)$
|
||||||
pathType: ImplementationSpecific
|
pathType: ImplementationSpecific
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
在新议题中引用
屏蔽一个用户