sigs.k8s.io/cluster-api-provider-aws@v1.5.5/test/e2e/data/infrastructure-aws/kustomize_sources/topology/clusterclass-quick-start.yaml (about)

     1  apiVersion: cluster.x-k8s.io/v1beta1
     2  kind: ClusterClass
     3  metadata:
     4    name: quick-start
     5  spec:
     6    controlPlane:
     7      ref:
     8        apiVersion: controlplane.cluster.x-k8s.io/v1beta1
     9        kind: KubeadmControlPlaneTemplate
    10        name: quick-start-control-plane
    11      machineInfrastructure:
    12        ref:
    13          kind: AWSMachineTemplate
    14          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    15          name: quick-start-control-plane
    16    infrastructure:
    17      ref:
    18        apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    19        kind: AWSClusterTemplate
    20        name: quick-start
    21    workers:
    22      machineDeployments:
    23      - class: default-worker
    24        template:
    25          bootstrap:
    26            ref:
    27              apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
    28              kind: KubeadmConfigTemplate
    29              name: quick-start-worker-bootstraptemplate
    30          infrastructure:
    31            ref:
    32              apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    33              kind: AWSMachineTemplate
    34              name: quick-start-worker-machinetemplate
    35    variables:
    36    - name: region
    37      required: true
    38      schema:
    39        openAPIV3Schema:
    40          type: string
    41          default: us-east-1
    42    - name: sshKeyName
    43      required: true
    44      schema:
    45        openAPIV3Schema:
    46          type: string
    47          default: default
    48    - name: controlPlaneMachineType
    49      required: true
    50      schema:
    51        openAPIV3Schema:
    52          type: string
    53          default: t3.large
    54    - name: workerMachineType
    55      required: true
    56      schema:
    57        openAPIV3Schema:
    58          type: string
    59          default: t3.large
    60    - name: secureSecretsBackend
    61      required: false
    62      schema:
    63        openAPIV3Schema:
    64          type: string
    65          default: secrets-manager
    66    - name: healthCheckProtocol
    67      required: false
    68      schema:
    69        openAPIV3Schema:
    70          type: string
    71          default: SSL
    72    patches:
    73    - name: awsClusterTemplateGeneral
    74      definitions:
    75        - selector:
    76            apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    77            kind: AWSClusterTemplate
    78            matchResources:
    79              infrastructureCluster: true
    80          jsonPatches:
    81            - op: add
    82              path: "/spec/template/spec/region"
    83              valueFrom:
    84                variable: region
    85            - op: add
    86              path: "/spec/template/spec/sshKeyName"
    87              valueFrom:
    88                variable: sshKeyName
    89    - name: awsMachineTemplateControlPlane
    90      definitions:
    91        - selector:
    92            apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    93            kind: AWSMachineTemplate
    94            matchResources:
    95              controlPlane: true
    96          jsonPatches:
    97            - op: replace
    98              path: "/spec/template/spec/instanceType"
    99              valueFrom:
   100                variable: controlPlaneMachineType
   101            - op: add
   102              path: "/spec/template/spec/sshKeyName"
   103              valueFrom:
   104                variable: sshKeyName
   105    - name: awsMachineTemplateWorker
   106      definitions:
   107        - selector:
   108            apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   109            kind: AWSMachineTemplate
   110            matchResources:
   111              machineDeploymentClass:
   112                names:
   113                  - default-worker
   114          jsonPatches:
   115            - op: replace
   116              path: "/spec/template/spec/instanceType"
   117              valueFrom:
   118                variable: workerMachineType
   119            - op: add
   120              path: "/spec/template/spec/sshKeyName"
   121              valueFrom:
   122                variable: sshKeyName
   123    - name: secureSecretsBackend
   124      enabledIf: '{{if .secureSecretsBackend }}true{{end}}'
   125      definitions:
   126        - selector:
   127            apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   128            kind: AWSMachineTemplate
   129            matchResources:
   130              controlPlane: true
   131          jsonPatches:
   132            - op: add
   133              path: "/spec/template/spec/cloudInit/secureSecretsBackend"
   134              valueFrom:
   135                variable: secureSecretsBackend
   136        - selector:
   137            apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   138            kind: AWSMachineTemplate
   139            matchResources:
   140              machineDeploymentClass:
   141                names:
   142                  - default-worker
   143          jsonPatches:
   144            - op: add
   145              path: "/spec/template/spec/cloudInit/secureSecretsBackend"
   146              valueFrom:
   147                variable: secureSecretsBackend
   148    - name: healthCheckProtocol
   149      enabledIf: '{{if .healthCheckProtocol }}true{{end}}'
   150      definitions:
   151        - selector:
   152            apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   153            kind: AWSClusterTemplate
   154            matchResources:
   155              infrastructureCluster: true
   156          jsonPatches:
   157            - op: add
   158              path: "/spec/template/spec/controlPlaneLoadBalancer/healthCheckProtocol"
   159              valueFrom:
   160                variable: healthCheckProtocol
   161  ---
   162  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   163  kind: AWSClusterTemplate
   164  metadata:
   165    name: quick-start
   166  spec:
   167    template:
   168      spec: {}
   169  ---
   170  kind: KubeadmControlPlaneTemplate
   171  apiVersion: controlplane.cluster.x-k8s.io/v1beta1
   172  metadata:
   173    name: quick-start-control-plane
   174  spec:
   175    template:
   176      spec:
   177        kubeadmConfigSpec:
   178          clusterConfiguration:
   179            apiServer:
   180              extraArgs:
   181                cloud-provider: aws
   182            controllerManager:
   183              extraArgs:
   184                cloud-provider: aws
   185          initConfiguration:
   186            nodeRegistration:
   187              name: '{{ ds.meta_data.local_hostname }}'
   188              kubeletExtraArgs:
   189                cloud-provider: aws
   190          joinConfiguration:
   191            nodeRegistration:
   192              name: '{{ ds.meta_data.local_hostname }}'
   193              kubeletExtraArgs:
   194                cloud-provider: aws
   195  ---
   196  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   197  kind: AWSMachineTemplate
   198  metadata:
   199    name: quick-start-control-plane
   200  spec:
   201    template:
   202      spec:
   203        # instanceType is a required field (OpenAPI schema).
   204        instanceType: REPLACEME
   205        iamInstanceProfile: "control-plane.cluster-api-provider-aws.sigs.k8s.io"
   206        cloudInit: {}
   207  ---
   208  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   209  kind: AWSMachineTemplate
   210  metadata:
   211    name: quick-start-worker-machinetemplate
   212  spec:
   213    template:
   214      spec:
   215        # instanceType is a required field (OpenAPI schema).
   216        instanceType: REPLACEME
   217        iamInstanceProfile: "nodes.cluster-api-provider-aws.sigs.k8s.io"
   218        cloudInit: {}
   219  ---
   220  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   221  kind: KubeadmConfigTemplate
   222  metadata:
   223    name: quick-start-worker-bootstraptemplate
   224  spec:
   225    template:
   226      spec:
   227        joinConfiguration:
   228          nodeRegistration:
   229            name: '{{ ds.meta_data.local_hostname }}'
   230            kubeletExtraArgs:
   231              cloud-provider: aws