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

✨ Adding cluster-template.yaml for clusterctl #126

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ release-manifests: $(RELEASE_DIR) $(KUSTOMIZE) ## Builds the manifests to publis
cat $(RELEASE_DIR)/control-plane-components.yaml >> $(RELEASE_DIR)/cluster-api-provider-nested-components.yaml
# Add metadata to the release artifacts
cp metadata.yaml $(RELEASE_DIR)/metadata.yaml
cp templates/cluster-template*.yaml $(RELEASE_DIR)/


.PHONY: release-staging
Expand Down
69 changes: 69 additions & 0 deletions templates/cluster-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
apiVersion: cluster.x-k8s.io/v1alpha4
kind: Cluster
metadata:
name: "${CLUSTER_NAME}"
spec:
controlPlaneEndpoint:
# currently this has to be the in-cluster endpoint, the in-cluster
# kubeconfig is used by controller-manager w/ ClusterIP services
# we can `port-forward` this service and be able to test
host: "${CLUSTER_NAME}-apiserver"
port: 6443
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: NestedCluster
name: "${CLUSTER_NAME}"
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: NestedControlPlane
name: "${CLUSTER_NAME}-control-plane"

---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: NestedCluster
metadata:
name: "${CLUSTER_NAME}"
spec:
controlPlaneEndpoint:
host: "localhost"
port: 6443
---
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: NestedControlPlane
metadata:
name: "${CLUSTER_NAME}-control-plane"
spec:
etcd:
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: NestedEtcd
name: "${CLUSTER_NAME}-nestedetcd"
apiserver:
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: NestedAPIServer
name: "${CLUSTER_NAME}-nestedapiserver"
controllerManager:
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: NestedControllerManager
name: "${CLUSTER_NAME}-nestedcontrollermanager"
---
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: NestedEtcd
metadata:
name: "${CLUSTER_NAME}-nestedetcd"
spec:
replicas: 1
---
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: NestedAPIServer
metadata:
name: "${CLUSTER_NAME}-nestedapiserver"
spec:
replicas: 1
---
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: NestedControllerManager
metadata:
name: "${CLUSTER_NAME}-nestedcontrollermanager"
spec:
replicas: 1