Skip to content

Commit

Permalink
Print patched kube-vip manifest to stdout (#2924)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna authored Feb 14, 2024
1 parent 7b53de4 commit 88528b3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/aws/bottlerocket-bootstrap/CHECKSUMS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
d7fe3104959a0d373363fb5aeee06a8d6c7557d54d1393e7ab4b40770b187202 _output/bin/bottlerocket-bootstrap/linux-amd64/bottlerocket-bootstrap
c99005ad01faddc531a7823c703e69aad172a2a76480e0e103347489a33893ba _output/bin/bottlerocket-bootstrap/linux-amd64/bottlerocket-bootstrap
1fd36d9a1080f1ec489f0402fec9a7ab6c7cc68ae607babcb82ab55103c53558 _output/bin/bottlerocket-bootstrap/linux-amd64/bottlerocket-bootstrap-snow
21bada714f2e91b507d97565cc5fdf529d0562630d2240847cfd95ed7d4d7ecf _output/bin/bottlerocket-bootstrap/linux-arm64/bottlerocket-bootstrap
65f77aa86aa088ddb3ade1f107e0be93dc65fcefb06045e0c3347a48594557b0 _output/bin/bottlerocket-bootstrap/linux-arm64/bottlerocket-bootstrap
9b7d5023b692b488281f8b61aebb46fa7bf50338a4dc224624eac63661f8b65a _output/bin/bottlerocket-bootstrap/linux-arm64/bottlerocket-bootstrap-snow
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func controlPlaneInit() error {
}

if k8s129Compare != -1 {
fmt.Println("Kubernetes version is v1.29 or above")
err = patchKubeVipManifest()
if err != nil {
return errors.Wrapf(err, "Error patching kube-vip manifest")
Expand Down
4 changes: 4 additions & 0 deletions projects/aws/bottlerocket-bootstrap/pkg/kubeadm/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ func isEmpty(str string) bool {
}

func patchKubeVipManifest() error {
fmt.Println("Patching kube-vip static pod manifest")
kubeVipManifest := filepath.Join(staticPodManifestsPath, "kube-vip.yaml")
contents, err := ioutil.ReadFile(kubeVipManifest)
if err != nil {
Expand All @@ -330,6 +331,9 @@ func patchKubeVipManifest() error {
if err != nil {
return errors.Wrapf(err, "Error writing file %s", kubeVipManifest)
}
fmt.Println("-------------------------------")
fmt.Printf("Patched kube-vip manifest: \n%s\n", updatedContents)
fmt.Println("-------------------------------")

return nil
}

0 comments on commit 88528b3

Please sign in to comment.