Skip to content

Commit

Permalink
Merge pull request #6005 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…5994-to-release-1.1

📖 ClusterClass: fix YAMLs in proposal
  • Loading branch information
k8s-ci-robot authored Jan 27, 2022
2 parents c0951a8 + 3c0d58b commit dc4be40
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions docs/proposals/202105256-cluster-class-and-managed-topologies.md
Original file line number Diff line number Diff line change
Expand Up @@ -770,17 +770,22 @@ intentionally use resources without patches and variables to focus on the simple
##### Create a new Cluster using ClusterClass object
1. User creates a ClusterClass object.
```yaml
apiVersion: cluster.x-k8s.io/v1alpha4
apiVersion: cluster.x-k8s.io/v1beta1
kind: ClusterClass
metadata:
name: mixed
namespace: bar
spec:
controlPlane:
ref:
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlaneTemplate
name: vsphere-prod-cluster-template-kcp
machineInfrastructure:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereMachineTemplate
name: linux-vsphere-template
# This will create a MachineHealthCheck for ControlPlane machines.
machineHealthCheck:
nodeStartupTimeout: 3m
Expand All @@ -793,17 +798,17 @@ intentionally use resources without patches and variables to focus on the simple
status: "False"
timeout: 300s
workers:
deployments:
machineDeployments:
- class: linux-worker
template:
bootstrap:
ref:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
name: existing-boot-ref
infrastructure:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereMachineTemplate
name: linux-vsphere-template
# This will create a health check for each deployment created with the "linux-worker" MachineDeploymentClass
Expand All @@ -814,17 +819,17 @@ intentionally use resources without patches and variables to focus on the simple
timeout: 300s
- type: Ready
status: "False"
timeout: 300s
timeout: 300s
- class: windows-worker
template:
bootstrap:
ref:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
name: existing-boot-ref-windows
infrastructure:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereMachineTemplate
name: windows-vsphere-template
# This will create a health check for each deployment created with the "windows-worker" MachineDeploymentClass
Expand All @@ -835,16 +840,16 @@ intentionally use resources without patches and variables to focus on the simple
timeout: 300s
- type: Ready
status: "False"
timeout: 300s
timeout: 300s
infrastructure:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereClusterTemplate
name: vsphere-prod-cluster-template
```
2. User creates a cluster using the class name and defining the topology.
```yaml
apiVersion: cluster.x-k8s.io/v1alpha4
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: foo
Expand Down Expand Up @@ -941,7 +946,7 @@ to avoid creating separate ClusterClasses for every small deviation, e.g. a diff

1. User creates a ClusterClass object with variables and patches (other fields are omitted for brevity).
```yaml
apiVersion: cluster.x-k8s.io/v1alpha4
apiVersion: cluster.x-k8s.io/v1beta1
kind: ClusterClass
metadata:
name: my-cluster-class
Expand All @@ -962,7 +967,7 @@ to avoid creating separate ClusterClasses for every small deviation, e.g. a diff
- name: region
definitions:
- selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AWSClusterTemplate
jsonPatches:
- op: replace
Expand All @@ -972,7 +977,7 @@ to avoid creating separate ClusterClasses for every small deviation, e.g. a diff
- name: controlPlaneMachineType
definitions:
- selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AWSMachineTemplate
matchResources:
controlPlane: true
Expand All @@ -987,7 +992,7 @@ to avoid creating separate ClusterClasses for every small deviation, e.g. a diff

1. User creates a Cluster referencing the ClusterClass created above and defining variables (other fields are omitted for brevity).
```yaml
apiVersion: cluster.x-k8s.io/v1alpha4
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: my-cluster
Expand Down

0 comments on commit dc4be40

Please sign in to comment.