sigs.k8s.io/cluster-api-provider-aws@v1.5.5/test/e2e/data/infrastructure-aws/e2e_test_templates/cluster-template-nested-multitenancy.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    bastion:
    27      enabled: true
    28    identityRef:
    29      kind: AWSClusterRoleIdentity
    30      name: ${MULTI_TENANCY_NESTED_IDENTITY_NAME}
    31    network:
    32      vpc:
    33        availabilityZoneUsageLimit: 1
    34    region: ${AWS_REGION}
    35    sshKeyName: ${AWS_SSH_KEY_NAME}
    36  ---
    37  apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    38  kind: KubeadmControlPlane
    39  metadata:
    40    name: ${CLUSTER_NAME}-control-plane
    41  spec:
    42    kubeadmConfigSpec:
    43      clusterConfiguration:
    44        apiServer:
    45          extraArgs:
    46            cloud-provider: aws
    47        controllerManager:
    48          extraArgs:
    49            cloud-provider: aws
    50      initConfiguration:
    51        nodeRegistration:
    52          kubeletExtraArgs:
    53            cloud-provider: aws
    54          name: '{{ ds.meta_data.local_hostname }}'
    55      joinConfiguration:
    56        nodeRegistration:
    57          kubeletExtraArgs:
    58            cloud-provider: aws
    59          name: '{{ ds.meta_data.local_hostname }}'
    60    machineTemplate:
    61      infrastructureRef:
    62        apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    63        kind: AWSMachineTemplate
    64        name: ${CLUSTER_NAME}-control-plane
    65    replicas: ${CONTROL_PLANE_MACHINE_COUNT}
    66    version: ${KUBERNETES_VERSION}
    67  ---
    68  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    69  kind: AWSMachineTemplate
    70  metadata:
    71    name: ${CLUSTER_NAME}-control-plane
    72  spec:
    73    template:
    74      spec:
    75        iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io
    76        instanceType: ${AWS_CONTROL_PLANE_MACHINE_TYPE}
    77        sshKeyName: ${AWS_SSH_KEY_NAME}
    78  ---
    79  apiVersion: cluster.x-k8s.io/v1beta1
    80  kind: MachineDeployment
    81  metadata:
    82    name: ${CLUSTER_NAME}-md-0
    83  spec:
    84    clusterName: ${CLUSTER_NAME}
    85    replicas: ${WORKER_MACHINE_COUNT}
    86    selector:
    87      matchLabels: null
    88    template:
    89      spec:
    90        bootstrap:
    91          configRef:
    92            apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
    93            kind: KubeadmConfigTemplate
    94            name: ${CLUSTER_NAME}-md-0
    95        clusterName: ${CLUSTER_NAME}
    96        infrastructureRef:
    97          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    98          kind: AWSMachineTemplate
    99          name: ${CLUSTER_NAME}-md-0
   100        version: ${KUBERNETES_VERSION}
   101  ---
   102  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   103  kind: AWSMachineTemplate
   104  metadata:
   105    name: ${CLUSTER_NAME}-md-0
   106  spec:
   107    template:
   108      spec:
   109        iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io
   110        instanceType: ${AWS_NODE_MACHINE_TYPE}
   111        sshKeyName: ${AWS_SSH_KEY_NAME}
   112        subnet:
   113          filters:
   114          - name: availabilityZone
   115            values:
   116            - us-west-2a
   117          - name: tag-key
   118            values:
   119            - kubernetes.io/role/internal-elb
   120  ---
   121  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   122  kind: KubeadmConfigTemplate
   123  metadata:
   124    name: ${CLUSTER_NAME}-md-0
   125  spec:
   126    template:
   127      spec:
   128        joinConfiguration:
   129          nodeRegistration:
   130            kubeletExtraArgs:
   131              cloud-provider: aws
   132            name: '{{ ds.meta_data.local_hostname }}'
   133  ---
   134  apiVersion: v1
   135  data: ${CNI_RESOURCES}
   136  kind: ConfigMap
   137  metadata:
   138    name: cni-${CLUSTER_NAME}-crs-0
   139  ---
   140  apiVersion: addons.cluster.x-k8s.io/v1beta1
   141  kind: ClusterResourceSet
   142  metadata:
   143    name: ${CLUSTER_NAME}-crs-0
   144  spec:
   145    clusterSelector:
   146      matchLabels:
   147        cni: ${CLUSTER_NAME}-crs-0
   148    resources:
   149    - kind: ConfigMap
   150      name: cni-${CLUSTER_NAME}-crs-0
   151    strategy: ApplyOnce
   152  ---
   153  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   154  kind: AWSClusterRoleIdentity
   155  metadata:
   156    name: ${MULTI_TENANCY_JUMP_IDENTITY_NAME}
   157  spec:
   158    allowedNamespaces: {}
   159    durationSeconds: 900
   160    roleARN: ${MULTI_TENANCY_JUMP_ROLE_ARN}
   161    sessionName: ${MULTI_TENANCY_JUMP_IDENTITY_NAME}-session
   162    sourceIdentityRef:
   163      kind: AWSClusterControllerIdentity
   164      name: default
   165  ---
   166  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   167  kind: AWSClusterRoleIdentity
   168  metadata:
   169    name: ${MULTI_TENANCY_NESTED_IDENTITY_NAME}
   170  spec:
   171    allowedNamespaces: {}
   172    roleARN: ${MULTI_TENANCY_NESTED_ROLE_ARN}
   173    sessionName: ${MULTI_TENANCY_NESTED_IDENTITY_NAME}-session
   174    sourceIdentityRef:
   175      kind: AWSClusterRoleIdentity
   176      name: ${MULTI_TENANCY_JUMP_IDENTITY_NAME}