feat(halo): 增加halo配置 & 优化apps结构

这个提交包含在:
2024-08-14 14:11:36 +08:00
未验证
父节点 d997bb2e56
当前提交 87793b89ac
修改 35 个文件,包含 105 行新增9 行删除
+61
查看文件
@@ -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
+30
查看文件
@@ -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
+4
查看文件
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: apps
@@ -12,7 +12,8 @@ spec:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
- weight: 1
podAffinityTerm:
labelSelector:
matchLabels:
cnpg.io/cluster: cnpg-cluster-sh
@@ -20,16 +21,16 @@ spec:
app.kubernetes.io/name: redis
app.kubernetes.io/component: master
topologyKey: kubernetes.io/hostname
weight: 1
namespaceSelector: {}
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
- weight: 1
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- homea
weight: 1
- homea
redis-cluster:
enabled: false
postgresql-ha:
@@ -8,7 +8,7 @@ metadata:
nginx.ingress.kubernetes.io/proxy-buffering: "on"
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_cache cache;
proxy_cache_valid 200 302 1d;
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;
@@ -21,7 +21,7 @@ spec:
- host: git.dev.cm
http:
paths:
- path: /(assets|avatars)/.*
- path: /(.*\.(css|js|png|jpg|jpeg|gif|svg|webp|ico|woff|woff2|ttf|eot)|avatars/[^/]+)$
pathType: ImplementationSpecific
backend:
service:
@@ -8,7 +8,7 @@ metadata:
nginx.ingress.kubernetes.io/proxy-buffering: "on"
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_cache cache;
proxy_cache_valid 200 302 1d;
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;
@@ -21,7 +21,7 @@ spec:
- host: monitor.dev.cm
http:
paths:
- path: /(public|avatar)/.*
- path: /(.*\.(css|js|png|jpg|jpeg|gif|svg|webp|ico|woff|woff2|ttf|eot)|avatars/[^/]+)$
pathType: ImplementationSpecific
backend:
service: