feat(ansible): add K3s installation playbooks and configuration templates

这个提交包含在:
2026-02-09 14:03:42 +08:00 未验证
父节点 5f85a85844
当前提交 d6bcd22ecd
修改 28 个文件,包含 815 行新增13 行删除
@@ -19,7 +19,7 @@ spec:
values:
- "cn-sh"
tolerations:
- key: "node-role.kubernetes.io/control-plane"
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
image:
@@ -30,6 +30,6 @@ spec:
values:
- "cn-sh"
tolerations:
- key: "node-role.kubernetes.io/control-plane"
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
@@ -21,7 +21,7 @@ spec:
values:
- "cn-sh"
tolerations:
- key: "node-role.kubernetes.io/control-plane"
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
webhook:
@@ -35,7 +35,7 @@ spec:
values:
- "cn-sh"
tolerations:
- key: "node-role.kubernetes.io/control-plane"
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
cainjector:
@@ -49,7 +49,7 @@ spec:
values:
- "cn-sh"
tolerations:
- key: "node-role.kubernetes.io/control-plane"
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
# 在删除证书时同时删除secret
+4
查看文件
@@ -26,6 +26,10 @@ spec:
operator: In
values:
- homea
kubectl:
image:
repository: alpine/k8s
tag: "1.34.0"
deployNodeAgent: true
snapshotsEnabled: false
configuration:
@@ -0,0 +1,29 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dev-cm-flux-web-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: flux-web-admin
subjects:
- kind: Group
name: dev.cm:owners
apiGroup: rbac.authorization.k8s.io
- kind: Group
name: dev.cm:admins
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dev-cm-flux-web-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: flux-web-user
subjects:
- kind: Group
name: dev.cm
apiGroup: rbac.authorization.k8s.io
+18 -2
查看文件
@@ -10,7 +10,6 @@ spec:
artifact: "oci://ghcr.io/controlplaneio-fluxcd/flux-operator-manifests"
components:
- source-controller
- source-watcher
- kustomize-controller
- helm-controller
- notification-controller
@@ -22,4 +21,21 @@ spec:
domain: "cluster.local"
storage:
class: "local-path"
size: "10Gi"
size: "10Gi"
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
+10
查看文件
@@ -8,6 +8,16 @@ spec:
targetNamespace: infra-gitops
version: 0.40.0
valuesContent: |-
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- homea
installCRDs: true
web:
config: