From 04759dc5747b4c1d47e981ef774e8d0509bac8cc Mon Sep 17 00:00:00 2001 From: prajwalvathreya Date: Tue, 3 Sep 2024 13:28:05 -0400 Subject: [PATCH] - added patches in vpcless flavors to delete the LinodeFirewall --- templates/flavors/k3s/full-vpcless/kustomization.yaml | 8 ++++++++ templates/flavors/k3s/vpcless/kustomization.yaml | 8 ++++++++ templates/flavors/kubeadm/full-vpcless/kustomization.yaml | 8 ++++++++ templates/flavors/kubeadm/vpcless/kustomization.yaml | 8 ++++++++ templates/flavors/rke2/full-vpcless/kustomization.yaml | 8 ++++++++ templates/flavors/rke2/vpcless/kustomization.yaml | 8 ++++++++ 6 files changed, 48 insertions(+) diff --git a/templates/flavors/k3s/full-vpcless/kustomization.yaml b/templates/flavors/k3s/full-vpcless/kustomization.yaml index c7610c58a..5d563355e 100644 --- a/templates/flavors/k3s/full-vpcless/kustomization.yaml +++ b/templates/flavors/k3s/full-vpcless/kustomization.yaml @@ -163,3 +163,11 @@ patches: - sed -i '/swap/d' /etc/fstab - swapoff -a - hostnamectl set-hostname '{{ ds.meta_data.label }}' && hostname -F /etc/hostname + - target: + kind: LinodeFirewall + patch: |- + $patch: delete + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 + kind: LinodeFirewall + metadata: + name: ${CLUSTER_NAME} diff --git a/templates/flavors/k3s/vpcless/kustomization.yaml b/templates/flavors/k3s/vpcless/kustomization.yaml index e3b7d9162..21ff8a354 100644 --- a/templates/flavors/k3s/vpcless/kustomization.yaml +++ b/templates/flavors/k3s/vpcless/kustomization.yaml @@ -100,3 +100,11 @@ patches: enabled: true ui: enabled: true + - target: + kind: LinodeFirewall + patch: |- + $patch: delete + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 + kind: LinodeFirewall + metadata: + name: ${CLUSTER_NAME} diff --git a/templates/flavors/kubeadm/full-vpcless/kustomization.yaml b/templates/flavors/kubeadm/full-vpcless/kustomization.yaml index 743ea222f..cd074796a 100644 --- a/templates/flavors/kubeadm/full-vpcless/kustomization.yaml +++ b/templates/flavors/kubeadm/full-vpcless/kustomization.yaml @@ -190,3 +190,11 @@ patches: maxRetry: 5 retryPeriod: 2m minHealthyPeriod: 2h + - target: + kind: LinodeFirewall + patch: |- + $patch: delete + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 + kind: LinodeFirewall + metadata: + name: ${CLUSTER_NAME} diff --git a/templates/flavors/kubeadm/vpcless/kustomization.yaml b/templates/flavors/kubeadm/vpcless/kustomization.yaml index a7d3cce0b..63f328911 100644 --- a/templates/flavors/kubeadm/vpcless/kustomization.yaml +++ b/templates/flavors/kubeadm/vpcless/kustomization.yaml @@ -117,3 +117,11 @@ patches: patch: |- - op: remove path: /spec/kubeadmConfigSpec/initConfiguration/skipPhases + - target: + kind: LinodeFirewall + patch: |- + $patch: delete + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 + kind: LinodeFirewall + metadata: + name: ${CLUSTER_NAME} diff --git a/templates/flavors/rke2/full-vpcless/kustomization.yaml b/templates/flavors/rke2/full-vpcless/kustomization.yaml index fa5fd1a5e..e3e2159a7 100644 --- a/templates/flavors/rke2/full-vpcless/kustomization.yaml +++ b/templates/flavors/rke2/full-vpcless/kustomization.yaml @@ -71,3 +71,11 @@ patches: device: /dev/sdc mounts: - ["/dev/sdc", "/var/lib/etcd_data"] + - target: + kind: LinodeFirewall + patch: |- + $patch: delete + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 + kind: LinodeFirewall + metadata: + name: ${CLUSTER_NAME} diff --git a/templates/flavors/rke2/vpcless/kustomization.yaml b/templates/flavors/rke2/vpcless/kustomization.yaml index 213f1d3cf..be3bc7759 100644 --- a/templates/flavors/rke2/vpcless/kustomization.yaml +++ b/templates/flavors/rke2/vpcless/kustomization.yaml @@ -90,3 +90,11 @@ patches: - sed -i '/swap/d' /etc/fstab - swapoff -a - hostnamectl set-hostname '{{ ds.meta_data.label }}' && hostname -F /etc/hostname + - target: + kind: LinodeFirewall + patch: |- + $patch: delete + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 + kind: LinodeFirewall + metadata: + name: ${CLUSTER_NAME}