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