Skip to content

Commit

Permalink
Fix kubectl install breakage in postsubmit (#383)
Browse files Browse the repository at this point in the history
* Fix postsubmit kubectl install

* mkdir for keyrings
  • Loading branch information
alexmasi authored Jun 5, 2023
1 parent c64d078 commit 4d0a79a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cloudbuild/external.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ build {
provisioner "shell" {
inline = [
"echo Installing kubectl...",
"sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg",
"echo \"deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee /etc/apt/sources.list.d/kubernetes.list",
"sudo mkdir /etc/apt/keyrings -m 755",
"curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg",
"echo \"deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee /etc/apt/sources.list.d/kubernetes.list",
"sudo apt-get -o DPkg::Lock::Timeout=60 update",
"sudo apt-get -o DPkg::Lock::Timeout=60 install kubelet kubeadm kubectl -y",
"kubectl version --client",
Expand Down
5 changes: 3 additions & 2 deletions cloudbuild/internal.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ build {
provisioner "shell" {
inline = [
"echo Installing kubectl...",
"sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg",
"echo \"deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee /etc/apt/sources.list.d/kubernetes.list",
"sudo mkdir /etc/apt/keyrings -m 755",
"curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg",
"echo \"deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee /etc/apt/sources.list.d/kubernetes.list",
"sudo apt-get -o DPkg::Lock::Timeout=60 update",
"sudo apt-get -o DPkg::Lock::Timeout=60 install kubelet kubeadm kubectl -y",
"kubectl version --client",
Expand Down

0 comments on commit 4d0a79a

Please sign in to comment.