Skip to content

Commit b8e5821

Browse files
authored
Merge pull request #224 from cloudogu/feature/update-kubernetes
Update to kubernetes 1.29.8
2 parents 66c336d + 420c38c commit b8e5821

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

Dockerfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ ARG JDK_VERSION='17'
55
# Set by the micronaut BOM, see pom.xml
66
ARG GRAAL_VERSION='22.3.0'
77

8-
FROM alpine:3 as alpine
8+
FROM alpine:3 AS alpine
99

1010
# Keep in sync with the version in pom.xml
1111
FROM ghcr.io/graalvm/graalvm-ce:ol8-java${JDK_VERSION}-${GRAAL_VERSION} AS graal
1212

13-
FROM graal as maven-cache
13+
FROM graal AS maven-cache
1414
ENV MAVEN_OPTS='-Dmaven.repo.local=/mvn'
1515
WORKDIR /app
1616
COPY .mvn/ /app/.mvn/
1717
COPY mvnw /app/
1818
COPY pom.xml /app/
1919
RUN ./mvnw dependency:resolve-plugins dependency:go-offline -B
2020

21-
FROM graal as maven-build
21+
FROM graal AS maven-build
2222
ENV MAVEN_OPTS='-Dmaven.repo.local=/mvn'
2323
COPY --from=maven-cache /mvn/ /mvn/
2424
COPY --from=maven-cache /app/ /app
@@ -38,15 +38,15 @@ RUN ./mvnw package -DskipTests
3838
RUN mv $(ls -S target/*.jar | head -n 1) /app/gitops-playground.jar
3939

4040

41-
FROM alpine as downloader
41+
FROM alpine AS downloader
4242
RUN apk add curl grep
4343
# When updating,
4444
# * also update the checksum found at https://dl.k8s.io/release/v${K8S_VERSION}/bin/linux/amd64/kubectl.sha256
4545
# * also update in init-cluster.sh. vars.tf, ApplicationConfigurator.groovy and apply.sh
4646
# When upgrading to 1.26 we can verify the kubectl signature with cosign!
4747
# https://kubernetes.io/blog/2022/12/12/kubernetes-release-artifact-signing/
48-
ARG K8S_VERSION=1.29.1
49-
ARG KUBECTL_CHECKSUM=69ab3a931e826bf7ac14d38ba7ca637d66a6fcb1ca0e3333a2cafdf15482af9f
48+
ARG K8S_VERSION=1.29.8
49+
ARG KUBECTL_CHECKSUM=038454e0d79748aab41668f44ca6e4ac8affd1895a94f592b9739a0ae2a5f06a
5050
# When updating, also upgrade helm image in ApplicationConfigurator
5151
ARG HELM_VERSION=3.15.4
5252
# bash curl unzip required for Jenkins downloader
@@ -131,7 +131,7 @@ RUN touch /dist/root/.config/jgit/config
131131
RUN chmod +r /dist/root/ && chmod g+rw /dist/root/.config/jgit/
132132

133133
# This stage builds a static binary using graal VM. For details see docs/developers.md#GraalVM
134-
FROM graal as native-image
134+
FROM graal AS native-image
135135
ENV MAVEN_OPTS='-Dmaven.repo.local=/mvn'
136136
RUN gu install native-image
137137
RUN microdnf install gnupg
@@ -207,13 +207,13 @@ RUN native-image -Dgroovy.grape.enable=false \
207207

208208

209209

210-
FROM alpine as prod
210+
FROM alpine AS prod
211211
# copy groovy cli binary from native-image stage
212212
COPY --from=native-image /app/apply-ng app/apply-ng
213213
ENTRYPOINT ["/app/apply-ng"]
214214

215215

216-
FROM eclipse-temurin:${JDK_VERSION}-jre-alpine as dev
216+
FROM eclipse-temurin:${JDK_VERSION}-jre-alpine AS dev
217217

218218
# apply-ng.sh is part of the dev image and allows trying changing groovy code inside the image for debugging
219219
# Allow changing code in dev mode, less secure, but the intention of the dev image

Jenkinsfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import com.cloudogu.ces.cesbuildlib.*
44

55
String getDockerRegistryBaseUrl() { 'ghcr.io' }
6-
76
String getDockerImageName() { 'cloudogu/gitops-playground' }
7+
String getTrivyVersion() { '0.55.0'}
88

99
properties([
1010
// Dont keep builds forever to preserve space
@@ -207,7 +207,8 @@ def scanForCriticalVulns(String imageName, String fileName){
207207
trivyConfig = [
208208
imageName : imageName,
209209
severity : ['CRITICAL'],
210-
additionalFlags: '--ignore-unfixed'
210+
additionalFlags: '--ignore-unfixed',
211+
trivyVersion: trivyVersion
211212
]
212213

213214
def vulns = findVulnerabilitiesWithTrivy(trivyConfig)
@@ -221,7 +222,8 @@ def scanForCriticalVulns(String imageName, String fileName){
221222

222223
def scanForAllVulns(String imageName, String fileName){
223224
trivyConfig = [
224-
imageName : imageName
225+
imageName : imageName,
226+
trivyVersion: trivyVersion
225227
]
226228

227229
def vulns = findVulnerabilitiesWithTrivy(trivyConfig)

docs/k3d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ k3d cluster create gitops-playground \
114114
# Mount port for ingress
115115
-p 80:80@server:0:direct \
116116
# Pin image for reproducibility
117-
--image=rancher/k3s:v1.29.1-k3s2 \
117+
--image=rancher/k3s:v1.29.8-k3s2 \
118118
# Disable built-in ingress controller, because we want to use the same one locally and in prod
119119
--k3s-arg=--disable=traefik@server:0 \
120120
# Allow node ports < 30000

scripts/init-cluster.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# This variable is also read in Jenkinsfile
55
K3D_VERSION=5.6.0
66
# When updating please also adapt in Dockerfile, vars.tf and ApplicationConfigurator.groovy
7-
K8S_VERSION=1.29.1
8-
K3S_VERSION="rancher/k3s:v${K8S_VERSION}-k3s2"
7+
K8S_VERSION=1.29.8
8+
K3S_VERSION="rancher/k3s:v${K8S_VERSION}-k3s1"
99

1010
set -o errexit
1111
set -o nounset

0 commit comments

Comments
 (0)