-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add templates to generate vpc-clusterclass template
- Loading branch information
Showing
4 changed files
with
212 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
templates/cluster-template-vpc-clusterclass/cluster-with-kcp.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
labels: | ||
ccm: external | ||
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME} | ||
name: ${CLUSTER_NAME} | ||
namespace: ${NAMESPACE} | ||
spec: | ||
clusterNetwork: | ||
pods: | ||
cidrBlocks: | ||
- ${POD_CIDR:="192.168.0.0/16"} | ||
serviceDomain: ${SERVICE_DOMAIN:="cluster.local"} | ||
services: | ||
cidrBlocks: | ||
- ${SERVICE_CIDR:="10.128.0.0/12"} | ||
topology: | ||
class: ${IBMVPC_CLUSTER_CLASS_NAME} | ||
controlPlane: | ||
replicas: ${CONTROL_PLANE_MACHINE_COUNT} | ||
version: ${KUBERNETES_VERSION} | ||
workers: | ||
machineDeployments: | ||
- class: default-worker | ||
name: md-0 | ||
replicas: ${WORKER_MACHINE_COUNT} | ||
--- | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: ClusterClass | ||
metadata: | ||
name: ${IBMVPC_CLUSTER_CLASS_NAME:="vpc-cc"} | ||
spec: | ||
controlPlane: | ||
machineInfrastructure: | ||
ref: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: IBMVPCMachineTemplate | ||
name: ${IBMVPC_CLUSTER_CLASS_NAME}-control-plane-machinetemplate | ||
namespace: ${NAMESPACE} | ||
ref: | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlaneTemplate | ||
name: ${IBMVPC_CLUSTER_CLASS_NAME}-control-plane | ||
namespace: ${NAMESPACE} | ||
infrastructure: | ||
ref: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: IBMVPCClusterTemplate | ||
name: ${IBMVPC_CLUSTER_CLASS_NAME}-cluster-template | ||
namespace: ${NAMESPACE} | ||
workers: | ||
machineDeployments: | ||
- class: default-worker | ||
template: | ||
bootstrap: | ||
ref: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: ${IBMVPC_CLUSTER_CLASS_NAME}-md-0 | ||
infrastructure: | ||
ref: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: IBMVPCMachineTemplate | ||
name: ${IBMVPC_CLUSTER_CLASS_NAME}-worker-machinetemplate | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: IBMVPCClusterTemplate | ||
metadata: | ||
name: ${IBMVPC_CLUSTER_CLASS_NAME}-cluster-template | ||
spec: | ||
template: | ||
spec: | ||
controlPlaneLoadBalancer: | ||
name: ${CLUSTER_NAME}-load-balancer | ||
region: ${IBMVPC_REGION} | ||
resourceGroup: ${IBMVPC_RESOURCEGROUP} | ||
vpc: ${IBMVPC_NAME} | ||
zone: ${IBMVPC_ZONE} | ||
--- | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlaneTemplate | ||
metadata: | ||
name: ${IBMVPC_CLUSTER_CLASS_NAME}-control-plane | ||
namespace: ${NAMESPACE} | ||
spec: | ||
template: | ||
spec: | ||
kubeadmConfigSpec: | ||
clusterConfiguration: | ||
kubernetesVersion: ${KUBERNETES_VERSION} | ||
apiServer: | ||
certSANs: [localhost, 127.0.0.1] | ||
extraArgs: | ||
cloud-provider: external | ||
controllerManager: | ||
extraArgs: | ||
enable-hostpath-provisioner: 'true' | ||
cloud-provider: external | ||
dns: {} | ||
etcd: {} | ||
networking: {} | ||
scheduler: {} | ||
initConfiguration: | ||
nodeRegistration: | ||
criSocket: /var/run/containerd/containerd.sock | ||
kubeletExtraArgs: | ||
cloud-provider: external | ||
eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' | ||
joinConfiguration: | ||
discovery: {} | ||
nodeRegistration: | ||
criSocket: /var/run/containerd/containerd.sock | ||
kubeletExtraArgs: | ||
cloud-provider: external | ||
eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' |
7 changes: 7 additions & 0 deletions
7
templates/cluster-template-vpc-clusterclass/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
resources: | ||
- cluster-with-kcp.yaml | ||
- md.yaml | ||
- ../addons/crs.yaml | ||
|
||
sortOptions: | ||
order: fifo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: "${IBMVPC_CLUSTER_CLASS_NAME}-md-0" | ||
spec: | ||
template: | ||
spec: | ||
joinConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
cloud-provider: external | ||
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0% | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: IBMVPCMachineTemplate | ||
metadata: | ||
name: ${IBMVPC_CLUSTER_CLASS_NAME}-control-plane-machinetemplate | ||
spec: | ||
template: | ||
spec: | ||
bootVolume: | ||
sizeGiB: ${IBMVPC_CONTROLPLANE_BOOT_VOLUME_SIZEGIB:=20} | ||
image: | ||
name: ${IBMVPC_IMAGE_NAME} | ||
profile: ${IBMVPC_PROFILE} | ||
sshKeys: | ||
- name: ${IBMVPC_SSHKEY_NAME} | ||
zone: ${IBMVPC_ZONE} | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: IBMVPCMachineTemplate | ||
metadata: | ||
name: "${IBMVPC_CLUSTER_CLASS_NAME}-worker-machinetemplate" | ||
spec: | ||
template: | ||
spec: | ||
image: | ||
name: "${IBMVPC_IMAGE_NAME}" | ||
zone: "${IBMVPC_ZONE}" | ||
profile: "${IBMVPC_PROFILE}" | ||
sshKeys: | ||
- name: "${IBMVPC_SSHKEY_NAME}" | ||
bootVolume: | ||
sizeGiB: ${IBMVPC_WORKER_BOOT_VOLUME_SIZEGIB:=20} |