sigs.k8s.io/cluster-api-provider-aws@v1.5.5/test/e2e/data/infrastructure-aws/e2e_test_templates/cluster-template-upgrades.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        sshKeyName: ${AWS_SSH_KEY_NAME}
   104  ---
   105  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   106  kind: KubeadmConfigTemplate
   107  metadata:
   108    name: ${CLUSTER_NAME}-md-0
   109  spec:
   110    template:
   111      spec:
   112        joinConfiguration:
   113          nodeRegistration:
   114            kubeletExtraArgs:
   115              cloud-provider: aws
   116            name: '{{ ds.meta_data.local_hostname }}'
   117  ---
   118  apiVersion: v1
   119  data: ${CNI_RESOURCES}
   120  kind: ConfigMap
   121  metadata:
   122    name: cni-${CLUSTER_NAME}-crs-0
   123  ---
   124  apiVersion: addons.cluster.x-k8s.io/v1beta1
   125  kind: ClusterResourceSet
   126  metadata:
   127    name: ${CLUSTER_NAME}-crs-0
   128  spec:
   129    clusterSelector:
   130      matchLabels:
   131        cni: ${CLUSTER_NAME}-crs-0
   132    resources:
   133    - kind: ConfigMap
   134      name: cni-${CLUSTER_NAME}-crs-0
   135    strategy: ApplyOnce
   136  ---
   137  apiVersion: cluster.x-k8s.io/v1beta1
   138  kind: MachinePool
   139  metadata:
   140    name: ${CLUSTER_NAME}-mp-0
   141  spec:
   142    clusterName: ${CLUSTER_NAME}
   143    replicas: ${WORKER_MACHINE_COUNT}
   144    template:
   145      spec:
   146        bootstrap:
   147          configRef:
   148            apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   149            kind: KubeadmConfig
   150            name: ${CLUSTER_NAME}-mp-0
   151        clusterName: ${CLUSTER_NAME}
   152        infrastructureRef:
   153          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   154          kind: AWSMachinePool
   155          name: ${CLUSTER_NAME}-mp-0
   156        version: ${KUBERNETES_VERSION}
   157  ---
   158  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   159  kind: AWSMachinePool
   160  metadata:
   161    name: ${CLUSTER_NAME}-mp-0
   162  spec:
   163    awsLaunchTemplate:
   164      iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io
   165      instanceType: ${AWS_CONTROL_PLANE_MACHINE_TYPE}
   166      sshKeyName: ${AWS_SSH_KEY_NAME}
   167    maxSize: 4
   168    minSize: 1
   169  ---
   170  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   171  kind: KubeadmConfig
   172  metadata:
   173    name: ${CLUSTER_NAME}-mp-0
   174  spec:
   175    joinConfiguration:
   176      nodeRegistration:
   177        kubeletExtraArgs:
   178          cloud-provider: aws
   179        name: '{{ ds.meta_data.local_hostname }}'