diff --git a/release-charts/mixingx-gateway/templates/gateway-rbac.yaml b/release-charts/mixingx-gateway/templates/gateway-rbac.yaml index f13bb41..21dee94 100644 --- a/release-charts/mixingx-gateway/templates/gateway-rbac.yaml +++ b/release-charts/mixingx-gateway/templates/gateway-rbac.yaml @@ -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 }} diff --git a/release-charts/mixingx-gateway/templates/gateway.yaml b/release-charts/mixingx-gateway/templates/gateway.yaml index dfdaf34..2cc0bd5 100644 --- a/release-charts/mixingx-gateway/templates/gateway.yaml +++ b/release-charts/mixingx-gateway/templates/gateway.yaml @@ -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