sigs.k8s.io/cluster-api-provider-aws@v1.5.5/test/e2e/data/infrastructure-aws/e2e_test_templates/cluster-template-spot-instances.yaml (about) 1 apiVersion: cluster.x-k8s.io/v1beta1 2 kind: Cluster 3 metadata: 4 labels: 5 cni: ${CLUSTER_NAME}-crs-0 6 name: ${CLUSTER_NAME} 7 spec: 8 clusterNetwork: 9 pods: 10 cidrBlocks: 11 - 192.168.0.0/16 12 controlPlaneRef: 13 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 14 kind: KubeadmControlPlane 15 name: ${CLUSTER_NAME}-control-plane 16 infrastructureRef: 17 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 18 kind: AWSCluster 19 name: ${CLUSTER_NAME} 20 --- 21 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 22 kind: AWSCluster 23 metadata: 24 name: ${CLUSTER_NAME} 25 spec: 26 region: ${AWS_REGION} 27 sshKeyName: ${AWS_SSH_KEY_NAME} 28 --- 29 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 30 kind: KubeadmControlPlane 31 metadata: 32 name: ${CLUSTER_NAME}-control-plane 33 spec: 34 kubeadmConfigSpec: 35 clusterConfiguration: 36 apiServer: 37 extraArgs: 38 cloud-provider: aws 39 controllerManager: 40 extraArgs: 41 cloud-provider: aws 42 initConfiguration: 43 nodeRegistration: 44 kubeletExtraArgs: 45 cloud-provider: aws 46 name: '{{ ds.meta_data.local_hostname }}' 47 joinConfiguration: 48 nodeRegistration: 49 kubeletExtraArgs: 50 cloud-provider: aws 51 name: '{{ ds.meta_data.local_hostname }}' 52 machineTemplate: 53 infrastructureRef: 54 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 55 kind: AWSMachineTemplate 56 name: ${CLUSTER_NAME}-control-plane 57 replicas: ${CONTROL_PLANE_MACHINE_COUNT} 58 version: ${KUBERNETES_VERSION} 59 --- 60 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 61 kind: AWSMachineTemplate 62 metadata: 63 name: ${CLUSTER_NAME}-control-plane 64 spec: 65 template: 66 spec: 67 iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io 68 instanceType: ${AWS_CONTROL_PLANE_MACHINE_TYPE} 69 sshKeyName: ${AWS_SSH_KEY_NAME} 70 --- 71 apiVersion: cluster.x-k8s.io/v1beta1 72 kind: MachineDeployment 73 metadata: 74 name: ${CLUSTER_NAME}-md-0 75 spec: 76 clusterName: ${CLUSTER_NAME} 77 replicas: ${WORKER_MACHINE_COUNT} 78 selector: 79 matchLabels: null 80 template: 81 spec: 82 bootstrap: 83 configRef: 84 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 85 kind: KubeadmConfigTemplate 86 name: ${CLUSTER_NAME}-md-0 87 clusterName: ${CLUSTER_NAME} 88 infrastructureRef: 89 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 90 kind: AWSMachineTemplate 91 name: ${CLUSTER_NAME}-md-0 92 version: ${KUBERNETES_VERSION} 93 --- 94 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 95 kind: AWSMachineTemplate 96 metadata: 97 name: ${CLUSTER_NAME}-md-0 98 spec: 99 template: 100 spec: 101 iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io 102 instanceType: ${AWS_NODE_MACHINE_TYPE} 103 spotMarketOptions: 104 maxPrice: "" 105 sshKeyName: ${AWS_SSH_KEY_NAME} 106 --- 107 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 108 kind: KubeadmConfigTemplate 109 metadata: 110 name: ${CLUSTER_NAME}-md-0 111 spec: 112 template: 113 spec: 114 joinConfiguration: 115 nodeRegistration: 116 kubeletExtraArgs: 117 cloud-provider: aws 118 name: '{{ ds.meta_data.local_hostname }}' 119 --- 120 apiVersion: v1 121 data: ${CNI_RESOURCES} 122 kind: ConfigMap 123 metadata: 124 name: cni-${CLUSTER_NAME}-crs-0 125 --- 126 apiVersion: addons.cluster.x-k8s.io/v1beta1 127 kind: ClusterResourceSet 128 metadata: 129 name: ${CLUSTER_NAME}-crs-0 130 spec: 131 clusterSelector: 132 matchLabels: 133 cni: ${CLUSTER_NAME}-crs-0 134 resources: 135 - kind: ConfigMap 136 name: cni-${CLUSTER_NAME}-crs-0 137 strategy: ApplyOnce