Skip to content

Commit

Permalink
Merge pull request #2583 from chrischdi/pr-wait-for-kubevip-finish
Browse files Browse the repository at this point in the history
🌱 test: remove kube-vip cleanup
  • Loading branch information
k8s-ci-robot authored Jan 2, 2024
2 parents 4a19fc9 + 98be02e commit df86ac8
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 162 deletions.
8 changes: 0 additions & 8 deletions packaging/flavorgen/flavors/kubevip/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ var (

//go:embed kube-vip-prepare.sh
kubeVipPrepare string
//go:embed kube-vip-cleanup.sh
kubeVipCleanup string
)

func newKubeVIPFiles() []bootstrapv1.File {
Expand All @@ -53,11 +51,5 @@ func newKubeVIPFiles() []bootstrapv1.File {
Permissions: "0700",
Content: kubeVipPrepare,
},
{
Owner: "root:root",
Path: "/etc/kube-vip-cleanup.sh",
Permissions: "0700",
Content: kubeVipCleanup,
},
}
}
23 changes: 0 additions & 23 deletions packaging/flavorgen/flavors/kubevip/kube-vip-cleanup.sh

This file was deleted.

4 changes: 0 additions & 4 deletions packaging/flavorgen/flavors/kubevip/kubevip.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ func PatchControlPlane(cp *controlplanev1.KubeadmControlPlane) {
cp.Spec.KubeadmConfigSpec.PreKubeadmCommands,
"/etc/kube-vip-prepare.sh",
)
cp.Spec.KubeadmConfigSpec.PostKubeadmCommands = append(
cp.Spec.KubeadmConfigSpec.PostKubeadmCommands,
"/etc/kube-vip-cleanup.sh",
)
}

// kubeVIPPodYaml converts the KubeVip pod spec to a `printable` yaml
Expand Down
5 changes: 0 additions & 5 deletions packaging/flavorgen/flavors/kubevip/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ func TopologyPatch() clusterv1.ClusterClassPatch {
Path: "/spec/template/spec/kubeadmConfigSpec/preKubeadmCommands/-",
ValueFrom: &clusterv1.JSONPatchValue{Template: ptr.To("/etc/kube-vip-prepare.sh")},
},
clusterv1.JSONPatch{
Op: "add",
Path: "/spec/template/spec/kubeadmConfigSpec/postKubeadmCommands/-",
ValueFrom: &clusterv1.JSONPatchValue{Template: ptr.To("/etc/kube-vip-cleanup.sh")},
},
)

return clusterv1.ClusterClassPatch{
Expand Down
29 changes: 0 additions & 29 deletions templates/cluster-template-ignition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,33 +190,6 @@ spec:
owner: root:root
path: /etc/kube-vip-prepare.sh
permissions: "0700"
- content: |
#!/bin/bash
# Copyright 2020 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
# Reset the workaround required for kubeadm init with kube-vip:
# xref: https://github.com/kube-vip/kube-vip/issues/684
sed -i 's#path: /etc/kubernetes/super-admin.conf#path: /etc/kubernetes/admin.conf#' \
/etc/kubernetes/manifests/kube-vip.yaml || true
owner: root:root
path: /etc/kube-vip-cleanup.sh
permissions: "0700"
format: ignition
ignition:
containerLinuxConfig:
Expand Down Expand Up @@ -290,8 +263,6 @@ spec:
kubeletExtraArgs:
cloud-provider: external
name: $${COREOS_CUSTOM_HOSTNAME}
postKubeadmCommands:
- /etc/kube-vip-cleanup.sh
preKubeadmCommands:
- envsubst < /etc/kubeadm.yml > /etc/kubeadm.yml.tmp
- mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml
Expand Down
29 changes: 0 additions & 29 deletions templates/cluster-template-node-ipam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,33 +227,6 @@ spec:
owner: root:root
path: /etc/kube-vip-prepare.sh
permissions: "0700"
- content: |
#!/bin/bash
# Copyright 2020 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
# Reset the workaround required for kubeadm init with kube-vip:
# xref: https://github.com/kube-vip/kube-vip/issues/684
sed -i 's#path: /etc/kubernetes/super-admin.conf#path: /etc/kubernetes/admin.conf#' \
/etc/kubernetes/manifests/kube-vip.yaml || true
owner: root:root
path: /etc/kube-vip-cleanup.sh
permissions: "0700"
initConfiguration:
nodeRegistration:
criSocket: /var/run/containerd/containerd.sock
Expand All @@ -266,8 +239,6 @@ spec:
kubeletExtraArgs:
cloud-provider: external
name: '{{ local_hostname }}'
postKubeadmCommands:
- /etc/kube-vip-cleanup.sh
preKubeadmCommands:
- hostnamectl set-hostname "{{ ds.meta_data.hostname }}"
- echo "::1 ipv6-localhost ipv6-loopback localhost6 localhost6.localdomain6"
Expand Down
29 changes: 0 additions & 29 deletions templates/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,33 +217,6 @@ spec:
owner: root:root
path: /etc/kube-vip-prepare.sh
permissions: "0700"
- content: |
#!/bin/bash
# Copyright 2020 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
# Reset the workaround required for kubeadm init with kube-vip:
# xref: https://github.com/kube-vip/kube-vip/issues/684
sed -i 's#path: /etc/kubernetes/super-admin.conf#path: /etc/kubernetes/admin.conf#' \
/etc/kubernetes/manifests/kube-vip.yaml || true
owner: root:root
path: /etc/kube-vip-cleanup.sh
permissions: "0700"
initConfiguration:
nodeRegistration:
criSocket: /var/run/containerd/containerd.sock
Expand All @@ -256,8 +229,6 @@ spec:
kubeletExtraArgs:
cloud-provider: external
name: '{{ local_hostname }}'
postKubeadmCommands:
- /etc/kube-vip-cleanup.sh
preKubeadmCommands:
- hostnamectl set-hostname "{{ ds.meta_data.hostname }}"
- echo "::1 ipv6-localhost ipv6-loopback localhost6 localhost6.localdomain6"
Expand Down
35 changes: 0 additions & 35 deletions templates/clusterclass-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,45 +190,10 @@ spec:
owner: root:root
path: /etc/kube-vip-prepare.sh
permissions: "0700"
- op: add
path: /spec/template/spec/kubeadmConfigSpec/files/-
valueFrom:
template: |
content: |
#!/bin/bash
# Copyright 2020 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
# Reset the workaround required for kubeadm init with kube-vip:
# xref: https://github.com/kube-vip/kube-vip/issues/684
sed -i 's#path: /etc/kubernetes/super-admin.conf#path: /etc/kubernetes/admin.conf#' \
/etc/kubernetes/manifests/kube-vip.yaml || true
owner: root:root
path: /etc/kube-vip-cleanup.sh
permissions: "0700"
- op: add
path: /spec/template/spec/kubeadmConfigSpec/preKubeadmCommands/-
valueFrom:
template: /etc/kube-vip-prepare.sh
- op: add
path: /spec/template/spec/kubeadmConfigSpec/postKubeadmCommands/-
valueFrom:
template: /etc/kube-vip-cleanup.sh
selector:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlaneTemplate
Expand Down

0 comments on commit df86ac8

Please sign in to comment.