|
| 1 | +--- |
| 2 | +apiVersion: cluster.x-k8s.io/v1beta1 |
| 3 | +kind: Cluster |
| 4 | +metadata: |
| 5 | + name: ${CLUSTER_NAME} |
| 6 | +spec: |
| 7 | + clusterNetwork: |
| 8 | + pods: |
| 9 | + cidrBlocks: ${POD_CIDR:=[10.244.0.0/16]} |
| 10 | + services: |
| 11 | + cidrBlocks: ${SERVICE_CIDR:=[10.96.0.0/12]} |
| 12 | + serviceDomain: cluster.local |
| 13 | + controlPlaneRef: |
| 14 | + apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 |
| 15 | + kind: TalosControlPlane |
| 16 | + name: ${CLUSTER_NAME}-control-plane |
| 17 | + infrastructureRef: |
| 18 | + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 |
| 19 | + kind: LXCCluster |
| 20 | + name: ${CLUSTER_NAME} |
| 21 | +--- |
| 22 | +apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 |
| 23 | +kind: TalosControlPlane |
| 24 | +metadata: |
| 25 | + name: ${CLUSTER_NAME}-control-plane |
| 26 | +spec: |
| 27 | + replicas: ${CONTROL_PLANE_MACHINE_COUNT} |
| 28 | + version: ${KUBERNETES_VERSION} |
| 29 | + infrastructureTemplate: |
| 30 | + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 |
| 31 | + kind: LXCMachineTemplate |
| 32 | + name: ${CLUSTER_NAME}-control-plane |
| 33 | + controlPlaneConfig: |
| 34 | + controlplane: |
| 35 | + generateType: controlplane |
| 36 | + talosVersion: ${TALOS_VERSION} |
| 37 | + hostname: |
| 38 | + source: InfrastructureName |
| 39 | +--- |
| 40 | +apiVersion: cluster.x-k8s.io/v1beta1 |
| 41 | +kind: MachineDeployment |
| 42 | +metadata: |
| 43 | + name: ${CLUSTER_NAME}-md-0 |
| 44 | +spec: |
| 45 | + clusterName: ${CLUSTER_NAME} |
| 46 | + replicas: ${WORKER_MACHINE_COUNT} |
| 47 | + selector: |
| 48 | + matchLabels: |
| 49 | + template: |
| 50 | + spec: |
| 51 | + version: ${KUBERNETES_VERSION} |
| 52 | + clusterName: ${CLUSTER_NAME} |
| 53 | + bootstrap: |
| 54 | + configRef: |
| 55 | + apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 |
| 56 | + kind: TalosConfigTemplate |
| 57 | + name: ${CLUSTER_NAME}-md-0 |
| 58 | + infrastructureRef: |
| 59 | + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 |
| 60 | + kind: LXCMachineTemplate |
| 61 | + name: ${CLUSTER_NAME}-md-0 |
| 62 | +--- |
| 63 | +apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 |
| 64 | +kind: TalosConfigTemplate |
| 65 | +metadata: |
| 66 | + name: ${CLUSTER_NAME}-md-0 |
| 67 | +spec: |
| 68 | + template: |
| 69 | + spec: |
| 70 | + generateType: worker |
| 71 | + talosVersion: ${TALOS_VERSION} |
| 72 | + hostname: |
| 73 | + source: InfrastructureName |
| 74 | +--- |
| 75 | +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 |
| 76 | +kind: LXCCluster |
| 77 | +metadata: |
| 78 | + name: ${CLUSTER_NAME} |
| 79 | +spec: |
| 80 | + secretRef: |
| 81 | + name: ${LXC_SECRET_NAME} |
| 82 | + cloudProviderNodePatch: true |
| 83 | + loadBalancer: |
| 84 | + ${LXC_LOAD_BALANCER_TYPE:=lxc}: |
| 85 | + instanceSpec: |
| 86 | + flavor: ${LOAD_BALANCER_MACHINE_FLAVOR:=""} |
| 87 | + profiles: ${LOAD_BALANCER_MACHINE_PROFILES:=[default]} |
| 88 | + disableHealthzCheck: true |
| 89 | +--- |
| 90 | +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 |
| 91 | +kind: LXCMachineTemplate |
| 92 | +metadata: |
| 93 | + name: ${CLUSTER_NAME}-control-plane |
| 94 | +spec: |
| 95 | + template: |
| 96 | + spec: |
| 97 | + instanceType: virtual-machine |
| 98 | + config: |
| 99 | + security.secureboot: "${TALOS_IMAGE_SECURE_BOOT:=false}" |
| 100 | + devices: |
| 101 | + - cloud-init,type=disk,source=cloud-init:config |
| 102 | + image: |
| 103 | + name: ${TALOS_IMAGE_NAME} |
| 104 | + flavor: ${CONTROL_PLANE_MACHINE_FLAVOR} |
| 105 | + profiles: ${CONTROL_PLANE_MACHINE_PROFILES:=[default]} |
| 106 | +--- |
| 107 | +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 |
| 108 | +kind: LXCMachineTemplate |
| 109 | +metadata: |
| 110 | + name: ${CLUSTER_NAME}-md-0 |
| 111 | +spec: |
| 112 | + template: |
| 113 | + spec: |
| 114 | + instanceType: virtual-machine |
| 115 | + config: |
| 116 | + security.secureboot: "${TALOS_IMAGE_SECURE_BOOT:=false}" |
| 117 | + devices: |
| 118 | + - cloud-init,type=disk,source=cloud-init:config |
| 119 | + image: |
| 120 | + name: ${TALOS_IMAGE_NAME} |
| 121 | + flavor: ${WORKER_MACHINE_FLAVOR} |
| 122 | + profiles: ${WORKER_MACHINE_PROFILES:=[default]} |
0 commit comments