Skip to content

Commit

Permalink
Add kubectl-1.22, update builder OS versions (#2045)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Jan 24, 2022
1 parent 2a783fe commit 1104355
Show file tree
Hide file tree
Showing 17 changed files with 64 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/auto-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ vendor/kubectl-1.20:
vendor/kubectl-1.21:
- any: ["vendor/kubectl-1.21/**"]
all: ["!bin/**", "!tasks/**"]
vendor/kubectl-1.22:
- any: ["vendor/kubectl-1.22/**"]
all: ["!bin/**", "!tasks/**"]
vendor/kubectl:
- any: ["vendor/kubectl/**"]
all: ["!bin/**", "!tasks/**"]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/auto-update-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
- kubectl-1.19
- kubectl-1.20
- kubectl-1.21
- kubectl-1.22
- kubectx
- kubens
- kubeval
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,9 @@ Here are some solutions to several common problems that may occur when adding a
[![kubectl-1.17](https://github.com/cloudposse/packages/workflows/kubectl-1.17/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.17) | 1.17.17 | Production-Grade Container Scheduling and Management (v1.17)
[![kubectl-1.18](https://github.com/cloudposse/packages/workflows/kubectl-1.18/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.18) | 1.18.20 | Production-Grade Container Scheduling and Management (v1.18)
[![kubectl-1.19](https://github.com/cloudposse/packages/workflows/kubectl-1.19/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.19) | 1.19.16 | Production-Grade Container Scheduling and Management (v1.19)
[![kubectl-1.20](https://github.com/cloudposse/packages/workflows/kubectl-1.20/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.20) | 1.20.15 | Production-Grade Container Scheduling and Management (v1.19)
[![kubectl-1.21](https://github.com/cloudposse/packages/workflows/kubectl-1.21/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.21) | 1.21.9 | Production-Grade Container Scheduling and Management (v1.19)
[![kubectl-1.20](https://github.com/cloudposse/packages/workflows/kubectl-1.20/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.20) | 1.20.15 | Production-Grade Container Scheduling and Management (v1.20)
[![kubectl-1.21](https://github.com/cloudposse/packages/workflows/kubectl-1.21/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.21) | 1.21.9 | Production-Grade Container Scheduling and Management (v1.21)
[![kubectl-1.22](https://github.com/cloudposse/packages/workflows/kubectl-1.22/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.22) | 1.22.6 | Production-Grade Container Scheduling and Management (v1.22)
[![kubectx](https://github.com/cloudposse/packages/workflows/kubectx/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectx) | 0.9.4 | Switch faster between clusters and namespaces in kubectl
[![kubens](https://github.com/cloudposse/packages/workflows/kubens/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubens) | 0.9.4 | Switch faster between clusters and namespaces in kubectl
[![kubeval](https://github.com/cloudposse/packages/workflows/kubeval/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubeval) | 0.16.1 | Validate your Kubernetes configuration files, supports multiple Kubernetes versions
Expand Down
2 changes: 1 addition & 1 deletion apk/Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Need to use version number so that it gets updated here and triggers a build
FROM alpine:3.13.4
FROM alpine:3.15.0

ENV LC_ALL=C.UTF-8
ENV PS1="(apk) \w \$ "
Expand Down
2 changes: 1 addition & 1 deletion deb/Dockerfile.stable-slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Need to use version number so that it gets updated here and triggers a build
FROM debian:10.10-slim
FROM debian:11.2-slim

ENV LC_ALL=C.UTF-8
ENV PS1="(deb) \w \$ "
Expand Down
5 changes: 3 additions & 2 deletions docs/badges.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@
[![kubectl-1.17](https://github.com/cloudposse/packages/workflows/kubectl-1.17/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.17) | 1.17.17 | Production-Grade Container Scheduling and Management (v1.17)
[![kubectl-1.18](https://github.com/cloudposse/packages/workflows/kubectl-1.18/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.18) | 1.18.20 | Production-Grade Container Scheduling and Management (v1.18)
[![kubectl-1.19](https://github.com/cloudposse/packages/workflows/kubectl-1.19/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.19) | 1.19.16 | Production-Grade Container Scheduling and Management (v1.19)
[![kubectl-1.20](https://github.com/cloudposse/packages/workflows/kubectl-1.20/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.20) | 1.20.15 | Production-Grade Container Scheduling and Management (v1.19)
[![kubectl-1.21](https://github.com/cloudposse/packages/workflows/kubectl-1.21/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.21) | 1.21.9 | Production-Grade Container Scheduling and Management (v1.19)
[![kubectl-1.20](https://github.com/cloudposse/packages/workflows/kubectl-1.20/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.20) | 1.20.15 | Production-Grade Container Scheduling and Management (v1.20)
[![kubectl-1.21](https://github.com/cloudposse/packages/workflows/kubectl-1.21/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.21) | 1.21.9 | Production-Grade Container Scheduling and Management (v1.21)
[![kubectl-1.22](https://github.com/cloudposse/packages/workflows/kubectl-1.22/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectl-1.22) | 1.22.6 | Production-Grade Container Scheduling and Management (v1.22)
[![kubectx](https://github.com/cloudposse/packages/workflows/kubectx/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubectx) | 0.9.4 | Switch faster between clusters and namespaces in kubectl
[![kubens](https://github.com/cloudposse/packages/workflows/kubens/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubens) | 0.9.4 | Switch faster between clusters and namespaces in kubectl
[![kubeval](https://github.com/cloudposse/packages/workflows/kubeval/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Akubeval) | 0.16.1 | Validate your Kubernetes configuration files, supports multiple Kubernetes versions
Expand Down
5 changes: 3 additions & 2 deletions docs/targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ kubectl-1.16 1.16.15 Production-Grade Container Scheduling and M
kubectl-1.17 1.17.17 Production-Grade Container Scheduling and Management (v1.17)
kubectl-1.18 1.18.20 Production-Grade Container Scheduling and Management (v1.18)
kubectl-1.19 1.19.16 Production-Grade Container Scheduling and Management (v1.19)
kubectl-1.20 1.20.15 Production-Grade Container Scheduling and Management (v1.19)
kubectl-1.21 1.21.9 Production-Grade Container Scheduling and Management (v1.19)
kubectl-1.20 1.20.15 Production-Grade Container Scheduling and Management (v1.20)
kubectl-1.21 1.21.9 Production-Grade Container Scheduling and Management (v1.21)
kubectl-1.22 1.22.6 Production-Grade Container Scheduling and Management (v1.22)
kubectx 0.9.4 Switch faster between clusters and namespaces in kubectl
kubens 0.9.4 Switch faster between clusters and namespaces in kubectl
kubeval 0.16.1 Validate your Kubernetes configuration files, supports multiple Kubernetes versions
Expand Down
2 changes: 1 addition & 1 deletion rpm/Dockerfile.centos8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM centos:centos8
FROM registry.access.redhat.com/ubi8/ubi

ENV LC_ALL=C.UTF-8
ENV PS1="(rpm) \w \$ "
Expand Down
2 changes: 1 addition & 1 deletion vendor/kubectl-1.20/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Production-Grade Container Scheduling and Management (v1.19)
Production-Grade Container Scheduling and Management (v1.20)
2 changes: 1 addition & 1 deletion vendor/kubectl-1.21/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Production-Grade Container Scheduling and Management (v1.19)
Production-Grade Container Scheduling and Management (v1.21)
1 change: 1 addition & 0 deletions vendor/kubectl-1.22/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Production-Grade Container Scheduling and Management (v1.22)
1 change: 1 addition & 0 deletions vendor/kubectl-1.22/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APACHE-2.0
21 changes: 21 additions & 0 deletions vendor/kubectl-1.22/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export MASTER_PACKAGE_NAME = kubectl
export MAJOR_VERSION = 1.22
export PACKAGE_NAME = $(MASTER_PACKAGE_NAME)-$(MAJOR_VERSION)
export PACKAGE_REPO_NAME = kubernetes
export INSTALL_DIR = /usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin

include ../../tasks/Makefile.vendor_includes

# Package details
export VENDOR = kubernetes
export DOWNLOAD_URL = https://storage.googleapis.com/kubernetes-release/release/v$(PACKAGE_VERSION)/bin/$(OS)/$(ARCH)/kubectl
export APK_BUILD_TEMPLATE = APKBUILD.github-binary
export APKBUILD_DEPENDS += dpkg
export APKBUILD_INSTALL_SCRIPTS = $(PACKAGE_NAME).post-install $(PACKAGE_NAME).post-deinstall

install:
$(call download_binary)

test:
pinned-package-sanity-check "$(PACKAGE_VERSION)" "$(MAJOR_VERSION)"
$(PACKAGE_EXE) version --client | grep -F $(PACKAGE_VERSION)
1 change: 1 addition & 0 deletions vendor/kubectl-1.22/RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
1 change: 1 addition & 0 deletions vendor/kubectl-1.22/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.22.6
9 changes: 9 additions & 0 deletions vendor/kubectl-1.22/kubectl-1.22.post-deinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
# This is an Alpine `deinstall` hook that removes the alternative
MASTER_PACKAGE_NAME=kubectl
MAJOR_VERSION=1.22
PACKAGE_NAME=${MASTER_PACKAGE_NAME}-${MAJOR_VERSION}
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin
update-alternatives --remove ${PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
update-alternatives --remove ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
exit 0
12 changes: 12 additions & 0 deletions vendor/kubectl-1.22/kubectl-1.22.post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# This is an Alpine Package `post-install` hook that links
# an alternative from `/usr/share/${PACKAGE_NAME}/$version/bin` into `/usr/bin/`
MASTER_PACKAGE_NAME=kubectl
MAJOR_VERSION=1.22
PACKAGE_NAME=${MASTER_PACKAGE_NAME}-${MAJOR_VERSION}
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin

mkdir -p ${INSTALL_DIR}
update-alternatives --install /usr/bin/${PACKAGE_NAME} ${PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 1
update-alternatives --install /usr/bin/${MASTER_PACKAGE_NAME} ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 22
exit 0

0 comments on commit 1104355

Please sign in to comment.