From 98c994fa0c711b6ac64d1234f5883e790182c90d Mon Sep 17 00:00:00 2001 From: rohow Date: Mon, 20 Apr 2026 16:41:03 +0800 Subject: [PATCH] feat(k8s): update deployment metadata and adjust GitRepository path in flux-instance.yaml --- flux/clusters/dev-cm/patches/kube-system.yaml | 4 ++++ flux/clusters/restore/infra-devops.yaml | 19 ------------------- flux/clusters/restore/kustomization.yaml | 8 -------- flux/flux-instance.yaml | 4 +--- 4 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 flux/clusters/restore/infra-devops.yaml delete mode 100644 flux/clusters/restore/kustomization.yaml diff --git a/flux/clusters/dev-cm/patches/kube-system.yaml b/flux/clusters/dev-cm/patches/kube-system.yaml index 1449712..fa43286 100644 --- a/flux/clusters/dev-cm/patches/kube-system.yaml +++ b/flux/clusters/dev-cm/patches/kube-system.yaml @@ -8,6 +8,10 @@ spec: kind: Deployment name: "(coredns|local-path-provisioner|metrics-server)" patch: | + apiVersion: apps/v1 + kind: Deployment + metadata: + name: placeholder spec: template: spec: diff --git a/flux/clusters/restore/infra-devops.yaml b/flux/clusters/restore/infra-devops.yaml deleted file mode 100644 index ee3de66..0000000 --- a/flux/clusters/restore/infra-devops.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# 恢复 profile 仅部署 infra-devops (Velero),不含 post 层 -apiVersion: kustomize.toolkit.fluxcd.io/v1 -kind: Kustomization -metadata: - name: infra-devops - namespace: infra-gitops -spec: - interval: 30m - timeout: 15m - retryInterval: 1m - sourceRef: - kind: GitRepository - name: flux - path: ./flux/infrastructure/infra-devops - prune: true - wait: true - dependsOn: - - name: sources - - name: secrets diff --git a/flux/clusters/restore/kustomization.yaml b/flux/clusters/restore/kustomization.yaml deleted file mode 100644 index 7027429..0000000 --- a/flux/clusters/restore/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# 恢复专用 profile — 仅部署 Velero 用于 PVC 恢复 -# 使用方法: 将 FluxInstance sync.path 临时切换到 flux/clusters/restore -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - ../base/sources.yaml - - ../base/secrets.yaml - - infra-devops.yaml diff --git a/flux/flux-instance.yaml b/flux/flux-instance.yaml index f17837a..eec8a65 100644 --- a/flux/flux-instance.yaml +++ b/flux/flux-instance.yaml @@ -22,13 +22,11 @@ spec: storage: class: "local-path" size: "10Gi" - # Git 仓库同步配置 - 请将 url 替换为实际的 deploy 仓库地址 - # 恢复模式: 先用 restore profile 部署 Velero,恢复 PVC 后切回 dev-cm sync: kind: GitRepository url: ssh://git@github.com/devcm-repo/k3s.git ref: refs/heads/main - path: flux/clusters/restore + path: flux/clusters/dev-cm pullSecret: flux-git-auth name: flux kustomize: