-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor kubeadm and clusterclass flaovr to use inline configuration
- Loading branch information
1 parent
c78e3a1
commit 3bfdc5e
Showing
15 changed files
with
234 additions
and
159 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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
templates/flavors/clusterclass-base/linodeMachineControlPlaneTemplate.yaml
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
templates/flavors/clusterclass-base/linodeMachineWorkerTemplate.yaml
This file was deleted.
Oops, something went wrong.
80 changes: 80 additions & 0 deletions
80
templates/flavors/clusterclass-kubeadm/DeleteTransformer.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,80 @@ | ||
--- | ||
# Delete LinodeCluster after values are copied to LinodeClusterTemplate | ||
apiVersion: builtin | ||
kind: PatchTransformer | ||
metadata: | ||
name: LinodeCluster-patch-delete | ||
patch: |- | ||
$patch: delete | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | ||
kind: LinodeCluster | ||
metadata: | ||
name: ${CLUSTER_NAME} | ||
--- | ||
# Delete Cluster from ../base | ||
apiVersion: builtin | ||
kind: PatchTransformer | ||
metadata: | ||
name: patch-delete-cluster | ||
patch: |- | ||
$patch: delete | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
name: ${CLUSTER_NAME} | ||
--- | ||
# Delete kubeadmControlPlane after values are copied to KubeadmControlPlaneTemplate | ||
apiVersion: builtin | ||
kind: PatchTransformer | ||
metadata: | ||
name: kubeadm-patch-delete | ||
patch: |- | ||
$patch: delete | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlane | ||
metadata: | ||
name: ${CLUSTER_NAME}-control-plane | ||
--- | ||
# delete machineDeployment from ../base | ||
apiVersion: builtin | ||
kind: PatchTransformer | ||
metadata: | ||
name: patch-delete-machineDeployment | ||
patch: |- | ||
$patch: delete | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineDeployment | ||
metadata: | ||
name: ${CLUSTER_NAME}-md-0 | ||
--- | ||
# delete extra fields from kubeadmControlPlaneTemplate | ||
apiVersion: builtin | ||
kind: PatchTransformer | ||
metadata: | ||
name: patch-delete-KubeadmControlPlaneTemplate | ||
target: | ||
kind: KubeadmControlPlaneTemplate | ||
patch: |- | ||
- op: remove | ||
path: /spec/template/spec/machineTemplate | ||
value: | ||
- op: remove | ||
path: /spec/template/spec/replicas | ||
value: | ||
- op: remove | ||
path: /spec/template/spec/version | ||
value: | ||
#patch: |- | ||
# $patch: delete | ||
# apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
# kind: KubeadmControlPlaneTemplate | ||
# metadata: | ||
# name: kubeadm-control-plane | ||
# spec: | ||
# machineTemplate: | ||
# infrastructureRef: | ||
# apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | ||
# kind: LinodeMachineTemplate | ||
# name: ${CLUSTER_NAME}-control-plane | ||
# replicas: ${CONTROL_PLANE_MACHINE_COUNT} | ||
# version: ${KUBERNETES_VERSION} |
30 changes: 30 additions & 0 deletions
30
templates/flavors/clusterclass-kubeadm/ReplacementTransformer.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,30 @@ | ||
--- | ||
apiVersion: builtin | ||
kind: ReplacementTransformer | ||
metadata: | ||
name: linode-cluster-replace | ||
replacements: | ||
- source: | ||
kind: LinodeCluster | ||
fieldPath: spec | ||
targets: | ||
- select: | ||
kind: LinodeClusterTemplate | ||
fieldPaths: | ||
- spec.template.spec | ||
--- | ||
apiVersion: builtin | ||
kind: ReplacementTransformer | ||
metadata: | ||
name: kubeadm-controlplane-replace | ||
replacements: | ||
- source: | ||
kind: KubeadmControlPlane | ||
name: ${CLUSTER_NAME}-control-plane | ||
fieldPath: spec | ||
targets: | ||
- select: | ||
kind: KubeadmControlPlaneTemplate | ||
name: kubeadm-control-plane | ||
fieldPaths: | ||
- spec.template.spec |
39 changes: 0 additions & 39 deletions
39
templates/flavors/clusterclass-kubeadm/kubeadmConfigTemplate.yaml
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
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
Oops, something went wrong.