apiVersion: fluxcd.controlplane.io/v1 kind: FluxInstance metadata: name: flux namespace: infra-gitops spec: distribution: version: "2.x" registry: "ghcr.io/fluxcd" artifact: "oci://ghcr.io/controlplaneio-fluxcd/flux-operator-manifests" components: - source-controller - kustomize-controller - helm-controller - notification-controller cluster: type: kubernetes size: small multitenant: false networkPolicy: true domain: "cluster.local" storage: class: "local-path" size: "10Gi" # Git 仓库同步配置 - 请将 url 替换为实际的 deploy 仓库地址 sync: kind: GitRepository url: ssh://git@github.com/devcm-repo/k3s.git ref: refs/heads/main path: flux/clusters/dev-cm pullSecret: flux-git-auth name: flux kustomize: patches: - target: kind: Deployment patch: | - op: add path: /spec/template/spec/affinity value: nodeAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 1 preference: matchExpressions: - key: kubernetes.io/hostname operator: In values: - clawjp