Skip to content

Commit e4f2666

Browse files
Enhancement: Bump kubectl 1.33 to 1.33.9
Signed-off-by: The Oh Brothers Bot <bot@theohbrothers.com>
1 parent 92d2666 commit e4f2666

File tree

7 files changed

+141
-39
lines changed

7 files changed

+141
-39
lines changed

.github/workflows/ci-master-pr.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ jobs:
406406
rm -rf /tmp/.buildx-cache
407407
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
408408
409-
build-1-33-8:
409+
build-1-33-9:
410410
runs-on: ubuntu-latest
411411
steps:
412412
- name: Checkout
@@ -437,9 +437,9 @@ jobs:
437437
uses: actions/cache@v4
438438
with:
439439
path: /tmp/.buildx-cache
440-
key: ${{ runner.os }}-buildx-1.33.8-${{ github.sha }}
440+
key: ${{ runner.os }}-buildx-1.33.9-${{ github.sha }}
441441
restore-keys: |
442-
${{ runner.os }}-buildx-1.33.8-
442+
${{ runner.os }}-buildx-1.33.9-
443443
${{ runner.os }}-buildx-
444444
445445
- name: Login to Docker Hub registry
@@ -452,7 +452,7 @@ jobs:
452452

453453
# This step generates the docker tags
454454
- name: Prepare
455-
id: prep-1-33-8
455+
id: prep-1-33-9
456456
run: |
457457
set -e
458458
@@ -465,7 +465,7 @@ jobs:
465465
# Generate docker image tags
466466
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
467467
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
468-
VARIANT="1.33.8"
468+
VARIANT="1.33.9"
469469
REF_VARIANT="${REF}-${VARIANT}"
470470
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
471471
@@ -475,51 +475,51 @@ jobs:
475475
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
476476
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
477477
478-
- name: 1.33.8 - Build (PRs)
478+
- name: 1.33.9 - Build (PRs)
479479
# Run only on pull requests
480480
if: github.event_name == 'pull_request'
481481
uses: docker/build-push-action@v5
482482
with:
483-
context: variants/1.33.8
483+
context: variants/1.33.9
484484
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
485485
push: false
486486
tags: |
487-
${{ github.repository }}:${{ steps.prep-1-33-8.outputs.REF_VARIANT }}
488-
${{ github.repository }}:${{ steps.prep-1-33-8.outputs.REF_SHA_VARIANT }}
487+
${{ github.repository }}:${{ steps.prep-1-33-9.outputs.REF_VARIANT }}
488+
${{ github.repository }}:${{ steps.prep-1-33-9.outputs.REF_SHA_VARIANT }}
489489
cache-from: type=local,src=/tmp/.buildx-cache
490490
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
491491

492-
- name: 1.33.8 - Build and push (master)
492+
- name: 1.33.9 - Build and push (master)
493493
# Run only on master
494494
if: github.ref == 'refs/heads/master'
495495
uses: docker/build-push-action@v5
496496
with:
497-
context: variants/1.33.8
497+
context: variants/1.33.9
498498
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
499499
push: true
500500
tags: |
501-
${{ github.repository }}:${{ steps.prep-1-33-8.outputs.REF_VARIANT }}
502-
${{ github.repository }}:${{ steps.prep-1-33-8.outputs.REF_SHA_VARIANT }}
501+
${{ github.repository }}:${{ steps.prep-1-33-9.outputs.REF_VARIANT }}
502+
${{ github.repository }}:${{ steps.prep-1-33-9.outputs.REF_SHA_VARIANT }}
503503
cache-from: type=local,src=/tmp/.buildx-cache
504504
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
505505

506-
- name: 1.33.8 - Build and push (release)
506+
- name: 1.33.9 - Build and push (release)
507507
if: startsWith(github.ref, 'refs/tags/')
508508
uses: docker/build-push-action@v5
509509
with:
510-
context: variants/1.33.8
510+
context: variants/1.33.9
511511
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
512512
push: true
513513
tags: |
514-
${{ github.repository }}:${{ steps.prep-1-33-8.outputs.VARIANT }}
515-
${{ github.repository }}:${{ steps.prep-1-33-8.outputs.REF_VARIANT }}
516-
${{ github.repository }}:${{ steps.prep-1-33-8.outputs.REF_SHA_VARIANT }}
514+
${{ github.repository }}:${{ steps.prep-1-33-9.outputs.VARIANT }}
515+
${{ github.repository }}:${{ steps.prep-1-33-9.outputs.REF_VARIANT }}
516+
${{ github.repository }}:${{ steps.prep-1-33-9.outputs.REF_SHA_VARIANT }}
517517
cache-from: type=local,src=/tmp/.buildx-cache
518518
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
519519

520520
# This step generates the docker tags
521521
- name: Prepare
522-
id: prep-1-33-8-envsubst-git-jq-kustomize-sops-ssh-yq
522+
id: prep-1-33-9-envsubst-git-jq-kustomize-sops-ssh-yq
523523
run: |
524524
set -e
525525
@@ -532,7 +532,7 @@ jobs:
532532
# Generate docker image tags
533533
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
534534
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
535-
VARIANT="1.33.8-envsubst-git-jq-kustomize-sops-ssh-yq"
535+
VARIANT="1.33.9-envsubst-git-jq-kustomize-sops-ssh-yq"
536536
REF_VARIANT="${REF}-${VARIANT}"
537537
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
538538
@@ -542,45 +542,45 @@ jobs:
542542
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
543543
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
544544
545-
- name: 1.33.8-envsubst-git-jq-kustomize-sops-ssh-yq - Build (PRs)
545+
- name: 1.33.9-envsubst-git-jq-kustomize-sops-ssh-yq - Build (PRs)
546546
# Run only on pull requests
547547
if: github.event_name == 'pull_request'
548548
uses: docker/build-push-action@v5
549549
with:
550-
context: variants/1.33.8-envsubst-git-jq-kustomize-sops-ssh-yq
550+
context: variants/1.33.9-envsubst-git-jq-kustomize-sops-ssh-yq
551551
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
552552
push: false
553553
tags: |
554-
${{ github.repository }}:${{ steps.prep-1-33-8-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_VARIANT }}
555-
${{ github.repository }}:${{ steps.prep-1-33-8-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_SHA_VARIANT }}
554+
${{ github.repository }}:${{ steps.prep-1-33-9-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_VARIANT }}
555+
${{ github.repository }}:${{ steps.prep-1-33-9-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_SHA_VARIANT }}
556556
cache-from: type=local,src=/tmp/.buildx-cache
557557
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
558558

559-
- name: 1.33.8-envsubst-git-jq-kustomize-sops-ssh-yq - Build and push (master)
559+
- name: 1.33.9-envsubst-git-jq-kustomize-sops-ssh-yq - Build and push (master)
560560
# Run only on master
561561
if: github.ref == 'refs/heads/master'
562562
uses: docker/build-push-action@v5
563563
with:
564-
context: variants/1.33.8-envsubst-git-jq-kustomize-sops-ssh-yq
564+
context: variants/1.33.9-envsubst-git-jq-kustomize-sops-ssh-yq
565565
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
566566
push: true
567567
tags: |
568-
${{ github.repository }}:${{ steps.prep-1-33-8-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_VARIANT }}
569-
${{ github.repository }}:${{ steps.prep-1-33-8-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_SHA_VARIANT }}
568+
${{ github.repository }}:${{ steps.prep-1-33-9-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_VARIANT }}
569+
${{ github.repository }}:${{ steps.prep-1-33-9-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_SHA_VARIANT }}
570570
cache-from: type=local,src=/tmp/.buildx-cache
571571
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
572572

573-
- name: 1.33.8-envsubst-git-jq-kustomize-sops-ssh-yq - Build and push (release)
573+
- name: 1.33.9-envsubst-git-jq-kustomize-sops-ssh-yq - Build and push (release)
574574
if: startsWith(github.ref, 'refs/tags/')
575575
uses: docker/build-push-action@v5
576576
with:
577-
context: variants/1.33.8-envsubst-git-jq-kustomize-sops-ssh-yq
577+
context: variants/1.33.9-envsubst-git-jq-kustomize-sops-ssh-yq
578578
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
579579
push: true
580580
tags: |
581-
${{ github.repository }}:${{ steps.prep-1-33-8-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.VARIANT }}
582-
${{ github.repository }}:${{ steps.prep-1-33-8-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_VARIANT }}
583-
${{ github.repository }}:${{ steps.prep-1-33-8-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_SHA_VARIANT }}
581+
${{ github.repository }}:${{ steps.prep-1-33-9-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.VARIANT }}
582+
${{ github.repository }}:${{ steps.prep-1-33-9-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_VARIANT }}
583+
${{ github.repository }}:${{ steps.prep-1-33-9-envsubst-git-jq-kustomize-sops-ssh-yq.outputs.REF_SHA_VARIANT }}
584584
cache-from: type=local,src=/tmp/.buildx-cache
585585
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
586586

@@ -4130,7 +4130,7 @@ jobs:
41304130
needs:
41314131
- build-1-35-1
41324132
- build-1-34-4
4133-
- build-1-33-8
4133+
- build-1-33-9
41344134
- build-1-32-12
41354135
- build-1-31-14
41364136
- build-1-30-14
@@ -4165,7 +4165,7 @@ jobs:
41654165
needs:
41664166
- build-1-35-1
41674167
- build-1-34-4
4168-
- build-1-33-8
4168+
- build-1-33-9
41694169
- build-1-32-12
41704170
- build-1-31-14
41714171
- build-1-30-14
@@ -4202,7 +4202,7 @@ jobs:
42024202
needs:
42034203
- build-1-35-1
42044204
- build-1-34-4
4205-
- build-1-33-8
4205+
- build-1-33-9
42064206
- build-1-32-12
42074207
- build-1-31-14
42084208
- build-1-30-14

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Dockerized `kubectl` with useful tools.
1414
| `:1.35.1-envsubst-git-jq-kustomize-sops-ssh-yq` | [View](variants/1.35.1-envsubst-git-jq-kustomize-sops-ssh-yq) |
1515
| `:1.34.4` | [View](variants/1.34.4) |
1616
| `:1.34.4-envsubst-git-jq-kustomize-sops-ssh-yq` | [View](variants/1.34.4-envsubst-git-jq-kustomize-sops-ssh-yq) |
17-
| `:1.33.8` | [View](variants/1.33.8) |
18-
| `:1.33.8-envsubst-git-jq-kustomize-sops-ssh-yq` | [View](variants/1.33.8-envsubst-git-jq-kustomize-sops-ssh-yq) |
17+
| `:1.33.9` | [View](variants/1.33.9) |
18+
| `:1.33.9-envsubst-git-jq-kustomize-sops-ssh-yq` | [View](variants/1.33.9-envsubst-git-jq-kustomize-sops-ssh-yq) |
1919
| `:1.32.12` | [View](variants/1.32.12) |
2020
| `:1.32.12-envsubst-git-jq-kustomize-sops-ssh-yq` | [View](variants/1.32.12-envsubst-git-jq-kustomize-sops-ssh-yq) |
2121
| `:1.31.14` | [View](variants/1.31.14) |

generate/definitions/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"versions": [
44
"1.35.1",
55
"1.34.4",
6-
"1.33.8",
6+
"1.33.9",
77
"1.32.12",
88
"1.31.14",
99
"1.30.14",
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
FROM alpine:3.15
2+
ARG TARGETPLATFORM
3+
ARG BUILDPLATFORM
4+
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
5+
6+
RUN apk add --no-cache ca-certificates
7+
8+
# When $TARGETPLATFORM is linux/arm/v7, strip out the '/v6' or '/v7' from it
9+
RUN set -eux; \
10+
BIN_URL=https://dl.k8s.io/release/v1.33.9/bin/$( echo $TARGETPLATFORM | sed 's@/v[67]$@@' )/kubectl; \
11+
SHA512=$( wget -qO- "$BIN_URL.sha512" ); \
12+
wget -qO- "$BIN_URL" > /usr/local/bin/kubectl; \
13+
chmod +x /usr/local/bin/kubectl; \
14+
sha512sum /usr/local/bin/kubectl | grep "^$SHA512 "; \
15+
kubectl version --client
16+
17+
# From: https://github.com/nginxinc/docker-nginx/blob/1.17.0/stable/alpine/Dockerfile
18+
# Bring in gettext so we can get `envsubst`, then throw
19+
# the rest away. To do this, we need to install `gettext`
20+
# then move `envsubst` out of the way so `gettext` can
21+
# be deleted completely, then move `envsubst` back.
22+
RUN apk add --no-cache --virtual .gettext gettext \
23+
&& mv /usr/bin/envsubst /tmp/ \
24+
\
25+
&& runDeps="$( \
26+
scanelf --needed --nobanner /tmp/envsubst \
27+
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
28+
| sort -u \
29+
| xargs -r apk info --installed \
30+
| sort -u \
31+
)" \
32+
&& apk add --no-cache $runDeps \
33+
&& apk del .gettext \
34+
&& mv /tmp/envsubst /usr/local/bin/
35+
36+
RUN apk add --no-cache git
37+
38+
RUN apk add --no-cache jq
39+
40+
RUN apk add --no-cache curl \
41+
&& curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/v2.0.3/kustomize_2.0.3_linux_amd64 -o /usr/local/bin/kustomize \
42+
&& chmod +x /usr/local/bin/kustomize \
43+
&& apk del curl
44+
45+
RUN set -eux; \
46+
wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux > /usr/local/bin/sops; \
47+
chmod +x /usr/local/bin/sops; \
48+
sha256sum /usr/local/bin/sops | grep '^53aec65e45f62a769ff24b7e5384f0c82d62668dd96ed56685f649da114b4dbb '; \
49+
sops --version
50+
51+
RUN apk add --no-cache gnupg
52+
53+
RUN apk add --no-cache openssh-client
54+
55+
RUN apk add --no-cache yq
56+
57+
COPY docker-entrypoint.sh /docker-entrypoint.sh
58+
RUN chmod +x /docker-entrypoint.sh
59+
60+
ENTRYPOINT [ "/docker-entrypoint.sh" ]
61+
CMD [ "kubectl" ]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
5+
set -- kubectl "$@"
6+
elif [ $# -gt 0 ] && kubectl "$1" --help > /dev/null 2>&1; then
7+
set -- kubectl "$@"
8+
fi
9+
10+
exec "$@"

variants/1.33.9/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM alpine:3.15
2+
ARG TARGETPLATFORM
3+
ARG BUILDPLATFORM
4+
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
5+
6+
RUN apk add --no-cache ca-certificates
7+
8+
# When $TARGETPLATFORM is linux/arm/v7, strip out the '/v6' or '/v7' from it
9+
RUN set -eux; \
10+
BIN_URL=https://dl.k8s.io/release/v1.33.9/bin/$( echo $TARGETPLATFORM | sed 's@/v[67]$@@' )/kubectl; \
11+
SHA512=$( wget -qO- "$BIN_URL.sha512" ); \
12+
wget -qO- "$BIN_URL" > /usr/local/bin/kubectl; \
13+
chmod +x /usr/local/bin/kubectl; \
14+
sha512sum /usr/local/bin/kubectl | grep "^$SHA512 "; \
15+
kubectl version --client
16+
17+
COPY docker-entrypoint.sh /docker-entrypoint.sh
18+
RUN chmod +x /docker-entrypoint.sh
19+
20+
ENTRYPOINT [ "/docker-entrypoint.sh" ]
21+
CMD [ "kubectl" ]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
5+
set -- kubectl "$@"
6+
elif [ $# -gt 0 ] && kubectl "$1" --help > /dev/null 2>&1; then
7+
set -- kubectl "$@"
8+
fi
9+
10+
exec "$@"

0 commit comments

Comments
 (0)