Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Commit 3909011

Browse files
authored
Merge pull request #126 from christopherhein/feature/124-clusterctl-cluster-template
✨ Adding cluster-template.yaml for clusterctl
2 parents 2489f54 + 12dc1f7 commit 3909011

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ release-manifests: $(RELEASE_DIR) $(KUSTOMIZE) ## Builds the manifests to publis
350350
cat $(RELEASE_DIR)/control-plane-components.yaml >> $(RELEASE_DIR)/cluster-api-provider-nested-components.yaml
351351
# Add metadata to the release artifacts
352352
cp metadata.yaml $(RELEASE_DIR)/metadata.yaml
353+
cp templates/cluster-template*.yaml $(RELEASE_DIR)/
353354

354355

355356
.PHONY: release-staging

templates/cluster-template.yaml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
apiVersion: cluster.x-k8s.io/v1alpha4
3+
kind: Cluster
4+
metadata:
5+
name: "${CLUSTER_NAME}"
6+
spec:
7+
controlPlaneEndpoint:
8+
# currently this has to be the in-cluster endpoint, the in-cluster
9+
# kubeconfig is used by controller-manager w/ ClusterIP services
10+
# we can `port-forward` this service and be able to test
11+
host: "${CLUSTER_NAME}-apiserver"
12+
port: 6443
13+
infrastructureRef:
14+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
15+
kind: NestedCluster
16+
name: "${CLUSTER_NAME}"
17+
controlPlaneRef:
18+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
19+
kind: NestedControlPlane
20+
name: "${CLUSTER_NAME}-control-plane"
21+
22+
---
23+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
24+
kind: NestedCluster
25+
metadata:
26+
name: "${CLUSTER_NAME}"
27+
spec:
28+
controlPlaneEndpoint:
29+
host: "localhost"
30+
port: 6443
31+
---
32+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
33+
kind: NestedControlPlane
34+
metadata:
35+
name: "${CLUSTER_NAME}-control-plane"
36+
spec:
37+
etcd:
38+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
39+
kind: NestedEtcd
40+
name: "${CLUSTER_NAME}-nestedetcd"
41+
apiserver:
42+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
43+
kind: NestedAPIServer
44+
name: "${CLUSTER_NAME}-nestedapiserver"
45+
controllerManager:
46+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
47+
kind: NestedControllerManager
48+
name: "${CLUSTER_NAME}-nestedcontrollermanager"
49+
---
50+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
51+
kind: NestedEtcd
52+
metadata:
53+
name: "${CLUSTER_NAME}-nestedetcd"
54+
spec:
55+
replicas: 1
56+
---
57+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
58+
kind: NestedAPIServer
59+
metadata:
60+
name: "${CLUSTER_NAME}-nestedapiserver"
61+
spec:
62+
replicas: 1
63+
---
64+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
65+
kind: NestedControllerManager
66+
metadata:
67+
name: "${CLUSTER_NAME}-nestedcontrollermanager"
68+
spec:
69+
replicas: 1

0 commit comments

Comments
 (0)