github.com/sealerio/sealer@v0.11.1-0.20240507115618-f4f89c5853ae/utils/test/file/Clusterfile (about) 1 # Copyright © 2021 Alibaba Group Holding Ltd. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 #Clusterfile for test 16 apiVersion: sealer.io/v2 17 kind: KubeadmConfig 18 metadata: 19 name: default-kubernetes-config 20 spec: 21 localAPIEndpoint: 22 advertiseAddress: 192.168.2.110 23 bindPort: 6443 24 nodeRegistration: 25 criSocket: /var/run/dockershim.sock 26 kubernetesVersion: v1.19.8 27 controlPlaneEndpoint: "apiserver.cluster.local:6443" 28 imageRepository: sea.hub:5000/library 29 networking: 30 podSubnet: 100.64.0.0/10 31 serviceSubnet: 10.96.0.0/22 32 apiServer: 33 certSANs: 34 - sealer.cloud 35 - 127.0.0.1 36 - Partial.custom.config 37 clusterDomain: cluster.local 38 nodeLeaseDurationSeconds: 99 39 nodeStatusReportFrequency: 99s 40 nodeStatusUpdateFrequency: 99s 41 --- 42 apiVersion: sealer.io/v2 43 kind: Cluster 44 metadata: 45 name: alicloud 46 spec: 47 provider: ALI_CLOUD 48 ssh: 49 passwd: xxx 50 port: 2222 51 hosts: 52 - count: 3 53 role: [ master ] 54 cpu: 4 55 memory: 4 56 systemDisk: 100 57 dataDisk: [ 100,200 ] 58 - count: 3 59 role: [ node ] 60 cpu: 4 61 memory: 4 62 systemDisk: 100 63 dataDisk: [ 100, 200 ] 64 --- 65 apiVersion: kubelet.config.k8s.io/v1beta1 66 kind: KubeletConfiguration 67 authentication: 68 anonymous: 69 enabled: false 70 webhook: 71 cacheTTL: 2m0s 72 enabled: true 73 x509: 74 clientCAFile: /etc/kubernetes/pki/ca.crt 75 authorization: 76 mode: Webhook 77 webhook: 78 cacheAuthorizedTTL: 5m0s 79 cacheUnauthorizedTTL: 30s 80 cgroupsPerQOS: true 81 clusterDomain: cluster.local 82 configMapAndSecretChangeDetectionStrategy: Watch 83 containerLogMaxFiles: 5 84 containerLogMaxSize: 10Mi 85 contentType: application/vnd.kubernetes.protobuf 86 cpuCFSQuota: true 87 cpuCFSQuotaPeriod: 100ms 88 cpuManagerPolicy: none 89 cpuManagerReconcilePeriod: 10s 90 enableControllerAttachDetach: true 91 enableDebuggingHandlers: true 92 enforceNodeAllocatable: 93 - pods 94 eventBurst: 10 95 eventRecordQPS: 5 96 evictionHard: 97 imagefs.available: 15% 98 memory.available: 100Mi 99 nodefs.available: 10% 100 nodefs.inodesFree: 5% 101 evictionPressureTransitionPeriod: 5m0s 102 failSwapOn: true 103 fileCheckFrequency: 20s 104 hairpinMode: promiscuous-bridge 105 healthzBindAddress: 127.0.0.1 106 healthzPort: 10248 107 httpCheckFrequency: 20s 108 imageGCHighThresholdPercent: 85 109 imageGCLowThresholdPercent: 80 110 imageMinimumGCAge: 2m0s 111 iptablesDropBit: 15 112 iptablesMasqueradeBit: 14 113 kubeAPIBurst: 10 114 kubeAPIQPS: 5 115 makeIPTablesUtilChains: true 116 maxOpenFiles: 1000000 117 maxPods: 110 118 nodeLeaseDurationSeconds: 40 119 nodeStatusReportFrequency: 10s 120 nodeStatusUpdateFrequency: 10s 121 oomScoreAdj: -999 122 podPidsLimit: -1 123 port: 10250 124 registryBurst: 10 125 registryPullQPS: 5 126 rotateCertificates: true 127 runtimeRequestTimeout: 2m0s 128 serializeImagePulls: true 129 staticPodPath: /etc/kubernetes/manifests 130 streamingConnectionIdleTimeout: 4h0m0s 131 syncFrequency: 1m0s 132 volumeStatsAggPeriod: 1m0s 133 --- 134 apiVersion: kubeadm.k8s.io/v1beta3 135 kind: ClusterConfiguration 136 networking: 137 podSubnet: 100.64.0.0/10 138 serviceSubnet: 10.96.0.0/22 139 apiServer: 140 certSANs: 141 - default.raw.config 142 --- 143 apiVersion: kubeadm.k8s.io/v1beta3 144 kind: InitConfiguration 145 localAPIEndpoint: 146 advertiseAddress: 127.0.0.1 147 bindPort: 6443 148 nodeRegistration: 149 criSocket: /var/run/dockershim.sock 150 --- 151 152 apiVersion: zlink.aliyun.com/v1alpha1 153 kind: Cluster 154 metadata: 155 name: my-test-cluster 156 spec: 157 image: sealer-io/kubernetes:v1.19.8 158 provider: ALI_CLOUD 159 ssh: 160 passwd: Sealer123 161 pk: xxx 162 pkPasswd: xxx 163 user: root 164 network: 165 podCIDR: 100.64.0.0/10 166 svcCIDR: 10.96.0.0/22 167 certSANS: 168 - aliyun-inc.com 169 - 10.0.0.2 170 171 masters: 172 cpu: 4 173 memory: 4 174 count: 1 175 systemDisk: 100 176 dataDisks: 177 - 100 178 nodes: 179 cpu: 4 180 memory: 4 181 count: 1 182 systemDisk: 100 183 dataDisks: 184 - 100 185 --- 186 apiVersion: sealer.io/v1 187 kind: Config 188 metadata: 189 name: mysql-config 190 spec: 191 path: etc/mysql.yaml 192 data: | 193 test 194 --- 195 apiVersion: sealer.io/v1 196 kind: Config 197 metadata: 198 name: redis-config 199 spec: 200 path: etc/redis.yaml 201 data: | 202 test 203 --- 204 apiVersion: sealer.io/v1 205 kind: Plugin 206 metadata: 207 name: clusterfile_originally 208 spec: 209 type: SHELL 210 action: Originally 211 data: | 212 hostname && echo "$env: OriginallyShell was successfully run from Clusterfile" 213 --- 214 apiVersion: sealer.io/v1 215 kind: Plugin 216 metadata: 217 name: clusterfile_prejoin 218 spec: 219 type: SHELL 220 action: PreJoin 221 data: | 222 hostname && echo "$env: PreJoin from Clusterfile was successfully run from Clusterfile" 223 --- 224 apiVersion: sealer.aliyun.com/v2alpha1 225 kind: Plugin 226 metadata: 227 name: clusterfile_PostInstall_PostJoin 228 spec: 229 action: PostInstall|PostJoin 230 type: SHELL 231 'on': "sealer-test=true" 232 data: | 233 hostname && echo "PostInstall|PostJoin from Clusterfile on sealer-test=true" `date` 234 --- 235 apiVersion: sealer.io/v1 236 kind: Plugin 237 metadata: 238 name: clusterfile_postjoin 239 spec: 240 type: SHELL 241 action: PostJoin 242 data: | 243 hostname && echo "$env: PostJoin was successfully run from Clusterfile" 244 --- 245 apiVersion: sealer.io/v1 246 kind: Plugin 247 metadata: 248 name: clusterfile_preclean 249 spec: 250 type: SHELL 251 action: PreClean 252 data: | 253 hostname && echo "$env: PreClean was successfully run from Clusterfile" 254 --- 255 apiVersion: sealer.io/v1 256 kind: Plugin 257 metadata: 258 name: clusterfile_postclean 259 spec: 260 type: SHELL 261 action: PostClean 262 data: | 263 hostname && echo "$env: PostJoin was successfully run from Clusterfile" 264 --- 265 apiVersion: sealer.io/v1 266 kind: Plugin 267 metadata: 268 name: clusterfile_postinstall 269 spec: 270 type: SHELL 271 action: PostInstall 272 data: | 273 echo "$env: PostInstallShell was successfully run from Clusterfile" 274 --- 275 apiVersion: sealer.io/v1 276 kind: Plugin 277 metadata: 278 name: LABEL 279 spec: 280 type: LABEL 281 action: PreGuest 282 data: | 283 172.17.102.186 ssd=true 284 --- 285 apiVersion: sealer.io/v1 286 kind: Plugin 287 metadata: 288 name: HOSTNAME 289 spec: 290 type: HOSTNAME 291 action: PreInit 292 data: | 293 172.17.102.186 master-0