diff --git a/flux/README.md b/flux/README.md index dab1de7..ed69104 100644 --- a/flux/README.md +++ b/flux/README.md @@ -53,7 +53,16 @@ Kustomization 间通过 `dependsOn` + `wait: true` 串行等待,避免顺序 1. **Flux Operator Web 的 OIDC 客户端** 2. **Gitea Actions Runner Token** -凭据就绪、`flux-env` Secret 重新注入后,使用 `flux resume kustomization infra-gitops-post -n infra-gitops` 手工放行。 +凭据就绪、`flux-env` Secret 重新注入后,可以先用 `flux resume kustomization infra-gitops-post -n infra-gitops` 手工放行。 + +注意:**手工 `resume` 只会修改集群里的 live 对象,不会改 Git 中的期望状态。** 由于 base 层仍然声明了 `spec.suspend: true`,当上层 `Kustomization` 重新协调(如 30 分钟周期、Git 变更、手工 reconcile)时,它会再次把 `infra-gitops-post` 改回暂停。 + +如果希望恢复后保持开启,需要把 Git 中的期望状态也改掉,例如在环境 overlay(如 `clusters/dev-cm/infra-gitops-post.yaml`)中覆盖: + +```yaml +spec: + suspend: false +``` 步骤: diff --git a/flux/clusters/dev-cm/infra-gitops-post.yaml b/flux/clusters/dev-cm/infra-gitops-post.yaml index 42090d1..d5226df 100644 --- a/flux/clusters/dev-cm/infra-gitops-post.yaml +++ b/flux/clusters/dev-cm/infra-gitops-post.yaml @@ -3,6 +3,7 @@ kind: Kustomization metadata: name: infra-gitops-post spec: + suspend: false patches: - target: kind: HelmRelease diff --git a/helmcharts/helmchart-flux.yaml b/helmcharts/helmchart-flux.yaml index 1ed8ce7..7436f9a 100644 --- a/helmcharts/helmchart-flux.yaml +++ b/helmcharts/helmchart-flux.yaml @@ -6,7 +6,7 @@ metadata: spec: chart: oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator targetNamespace: infra-gitops - version: 0.46.0 + version: 0.48.0 valuesContent: |- affinity: nodeAffinity: