Added some ctl boilerplate

This commit is contained in:
2026-03-27 18:34:53 +08:00
parent bf85462e34
commit 87aa1d4b0b
30 changed files with 1813 additions and 19 deletions

View File

@@ -0,0 +1,54 @@
package templates
const MonoKSConfigYAML = `apiVersion: monok8s.io/v1alpha1
kind: MonoKSConfig
metadata:
name: example
namespace: kube-system
spec:
kubernetesVersion: v1.35.3
nodeName: monok8s-master-1
clusterName: monok8s
clusterDomain: cluster.local
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/12
apiServerAdvertiseAddress: 10.0.0.10
apiServerEndpoint: 10.0.0.10:6443
containerRuntimeEndpoint: unix:///var/run/crio/crio.sock
bootstrapMode: init
joinKind: worker
cniPlugin: none
allowSchedulingOnControlPlane: true
skipImageCheck: false
kubeProxyNodePortAddresses:
- primary
subjectAltNames:
- 10.0.0.10
nodeLabels:
node-role.kubernetes.io/control-plane: ""
nodeAnnotations: {}
network:
hostname: monok8s-master-1
managementIface: eth0
managementCIDR: 10.0.0.10/24
managementGateway: 10.0.0.1
dnsNameservers:
- 1.1.1.1
- 8.8.8.8
dnsSearchDomains:
- lan
`
const OSUpgradeYAML = `apiVersion: monok8s.io/v1alpha1
kind: OSUpgrade
metadata:
name: example
namespace: kube-system
spec:
version: v0.0.1
imageURL: https://example.invalid/images/monok8s-v0.0.1.img.zst
targetPartition: B
nodeSelector:
- monok8s-master-1
force: false
`