sigs.k8s.io/cluster-api-provider-aws@v1.5.5/test/e2e/data/infrastructure-aws/e2e_test_templates/cluster-template-external-infrastructure.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    network:
    27      subnets:
    28      - id: ${PUBLIC_SUBNET_ID}
    29      - id: ${PRIVATE_SUBNET_ID}
    30      vpc:
    31        availabilityZoneUsageLimit: 1
    32        id: ${VPC_ID}
    33    region: ${AWS_REGION}
    34    sshKeyName: ${AWS_SSH_KEY_NAME}
    35  ---
    36  apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    37  kind: KubeadmControlPlane
    38  metadata:
    39    name: ${CLUSTER_NAME}-control-plane
    40  spec:
    41    kubeadmConfigSpec:
    42      clusterConfiguration:
    43        apiServer:
    44          extraArgs:
    45            cloud-provider: aws
    46        controllerManager:
    47          extraArgs:
    48            cloud-provider: aws
    49      initConfiguration:
    50        nodeRegistration:
    51          kubeletExtraArgs:
    52            cloud-provider: aws
    53          name: '{{ ds.meta_data.local_hostname }}'
    54      joinConfiguration:
    55        nodeRegistration:
    56          kubeletExtraArgs:
    57            cloud-provider: aws
    58          name: '{{ ds.meta_data.local_hostname }}'
    59    machineTemplate:
    60      infrastructureRef:
    61        apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    62        kind: AWSMachineTemplate
    63        name: ${CLUSTER_NAME}-control-plane
    64    replicas: ${CONTROL_PLANE_MACHINE_COUNT}
    65    version: ${KUBERNETES_VERSION}
    66  ---
    67  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    68  kind: AWSMachineTemplate
    69  metadata:
    70    name: ${CLUSTER_NAME}-control-plane
    71  spec:
    72    template:
    73      spec:
    74        iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io
    75        instanceType: ${AWS_CONTROL_PLANE_MACHINE_TYPE}
    76        sshKeyName: ${AWS_SSH_KEY_NAME}
    77  ---
    78  apiVersion: cluster.x-k8s.io/v1beta1
    79  kind: MachineDeployment
    80  metadata:
    81    name: ${CLUSTER_NAME}-md-0
    82  spec:
    83    clusterName: ${CLUSTER_NAME}
    84    replicas: ${WORKER_MACHINE_COUNT}
    85    selector:
    86      matchLabels: null
    87    template:
    88      spec:
    89        bootstrap:
    90          configRef:
    91            apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
    92            kind: KubeadmConfigTemplate
    93            name: ${CLUSTER_NAME}-md-0
    94        clusterName: ${CLUSTER_NAME}
    95        infrastructureRef:
    96          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    97          kind: AWSMachineTemplate
    98          name: ${CLUSTER_NAME}-md-0
    99        version: ${KUBERNETES_VERSION}
   100  ---
   101  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   102  kind: AWSMachineTemplate
   103  metadata:
   104    name: ${CLUSTER_NAME}-md-0
   105  spec:
   106    template:
   107      spec:
   108        iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io
   109        instanceType: ${AWS_NODE_MACHINE_TYPE}
   110        sshKeyName: ${AWS_SSH_KEY_NAME}
   111  ---
   112  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   113  kind: KubeadmConfigTemplate
   114  metadata:
   115    name: ${CLUSTER_NAME}-md-0
   116  spec:
   117    template:
   118      spec:
   119        joinConfiguration:
   120          nodeRegistration:
   121            kubeletExtraArgs:
   122              cloud-provider: aws
   123            name: '{{ ds.meta_data.local_hostname }}'
   124  ---
   125  apiVersion: v1
   126  data: ${CNI_RESOURCES}
   127  kind: ConfigMap
   128  metadata:
   129    name: cni-${CLUSTER_NAME}-crs-0
   130  ---
   131  apiVersion: addons.cluster.x-k8s.io/v1beta1
   132  kind: ClusterResourceSet
   133  metadata:
   134    name: ${CLUSTER_NAME}-crs-0
   135  spec:
   136    clusterSelector:
   137      matchLabels:
   138        cni: ${CLUSTER_NAME}-crs-0
   139    resources:
   140    - kind: ConfigMap
   141      name: cni-${CLUSTER_NAME}-crs-0
   142    strategy: ApplyOnce