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
9 changes: 9 additions & 0 deletions templates/addons/placementGroups/linodePlacementGroup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
metadata:
name: ${CLUSTER_NAME}
spec:
credentialsRef:
name: ${CLUSTER_NAME}-credentials
region: ${LINODE_REGION}
prajwalvathreya marked this conversation as resolved.
Show resolved Hide resolved
prajwalvathreya marked this conversation as resolved.
Show resolved Hide resolved
18 changes: 18 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,20 @@ patches:
patch: |-
- op: remove
path: /spec/template/spec/firewallRef
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
name: .*-control-plane
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodeMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
komer3 marked this conversation as resolved.
Show resolved Hide resolved
18 changes: 18 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,20 @@ patches:
labels:
cluster-autoscaler: "true"
etcd-backup: "true"
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
name: .*-control-plane
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodeMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
19 changes: 18 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,20 @@ patches:
patch: |-
- op: remove
path: /spec/template/spec/firewallRef
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
name: .*-control-plane
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodeMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
18 changes: 18 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,20 @@ patches:
maxRetry: 5
retryPeriod: 2m
minHealthyPeriod: 2h
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
name: .*-control-plane
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodeMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
18 changes: 18 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,20 @@ patches:
kind: LinodeFirewall
metadata:
name: ${CLUSTER_NAME}
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
name: .*-control-plane
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodeMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
18 changes: 18 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,20 @@ patches:
device: /dev/sdc
mounts:
- ["/dev/sdc", "/var/lib/etcd_data"]
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha2
kind: LinodeMachineTemplate
name: .*-control-plane
patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodeMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
template:
spec:
placementGroupRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodePlacementGroup
name: ${CLUSTER_NAME}
Loading