Skip to content

build: add tooling to generate examples files #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
105 changes: 105 additions & 0 deletions examples/capi-quickstart/capd-cluster-class.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Copyright 2023 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

apiVersion: cluster.x-k8s.io/v1beta1
kind: ClusterClass
metadata:
name: capd-quick-start
spec:
controlPlane:
machineInfrastructure:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DockerMachineTemplate
name: capd-quick-start-control-plane
ref:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlaneTemplate
name: capd-quick-start-control-plane
infrastructure:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DockerClusterTemplate
name: capd-quick-start-cluster
patches:
- external:
discoverVariablesExtension: clusterconfigvars.capi-runtime-extensions
generateExtension: clusterconfigpatch.capi-runtime-extensions
name: cluster-config
workers:
machineDeployments:
- class: default-worker
template:
bootstrap:
ref:
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
name: capd-quick-start-default-worker-bootstraptemplate
infrastructure:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DockerMachineTemplate
name: capd-quick-start-default-worker-machinetemplate
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DockerClusterTemplate
metadata:
name: capd-quick-start-cluster
spec:
template:
spec: {}
---
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlaneTemplate
metadata:
name: capd-quick-start-control-plane
spec:
template:
spec:
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
certSANs:
- localhost
- 127.0.0.1
- 0.0.0.0
- host.docker.internal
controllerManager:
extraArgs:
enable-hostpath-provisioner: "true"
initConfiguration:
nodeRegistration: {}
joinConfiguration:
nodeRegistration: {}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DockerMachineTemplate
metadata:
name: capd-quick-start-control-plane
spec:
template:
spec:
extraMounts:
- containerPath: /var/run/docker.sock
hostPath: /var/run/docker.sock
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DockerMachineTemplate
metadata:
name: capd-quick-start-default-worker-machinetemplate
spec:
template:
spec:
extraMounts:
- containerPath: /var/run/docker.sock
hostPath: /var/run/docker.sock
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
name: capd-quick-start-default-worker-bootstraptemplate
spec:
template:
spec:
joinConfiguration:
nodeRegistration: {}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ kind: Cluster
metadata:
labels:
capiext.labs.d2iq.io/cni: calico
name: capi-quickstart
namespace: default
name: capd-quick-start
spec:
clusterNetwork:
pods:
Expand All @@ -18,26 +17,14 @@ spec:
cidrBlocks:
- 10.128.0.0/12
topology:
class: quick-start
class: capd-quick-start
controlPlane:
metadata: {}
replicas: 1
variables:
- name: imageRepository
value: ""
- name: etcdImageTag
value: ""
- name: coreDNSImageTag
value: ""
- name: podSecurityStandard
value:
audit: restricted
enabled: true
enforce: baseline
warn: restricted
- name: clusterConfig
value: {}
version: v1.27.5
version: v1.27.2
workers:
machineDeployments:
- class: default-worker
Expand Down
Loading