Standardize filenames and add AWS patches

Standardize filenames, especially for JSON patches. Add patches for fixing various AWS-specific resource details.

Signed-off-by: Scott Lowe <scott.lowe@scottlowe.org>
This commit is contained in:
Scott Lowe 2019-11-06 09:59:39 +01:00
parent be2256cc15
commit bc4d45a00e
No known key found for this signature in database
GPG key ID: 949F43F6E6C11780
7 changed files with 158 additions and 2 deletions

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,3 @@
[
{ "op": "replace", "path": "/metadata/name", "value": "usw2-cluster1-cp0" }
]

View file

@ -9,13 +9,25 @@ patchesJson6902:
version: v1alpha2
kind: Cluster
name: capi-quickstart
path: cluster-name-patch.json
path: cluster-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSCluster
name: capi-quickstart
path: awscluster-name-patch.json
path: awscluster-patch-name.json
- target:
group: cluster.x-k8s.io
version: v1alpha2
kind: Machine
name: capi-quickstart-controlplane-0
path: machine-patch-name.json
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: AWSMachine
name: capi-quickstart-controlplane-0
path: awsmachine-patch-name.json
patches:
- target:
group: infrastructure.cluster.x-k8s.io
@ -35,3 +47,9 @@ patches:
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,121 @@
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfig
metadata:
name: capi-quickstart-controlplane-0
spec:
clusterConfiguration:
apiServer:
extraArgs:
cloud-provider: aws
controllerManager:
extraArgs:
cloud-provider: aws
initConfiguration:
nodeRegistration:
kubeletExtraArgs:
cloud-provider: aws
name: '{{ ds.meta_data.hostname }}'
---
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfigTemplate
metadata:
name: capi-quickstart-worker
spec:
template:
spec:
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
cloud-provider: aws
name: '{{ ds.meta_data.hostname }}'
---
apiVersion: cluster.x-k8s.io/v1alpha2
kind: Cluster
metadata:
name: usw2-cluster-1
spec:
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSCluster
name: usw2-cluster-1
---
apiVersion: cluster.x-k8s.io/v1alpha2
kind: Machine
metadata:
labels:
cluster.x-k8s.io/cluster-name: usw2-cluster1
cluster.x-k8s.io/control-plane: "true"
name: usw2-cluster1-cp0
spec:
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfig
name: usw2-cluster1-cp0
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
name: usw2-cluster1-cp0
version: v1.15.3
---
apiVersion: cluster.x-k8s.io/v1alpha2
kind: MachineDeployment
metadata:
labels:
cluster.x-k8s.io/cluster-name: usw2-cluster1
nodepool: nodepool-0
name: capi-quickstart-worker
spec:
replicas: 1
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: usw2-cluster1
nodepool: nodepool-0
template:
metadata:
labels:
cluster.x-k8s.io/cluster-name: usw2-cluster1
nodepool: nodepool-0
spec:
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: KubeadmConfigTemplate
name: capi-quickstart-worker
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachineTemplate
name: capi-quickstart-worker
version: v1.15.3
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSCluster
metadata:
name: usw2-cluster-1
spec:
region: us-west-2
sshKeyName: usw2_rsa_key
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
metadata:
name: usw2-cluster1-cp0
spec:
iamInstanceProfile: controllers.cluster-api-provider-aws.sigs.k8s.io
instanceType: t3.large
sshKeyName: usw2_rsa_key
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachineTemplate
metadata:
name: capi-quickstart-worker
spec:
template:
spec:
iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io
instanceType: t3.large
sshKeyName: default