Skip to content
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

[feat] added placementGroup to full flavors #499

Merged
merged 10 commits into from
Sep 5, 2024
4 changes: 4 additions & 0 deletions templates/addons/placementGroups/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- linodePlacementGroup.yaml
7 changes: 7 additions & 0 deletions templates/addons/placementGroups/linodePlacementGroup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
metadata:
name: ${CLUSTER_NAME}
spec:
region: ${LINODE_REGION}
prajwalvathreya marked this conversation as resolved.
Show resolved Hide resolved
prajwalvathreya marked this conversation as resolved.
Show resolved Hide resolved
17 changes: 17 additions & 0 deletions templates/flavors/k3s/full-vpcless/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- ../../../addons/cluster-autoscaler
- ../../../addons/etcd-backup-restore
- ../../../addons/machine-health-check
- ../../../addons/placementGroups

patches:
- target:
Expand Down Expand Up @@ -178,3 +179,19 @@ patches:
patch: |-
- op: remove
path: /spec/template/spec/firewallRef
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
prajwalvathreya marked this conversation as resolved.
Show resolved Hide resolved
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
17 changes: 17 additions & 0 deletions templates/flavors/k3s/full/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- ../../../addons/cluster-autoscaler
- ../../../addons/etcd-backup-restore
- ../../../addons/machine-health-check
- ../../../addons/placementGroups

patches:
- target:
Expand All @@ -32,3 +33,19 @@ patches:
labels:
cluster-autoscaler: "true"
etcd-backup: "true"
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
prajwalvathreya marked this conversation as resolved.
Show resolved Hide resolved
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
18 changes: 17 additions & 1 deletion templates/flavors/kubeadm/full-vpcless/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resources:
- ../../../addons/cluster-autoscaler
- ../../../addons/etcd-backup-restore
- ../../../addons/machine-health-check

- ../../../addons/placementGroups

patches:
- target:
Expand Down Expand Up @@ -205,3 +205,19 @@ patches:
patch: |-
- op: remove
path: /spec/template/spec/firewallRef
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
17 changes: 17 additions & 0 deletions templates/flavors/kubeadm/full/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- ../../../addons/cluster-autoscaler
- ../../../addons/etcd-backup-restore
- ../../../addons/machine-health-check
- ../../../addons/placementGroups

patches:
- target:
Expand Down Expand Up @@ -85,3 +86,19 @@ patches:
maxRetry: 5
retryPeriod: 2m
minHealthyPeriod: 2h
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
17 changes: 17 additions & 0 deletions templates/flavors/rke2/full-vpcless/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- ../../../addons/cluster-autoscaler
- ../../../addons/etcd-backup-restore
- ../../../addons/machine-health-check
- ../../../addons/placementGroups

patches:
- target:
Expand Down Expand Up @@ -79,3 +80,19 @@ patches:
kind: LinodeFirewall
metadata:
name: ${CLUSTER_NAME}
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
17 changes: 17 additions & 0 deletions templates/flavors/rke2/full/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- ../../../addons/cluster-autoscaler
- ../../../addons/etcd-backup-restore
- ../../../addons/machine-health-check
- ../../../addons/placementGroups

patches:
- target:
Expand Down Expand Up @@ -71,3 +72,19 @@ patches:
device: /dev/sdc
mounts:
- ["/dev/sdc", "/var/lib/etcd_data"]
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
Loading