Compare commits

...
Author SHA1 Message Date
ximenchuifeng ceeb5474a9 feat(gateway): 更新中心集群支撑——prepull Role + ArgoCD 配置可选注入(暂驻分支不合并)
- gateway-rbac 追加 gateway-prepull-manager Role/RoleBinding(daemonsets
  增删查 + pods 只读,挂既有 gateway-sa):更新中心预拉取 DS 编排所需
- gateway Deployment 支持可选注入 gateway.updateCenter.argocdUrl /
  argocdTokenSecret → env Update__ArgoCd__*(缺省不注入 = 清单功能 503 降级)
2026-09-09 07:54:13 +08:00
2 changed files with 44 additions and 0 deletions

No files matched your search

@@ -33,4 +33,34 @@ roleRef:
subjects:
- kind: ServiceAccount
name: gateway-sa
---
# 更新中心(ADR-0074 决策 7):预拉取 DaemonSet 编排——镜像提前铺到各节点,
# 客户点更新时新 Pod 命中本地缓存秒级切换。权限只有 daemonsets 增删查 + pods 只读。
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: gateway-prepull-manager
labels:
app.kubernetes.io/component: gateway
rules:
- apiGroups: ["apps"]
resources: ["daemonsets"]
verbs: ["create", "get", "list", "delete"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: gateway-prepull-manager-binding
labels:
app.kubernetes.io/component: gateway
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: gateway-prepull-manager
subjects:
- kind: ServiceAccount
name: gateway-sa
{{- end }}
@@ -52,6 +52,20 @@ spec:
fieldRef:
fieldPath: metadata.namespace
{{- end }}
{{- /* 更新中心(ADR-0074):ArgoCD 只读访问(镜像清单);缺省不注入 = 清单功能 503 降级 */}}
{{- with .Values.gateway.updateCenter }}
{{- with .argocdUrl }}
- name: Update__ArgoCd__BaseUrl
value: {{ . | quote }}
{{- end }}
{{- with .argocdTokenSecret }}
- name: Update__ArgoCd__Token
valueFrom:
secretKeyRef:
name: {{ .name | quote }}
key: {{ .key | default "token" | quote }}
{{- end }}
{{- end }}
livenessProbe:
httpGet:
path: /health