Merge pull request #130 from scottslowe/capi-kustomize

Add examples of using CAPI with kustomize
This commit is contained in:
Scott S. Lowe 2019-11-13 11:58:29 +09:00 committed by GitHub
commit 5f6c4c99c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 834 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# Using Kustomize with Cluster API
These files were created as examples to accompany [this blog post](https://blog.scottlowe.org/2019/11/04/using-kustomize-with-cluster-api-manifests/) on using `kustomize` with Cluster API (CAPI) manifests.

View file

@ -0,0 +1,21 @@
---
apiVersion: cluster.x-k8s.io/v1alpha2
kind: Cluster
metadata:
name: capi-quickstart
spec:
clusterNetwork:
pods:
cidrBlocks: ["192.168.0.0/16"]
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSCluster
name: capi-quickstart
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSCluster
metadata:
name: capi-quickstart
spec:
region: us-west-2
sshKeyName: default

View file

@ -0,0 +1,138 @@
---
apiVersion: cluster.x-k8s.io/v1alpha2
kind: Machine
metadata:
name: capi-quickstart-controlplane-0
labels:
cluster.x-k8s.io/control-plane: "true"
cluster.x-k8s.io/cluster-name: "capi-quickstart"
spec:
version: v1.15.3
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-0
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-0
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
metadata:
name: capi-quickstart-controlplane-0
spec:
instanceType: m5.large
iamInstanceProfile: "controllers.cluster-api-provider-aws.sigs.k8s.io"
sshKeyName: default
---
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfig
metadata:
name: capi-quickstart-controlplane-0
spec:
initConfiguration:
nodeRegistration:
name: '{{ ds.meta_data.hostname }}'
kubeletExtraArgs:
cloud-provider: aws
clusterConfiguration:
apiServer:
extraArgs:
cloud-provider: aws
controllerManager:
extraArgs:
cloud-provider: aws
---
apiVersion: cluster.x-k8s.io/v1alpha2
kind: Machine
metadata:
name: capi-quickstart-controlplane-1
labels:
cluster.x-k8s.io/control-plane: "true"
cluster.x-k8s.io/cluster-name: "capi-quickstart"
spec:
version: v1.15.3
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-1
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-1
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
metadata:
name: capi-quickstart-controlplane-1
spec:
instanceType: m5.large
iamInstanceProfile: "controllers.cluster-api-provider-aws.sigs.k8s.io"
sshKeyName: default
---
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfig
metadata:
name: capi-quickstart-controlplane-1
spec:
initConfiguration:
nodeRegistration:
name: '{{ ds.meta_data.hostname }}'
kubeletExtraArgs:
cloud-provider: aws
clusterConfiguration:
apiServer:
extraArgs:
cloud-provider: aws
controllerManager:
extraArgs:
cloud-provider: aws
---
apiVersion: cluster.x-k8s.io/v1alpha2
kind: Machine
metadata:
name: capi-quickstart-controlplane-2
labels:
cluster.x-k8s.io/control-plane: "true"
cluster.x-k8s.io/cluster-name: "capi-quickstart"
spec:
version: v1.15.3
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-2
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-2
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
metadata:
name: capi-quickstart-controlplane-2
spec:
instanceType: m5.large
iamInstanceProfile: "controllers.cluster-api-provider-aws.sigs.k8s.io"
sshKeyName: default
---
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfig
metadata:
name: capi-quickstart-controlplane-2
spec:
initConfiguration:
nodeRegistration:
name: '{{ ds.meta_data.hostname }}'
kubeletExtraArgs:
cloud-provider: aws
clusterConfiguration:
apiServer:
extraArgs:
cloud-provider: aws
controllerManager:
extraArgs:
cloud-provider: aws

View file

@ -0,0 +1,7 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cluster.yaml
- controlplane.yaml
- workers.yaml

View file

@ -0,0 +1,53 @@
apiVersion: cluster.x-k8s.io/v1alpha2
kind: MachineDeployment
metadata:
name: capi-quickstart-worker
labels:
cluster.x-k8s.io/cluster-name: capi-quickstart
nodepool: nodepool-0
spec:
replicas: 3
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: capi-quickstart
nodepool: nodepool-0
template:
metadata:
labels:
cluster.x-k8s.io/cluster-name: capi-quickstart
nodepool: nodepool-0
spec:
version: v1.15.3
bootstrap:
configRef:
name: capi-quickstart-worker
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfigTemplate
infrastructureRef:
name: capi-quickstart-worker
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachineTemplate
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachineTemplate
metadata:
name: capi-quickstart-worker
spec:
template:
spec:
instanceType: m5.large
iamInstanceProfile: "nodes.cluster-api-provider-aws.sigs.k8s.io"
sshKeyName: default
---
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfigTemplate
metadata:
name: capi-quickstart-worker
spec:
template:
spec:
joinConfiguration:
nodeRegistration:
name: '{{ ds.meta_data.hostname }}'
kubeletExtraArgs:
cloud-provider: aws

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-cluster-1" },
{ "op": "replace", "path": "/spec/region", "value": "us-east-2" },
{ "op": "replace", "path": "/spec/sshKeyName", "value": "use2_rsa_key" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-cluster1-cp0" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-cluster1-cp1" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-cluster1-cp2" }
]

View file

@ -0,0 +1,9 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
metadata:
name: .*
spec:
sshKeyName: use2_rsa_key
# Uncomment following line to change instance type
#instanceType: m5.xlarge

View file

@ -0,0 +1,11 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachineTemplate
metadata:
name: .*
spec:
template:
spec:
sshKeyName: use2_rsa_key
# Uncomment following line to change instance type
#instanceType: m5.xlarge

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-c1-nodepool0" }
]

View file

@ -0,0 +1,4 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-cluster-1" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "use2-cluster-1" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-c1-nodepool0" }
]

View file

@ -0,0 +1,115 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patchesJson6902:
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Cluster
name: capi-quickstart
path: cluster-patch.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSCluster
name: capi-quickstart
path: awscluster-patch.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: capi-quickstart-controlplane-0
path: machine-cp0-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-0
path: awsmachine-cp0-patch-name.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-0
path: awsmachine-cp0-patch-name.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: capi-quickstart-controlplane-1
path: machine-cp1-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-1
path: awsmachine-cp1-patch-name.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-1
path: awsmachine-cp1-patch-name.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: capi-quickstart-controlplane-2
path: machine-cp2-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-2
path: awsmachine-cp2-patch-name.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-2
path: awsmachine-cp2-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachineTemplate
name: capi-quickstart-worker
path: awsmachinetemplate-patch-name.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: MachineDeployment
name: capi-quickstart-worker
path: machinedeployment-patch.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfigTemplate
name: capi-quickstart-worker
path: kubeadmconfigtemplate-patch-name.json
patches:
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachineTemplate
name: capi-quickstart-worker
path: awsmachinetemplate-details.yaml
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: .*
path: machine-labels.yaml
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: MachineDeployment
name: .*
path: machinedeployment-labels.yaml
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: .*
path: awsmachine-details.yaml

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-cluster1-cp0" },
{ "op": "replace", "path": "/spec/bootstrap/configRef/name", "value": "use2-cluster1-cp0" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "use2-cluster1-cp0" }
]

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-cluster1-cp1" },
{ "op": "replace", "path": "/spec/bootstrap/configRef/name", "value": "use2-cluster1-cp1" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "use2-cluster1-cp1" }
]

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-cluster1-cp2" },
{ "op": "replace", "path": "/spec/bootstrap/configRef/name", "value": "use2-cluster1-cp2" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "use2-cluster1-cp2" }
]

View file

@ -0,0 +1,7 @@
---
apiVersion: cluster.x-k8s.io/v1alpha2
kind: Machine
metadata:
name: .*
labels:
cluster.x-k8s.io/cluster-name: "use2-cluster1"

View file

@ -0,0 +1,18 @@
---
apiVersion: MachineDeployment
kind: MachineDeployment
metadata:
name: .*
labels:
cluster.x-k8s.io/cluster-name: "use2-cluster1"
nodepool: "use2-c1-nodepool0"
spec:
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: "use2-cluster1"
nodepool: "use2-c1-nodepool0"
template:
metadata:
labels:
cluster.x-k8s.io/cluster-name: "use2-cluster1"
nodepool: "use2-c1-nodepool0"

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "use2-c1-nodepool0" },
{ "op": "replace", "path": "/spec/template/spec/bootstrap/configRef/name", "value": "use2-c1-nodepool0" },
{ "op": "replace", "path": "/spec/template/spec/infrastructureRef/name", "value": "use2-c1-nodepool0" }
]

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster-1" },
{ "op": "replace", "path": "/spec/region", "value": "us-west-2" },
{ "op": "replace", "path": "/spec/sshKeyName", "value": "usw2_rsa_key" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster1-cp0" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster1-cp1" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster1-cp2" }
]

View file

@ -0,0 +1,9 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
metadata:
name: .*
spec:
sshKeyName: usw2_rsa_key
# Uncomment following line to change instance type
#instanceType: m5.xlarge

View file

@ -0,0 +1,11 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachineTemplate
metadata:
name: .*
spec:
template:
spec:
sshKeyName: usw2_rsa_key
# Uncomment following line to change instance type
#instanceType: m5.xlarge

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-c1-nodepool0" }
]

View file

@ -0,0 +1,4 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster-1" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "usw2-cluster-1" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-c1-nodepool0" }
]

View file

@ -0,0 +1,115 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patchesJson6902:
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Cluster
name: capi-quickstart
path: cluster-patch.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSCluster
name: capi-quickstart
path: awscluster-patch.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: capi-quickstart-controlplane-0
path: machine-cp0-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-0
path: awsmachine-cp0-patch-name.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-0
path: awsmachine-cp0-patch-name.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: capi-quickstart-controlplane-1
path: machine-cp1-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-1
path: awsmachine-cp1-patch-name.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-1
path: awsmachine-cp1-patch-name.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: capi-quickstart-controlplane-2
path: machine-cp2-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-2
path: awsmachine-cp2-patch-name.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-2
path: awsmachine-cp2-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachineTemplate
name: capi-quickstart-worker
path: awsmachinetemplate-patch-name.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: MachineDeployment
name: capi-quickstart-worker
path: machinedeployment-patch.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfigTemplate
name: capi-quickstart-worker
path: kubeadmconfigtemplate-patch-name.json
patches:
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachineTemplate
name: capi-quickstart-worker
path: awsmachinetemplate-details.yaml
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: .*
path: machine-labels.yaml
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: MachineDeployment
name: .*
path: machinedeployment-labels.yaml
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: .*
path: awsmachine-details.yaml

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster1-cp0" },
{ "op": "replace", "path": "/spec/bootstrap/configRef/name", "value": "usw2-cluster1-cp0" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "usw2-cluster1-cp0" }
]

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster1-cp1" },
{ "op": "replace", "path": "/spec/bootstrap/configRef/name", "value": "usw2-cluster1-cp1" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "usw2-cluster1-cp1" }
]

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster1-cp2" },
{ "op": "replace", "path": "/spec/bootstrap/configRef/name", "value": "usw2-cluster1-cp2" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "usw2-cluster1-cp2" }
]

View file

@ -0,0 +1,7 @@
---
apiVersion: cluster.x-k8s.io/v1alpha2
kind: Machine
metadata:
name: .*
labels:
cluster.x-k8s.io/cluster-name: "usw2-cluster1"

View file

@ -0,0 +1,18 @@
---
apiVersion: MachineDeployment
kind: MachineDeployment
metadata:
name: .*
labels:
cluster.x-k8s.io/cluster-name: "usw2-cluster1"
nodepool: "usw2-c1-nodepool0"
spec:
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: "usw2-cluster1"
nodepool: "usw2-c1-nodepool0"
template:
metadata:
labels:
cluster.x-k8s.io/cluster-name: "usw2-cluster1"
nodepool: "usw2-c1-nodepool0"

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-c1-nodepool0" },
{ "op": "replace", "path": "/spec/template/spec/bootstrap/configRef/name", "value": "usw2-c1-nodepool0" },
{ "op": "replace", "path": "/spec/template/spec/infrastructureRef/name", "value": "usw2-c1-nodepool0" }
]

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster-2" },
{ "op": "replace", "path": "/spec/region", "value": "us-west-2" },
{ "op": "replace", "path": "/spec/sshKeyName", "value": "usw2_rsa_key" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster2-cp0" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster2-cp1" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster2-cp2" }
]

View file

@ -0,0 +1,9 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
metadata:
name: .*
spec:
sshKeyName: usw2_rsa_key
# Uncomment following line to change instance type
#instanceType: m5.xlarge

View file

@ -0,0 +1,11 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachineTemplate
metadata:
name: .*
spec:
template:
spec:
sshKeyName: usw2_rsa_key
# Uncomment following line to change instance type
instanceType: m5.xlarge

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-c2-nodepool0" }
]

View file

@ -0,0 +1,4 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster-2" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "usw2-cluster-2" }
]

View file

@ -0,0 +1,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-c2-nodepool0" }
]

View file

@ -0,0 +1,115 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patchesJson6902:
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Cluster
name: capi-quickstart
path: cluster-patch.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSCluster
name: capi-quickstart
path: awscluster-patch.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: capi-quickstart-controlplane-0
path: machine-cp0-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-0
path: awsmachine-cp0-patch-name.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-0
path: awsmachine-cp0-patch-name.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: capi-quickstart-controlplane-1
path: machine-cp1-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-1
path: awsmachine-cp1-patch-name.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-1
path: awsmachine-cp1-patch-name.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: capi-quickstart-controlplane-2
path: machine-cp2-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-2
path: awsmachine-cp2-patch-name.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfig
name: capi-quickstart-controlplane-2
path: awsmachine-cp2-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachineTemplate
name: capi-quickstart-worker
path: awsmachinetemplate-patch-name.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: MachineDeployment
name: capi-quickstart-worker
path: machinedeployment-patch.json
- target:
group: bootstrap.cluster.x-k8s.io
version: v1alpha2
kind: KubeadmConfigTemplate
name: capi-quickstart-worker
path: kubeadmconfigtemplate-patch-name.json
patches:
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachineTemplate
name: capi-quickstart-worker
path: awsmachinetemplate-details.yaml
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: .*
path: machine-labels.yaml
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: MachineDeployment
name: .*
path: machinedeployment-labels.yaml
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: .*
path: awsmachine-details.yaml

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster2-cp0" },
{ "op": "replace", "path": "/spec/bootstrap/configRef/name", "value": "usw2-cluster2-cp0" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "usw2-cluster2-cp0" }
]

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster2-cp1" },
{ "op": "replace", "path": "/spec/bootstrap/configRef/name", "value": "usw2-cluster2-cp1" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "usw2-cluster2-cp1" }
]

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster2-cp2" },
{ "op": "replace", "path": "/spec/bootstrap/configRef/name", "value": "usw2-cluster2-cp2" },
{ "op": "replace", "path": "/spec/infrastructureRef/name", "value": "usw2-cluster2-cp2" }
]

View file

@ -0,0 +1,7 @@
---
apiVersion: cluster.x-k8s.io/v1alpha2
kind: Machine
metadata:
name: .*
labels:
cluster.x-k8s.io/cluster-name: "usw2-cluster2"

View file

@ -0,0 +1,18 @@
---
apiVersion: MachineDeployment
kind: MachineDeployment
metadata:
name: .*
labels:
cluster.x-k8s.io/cluster-name: "usw2-cluster2"
nodepool: "usw2-c2-nodepool0"
spec:
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: "usw2-cluster2"
nodepool: "usw2-c2-nodepool0"
template:
metadata:
labels:
cluster.x-k8s.io/cluster-name: "usw2-cluster2"
nodepool: "usw2-c2-nodepool0"

View file

@ -0,0 +1,5 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-c2-nodepool0" },
{ "op": "replace", "path": "/spec/template/spec/bootstrap/configRef/name", "value": "usw2-c2-nodepool0" },
{ "op": "replace", "path": "/spec/template/spec/infrastructureRef/name", "value": "usw2-c2-nodepool0" }
]