51 行
1.4 KiB
YAML
51 行
1.4 KiB
YAML
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 仓库地址
|
|
# 恢复模式: 先用 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
|
|
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:
|
|
- homea
|