Skip to content

Commit 91ece90

Browse files
committed
build: Use kustomize instead of gojq directly
1 parent f2d958b commit 91ece90

File tree

7 files changed

+238
-315
lines changed

7 files changed

+238
-315
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Copyright 2023 D2iQ, Inc. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
apiVersion: cluster.x-k8s.io/v1beta1
5+
kind: ClusterClass
6+
metadata:
7+
name: capd-quick-start
8+
spec:
9+
controlPlane:
10+
machineInfrastructure:
11+
ref:
12+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
13+
kind: DockerMachineTemplate
14+
name: capd-quick-start-control-plane
15+
ref:
16+
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
17+
kind: KubeadmControlPlaneTemplate
18+
name: capd-quick-start-control-plane
19+
infrastructure:
20+
ref:
21+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
22+
kind: DockerClusterTemplate
23+
name: capd-quick-start-cluster
24+
patches:
25+
- external:
26+
discoverVariablesExtension: clusterconfigvars.capi-runtime-extensions
27+
generateExtension: clusterconfigpatch.capi-runtime-extensions
28+
name: cluster-config
29+
workers:
30+
machineDeployments:
31+
- class: default-worker
32+
template:
33+
bootstrap:
34+
ref:
35+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
36+
kind: KubeadmConfigTemplate
37+
name: capd-quick-start-default-worker-bootstraptemplate
38+
infrastructure:
39+
ref:
40+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
41+
kind: DockerMachineTemplate
42+
name: capd-quick-start-default-worker-machinetemplate
43+
---
44+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
45+
kind: DockerClusterTemplate
46+
metadata:
47+
name: capd-quick-start-cluster
48+
spec:
49+
template:
50+
spec: {}
51+
---
52+
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
53+
kind: KubeadmControlPlaneTemplate
54+
metadata:
55+
name: capd-quick-start-control-plane
56+
spec:
57+
template:
58+
spec:
59+
kubeadmConfigSpec:
60+
clusterConfiguration:
61+
apiServer:
62+
certSANs:
63+
- localhost
64+
- 127.0.0.1
65+
- 0.0.0.0
66+
- host.docker.internal
67+
controllerManager:
68+
extraArgs:
69+
enable-hostpath-provisioner: "true"
70+
initConfiguration:
71+
nodeRegistration: {}
72+
joinConfiguration:
73+
nodeRegistration: {}
74+
---
75+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
76+
kind: DockerMachineTemplate
77+
metadata:
78+
name: capd-quick-start-control-plane
79+
spec:
80+
template:
81+
spec:
82+
extraMounts:
83+
- containerPath: /var/run/docker.sock
84+
hostPath: /var/run/docker.sock
85+
---
86+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
87+
kind: DockerMachineTemplate
88+
metadata:
89+
name: capd-quick-start-default-worker-machinetemplate
90+
spec:
91+
template:
92+
spec:
93+
extraMounts:
94+
- containerPath: /var/run/docker.sock
95+
hostPath: /var/run/docker.sock
96+
---
97+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
98+
kind: KubeadmConfigTemplate
99+
metadata:
100+
name: capd-quick-start-default-worker-bootstraptemplate
101+
spec:
102+
template:
103+
spec:
104+
joinConfiguration:
105+
nodeRegistration: {}

examples/capi-quickstart/cluster.yaml renamed to examples/capi-quickstart/capd-cluster.yaml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ kind: Cluster
66
metadata:
77
labels:
88
capiext.labs.d2iq.io/cni: calico
9-
name: capi-quickstart
10-
namespace: default
9+
name: capd-quick-start
1110
spec:
1211
clusterNetwork:
1312
pods:
@@ -18,26 +17,14 @@ spec:
1817
cidrBlocks:
1918
- 10.128.0.0/12
2019
topology:
21-
class: quick-start
20+
class: capd-quick-start
2221
controlPlane:
2322
metadata: {}
2423
replicas: 1
2524
variables:
26-
- name: imageRepository
27-
value: ""
28-
- name: etcdImageTag
29-
value: ""
30-
- name: coreDNSImageTag
31-
value: ""
32-
- name: podSecurityStandard
33-
value:
34-
audit: restricted
35-
enabled: true
36-
enforce: baseline
37-
warn: restricted
3825
- name: clusterConfig
3926
value: {}
40-
version: v1.27.5
27+
version: v1.27.2
4128
workers:
4229
machineDeployments:
4330
- class: default-worker

0 commit comments

Comments
 (0)