Files
awoooi/k8s/awoooi-prod/kustomization.yaml
OG T 190cfda65c revert(k8s): 恢復 commonLabels (Deployment selector immutable)
還原到 commonLabels,因為:
1. Deployment selector 是 immutable,不能移除 environment/system labels
2. commonLabels 只影響 spec.podSelector,不影響 egress[].to[].podSelector
3. DNS 規則 (k8s-app=kube-dns) 不會被 commonLabels 破壞

DNS 問題的根因是之前的錯誤配置,NetworkPolicy YAML 已修復

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-26 19:56:41 +08:00

38 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AWOOOI 正式環境 Kustomization
# 負責人: CIO
# 版本: v1.0
# 日期: 2026-03-20
#
# ⚠️ 鐵律: 禁止在此檔案寫 newTagTag 由 CI 動態注入
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: awoooi-prod
# 通用標籤
# 注意: commonLabels 會加到 Deployment selector不能移除否則會 immutable error
# NetworkPolicy 的 egress[].to[].podSelector 不受 commonLabels 影響
commonLabels:
system: awoooi
environment: prod
resources:
- 01-namespace-quota.yaml
- 02-network-policy.yaml
# 03-secrets.yaml 不納入,由 CI/CD 單獨處理
- 04-configmap.yaml
- 05-deployment-web.yaml
- 06-deployment-api.yaml
- 07-rbac.yaml # Phase 7: K8sExecutor 最小權限 RBAC
- 08-deployment-worker.yaml # Phase 6.5: Signal Worker
# 映像配置 (Tag 由 CI 動態注入)
# Harbor 金庫: 110 主機 (192.168.0.110:5000)
# ⚠️ 重要: name 必須與 deployment YAML 中的 image 完全匹配 (含 tag)
images:
- name: 192.168.0.110:5000/library/web:IMAGE_TAG_PLACEHOLDER
# newName + newTag 由 CI 透過 kustomize edit set image 注入
- name: 192.168.0.110:5000/library/api:IMAGE_TAG_PLACEHOLDER
# newName + newTag 由 CI 透過 kustomize edit set image 注入