sigs.k8s.io/cluster-api@v1.6.3/cmd/clusterctl/client/cluster/assets/topology-test/new-clusterclass-and-cluster.yaml (about)

     1  apiVersion: v1
     2  kind: Namespace
     3  metadata:
     4    name: default
     5  spec: {}
     6  ---
     7  apiVersion: cluster.x-k8s.io/v1beta1
     8  kind: ClusterClass
     9  metadata:
    10    name: my-cluster-class
    11    namespace: default
    12  spec:
    13    variables:
    14      - name: imageRepository
    15        required: true
    16        schema:
    17          openAPIV3Schema:
    18            type: string
    19            default: "registry.k8s.io"
    20            example: "registry.k8s.io"
    21    controlPlane:
    22      ref:
    23        apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    24        kind: KubeadmControlPlaneTemplate
    25        name: control-plane
    26        namespace: default
    27      machineInfrastructure:
    28        ref:
    29          kind: DockerMachineTemplate
    30          apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    31          name: "control-plane"
    32          namespace: default
    33    infrastructure:
    34      ref:
    35        apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    36        kind: DockerClusterTemplate
    37        name: my-cluster
    38        namespace: default
    39    workers:
    40      machineDeployments:
    41      - class: "default-worker"
    42        template:
    43          bootstrap:
    44            ref:
    45              apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
    46              kind: KubeadmConfigTemplate
    47              name: docker-worker-bootstraptemplate
    48          infrastructure:
    49            ref:
    50              apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    51              kind: DockerMachineTemplate
    52              name: docker-worker-machinetemplate
    53      - class: "default-worker-2"
    54        template:
    55          bootstrap:
    56            ref:
    57              apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
    58              kind: KubeadmConfigTemplate
    59              name: docker-worker-bootstraptemplate
    60          infrastructure:
    61            ref:
    62              apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    63              kind: DockerMachineTemplate
    64              name: docker-worker-machinetemplate
    65  ---
    66  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    67  kind: DockerClusterTemplate
    68  metadata:
    69    name: my-cluster
    70    namespace: default
    71  spec:
    72    template:
    73      spec: {}
    74  ---
    75  kind: KubeadmControlPlaneTemplate
    76  apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    77  metadata:
    78    name: "control-plane"
    79    namespace: default
    80  spec:
    81    template:
    82      spec:
    83        replicas: 1
    84        machineTemplate:
    85          nodeDrainTimeout: 1s
    86          infrastructureRef:
    87            kind: DockerMachineTemplate
    88            apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    89            name: "control-plane"
    90            namespace: default
    91        kubeadmConfigSpec:
    92          clusterConfiguration:
    93            controllerManager:
    94              extraArgs: { enable-hostpath-provisioner: 'true' }
    95            apiServer:
    96              certSANs: [ localhost, 127.0.0.1 ]
    97          initConfiguration:
    98            nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.
    99          joinConfiguration:
   100            nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.
   101        version: v1.21.2
   102  ---
   103  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   104  kind: DockerMachineTemplate
   105  metadata:
   106    name: "control-plane"
   107    namespace: default
   108  spec:
   109    template:
   110      spec:
   111        preLoadImages: 
   112        - gcr.io/kakaraparthy-devel/kindest/kindnetd:0.5.4
   113        extraMounts:
   114        - containerPath: "/var/run/docker.sock"
   115          hostPath: "/var/run/docker.sock"
   116  ---
   117  apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
   118  kind: DockerMachineTemplate
   119  metadata:
   120    name: "docker-worker-machinetemplate"
   121    namespace: default
   122  spec:
   123    template:
   124      spec:
   125        preLoadImages: 
   126        - gcr.io/kakaraparthy-devel/kindest/kindnetd:0.5.4
   127  ---
   128  apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
   129  kind: KubeadmConfigTemplate
   130  metadata:
   131    name: "docker-worker-bootstraptemplate"
   132    namespace: default
   133  spec:
   134    template:
   135      spec:
   136        joinConfiguration:
   137          nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.
   138  
   139  ---
   140  apiVersion: cluster.x-k8s.io/v1beta1
   141  kind: Cluster
   142  metadata:
   143    name: "my-cluster"
   144    namespace: default
   145    labels:
   146      cni: kindnet
   147  spec:
   148    clusterNetwork:
   149      services:
   150        cidrBlocks: ["10.128.0.0/12"]
   151      pods:
   152        cidrBlocks: ["192.168.0.0/16"]
   153      serviceDomain: "cluster.local"
   154    topology:
   155      class: my-cluster-class
   156      version: v1.21.2
   157      controlPlane:
   158        metadata: {}
   159        replicas: 1
   160      workers:
   161        machineDeployments:
   162        - class: "default-worker"
   163          name: "md-0"
   164          replicas: 1
   165        - class: "default-worker"
   166          name: "md-1"
   167          replicas: 1