feat: 路由改名/kubectl预装/导出YAML精简/Service标签页优化/Alpine镜像源换清华
- 路由 /deploy/credentials → /deploy/configureTools - kubectl 改为预装(Dockerfile) + 种子数据 preinstall - 导出YAML精简: Service/Ingress/Deployment 全面清理运行时字段 - DeploymentEditService 只显示匹配 selector 的关联 Service - Alpine 镜像源 mirrors.aliyun.com → mirrors.tuna.tsinghua.edu.cn
This commit is contained in:
1 parent
dd7cb6895e
commit
451f65f9c8
9 files changed
+109
-29
No files matched your search
+8
-3
@@ -17,7 +17,7 @@ FROM golang:1.24-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# 使用国内 Alpine 镜像源加速 // Logan.Li
|
||||
RUN sed -i 's|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g' /etc/apk/repositories
|
||||
RUN sed -i 's|dl-cdn.alpinelinux.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apk/repositories
|
||||
RUN apk add --no-cache git ca-certificates tzdata
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
@@ -74,15 +74,20 @@ RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
FROM alpine:3.20
|
||||
|
||||
# 使用国内 Alpine 镜像源加速 // Logan.Li
|
||||
RUN sed -i 's|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g' /etc/apk/repositories
|
||||
RUN sed -i 's|dl-cdn.alpinelinux.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apk/repositories
|
||||
|
||||
# 安装运行时依赖(核心最小集,重型工具改为懒加载)// Logan.Li
|
||||
# bash=kubectl交互终端, curl=健康检查, git=流水线代码拉取, docker-cli=镜像构建推送
|
||||
# kubectl/maven/nodejs/helm → 见「发布配置→工具配置」Tab,首次使用自动下载
|
||||
# kubectl=预装(~50MB,K8s交互终端必需),maven/nodejs/helm → 工具配置Tab懒加载
|
||||
# Pod文件浏览/exec 通过 WebSocket channel 协议直连 K8s API,无需 kubectl
|
||||
RUN --mount=type=cache,target=/var/cache/apk \
|
||||
apk add ca-certificates tzdata bash curl git docker-cli docker-cli-buildx
|
||||
|
||||
# kubectl 预装(~50MB,国内网络从 dl.k8s.io 下载约10s)// Logan.Li
|
||||
ARG KUBECTL_VERSION=v1.32.0
|
||||
RUN curl -sLo /usr/local/bin/kubectl https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl && \
|
||||
chmod +x /usr/local/bin/kubectl
|
||||
|
||||
# npm 淘宝镜像加速(node 懒加载后生效)
|
||||
RUN npm config set registry https://registry.npmmirror.com 2>/dev/null || true
|
||||
# Maven 阿里云镜像加速(maven 懒加载后生效)
|
||||
|
||||
Reference in new issue
Block a user