更改 BUILD_env 为 NAME_SPACES

This commit is contained in:
dxin
2025-10-30 15:00:58 +08:00
parent 275d01d858
commit b9f7ef980b
11 changed files with 411 additions and 12 deletions

View File

@@ -0,0 +1,44 @@
apiVersion: v1
data:
default.conf: |-
server {
listen 80;
server_name _;
# 前端静态文件
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
# 精确匹配 index.html禁用缓存
location = /index.html {
root /usr/share/nginx/html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# 静态资源开启长缓存(带 hash
location ~* \.(js|css|woff2|json|svg|png|jpg|jpeg|gif|ico|ttf|otf|eot|mp4|webm|webp)$ {
root /usr/share/nginx/html;
add_header Cache-Control "public, max-age=31536000, immutable";
access_log off;
}
}
kind: ConfigMap
metadata:
creationTimestamp: "2025-10-30T06:21:32Z"
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:data:
.: {}
f:default.conf: {}
manager: tke-platform-api
operation: Update
time: "2025-10-30T06:21:32Z"
name: test-default-conf
namespace: test-lessie
resourceVersion: "1846361542"
uid: 9361cebf-903c-4312-bc84-b6056cb054c7

View File

@@ -0,0 +1,24 @@
server {
listen 80;
server_name _;
# 前端静态文件
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
# 精确匹配 index.html禁用缓存
location = /index.html {
root /usr/share/nginx/html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# 静态资源开启长缓存(带 hash
location ~* \.(js|css|woff2|json|svg|png|jpg|jpeg|gif|ico|ttf|otf|eot|mp4|webm|webp)$ {
root /usr/share/nginx/html;
add_header Cache-Control "public, max-age=31536000, immutable";
access_log off;
}
}