Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update k8s version for testing and go to 1.20.8 #1018

Merged
merged 5 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# Build the manager binary
FROM golang:1.20.6@sha256:b6c53162b13ec2ac1c725078671dbff289d9e723c045c27d73eacf0a50893598 as builder
FROM golang:1.20.10@sha256:098d628490c97d4419ed44a23d893f37b764f3bea06e0827183e8af4120e19be as builder
WORKDIR /workspace

# Run this with docker build --build_arg $(go env GOPROXY) to override the goproxy
Expand All @@ -38,7 +38,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
-o manager .

# Copy the controller-manager into a thin image
FROM gcr.io/distroless/static:latest
FROM cgr.dev/chainguard/static:latest
WORKDIR /
COPY --from=builder /workspace/manager .
USER nobody
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ GINKGO_BIN := ginkgo
GINKGO := $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINKGO_VER)
GINKGO_PKG := github.com/onsi/ginkgo/v2/ginkgo

KUBECTL_VER := v1.25.10
KUBECTL_VER := v1.27.3
KUBECTL_BIN := kubectl
KUBECTL := $(TOOLS_BIN_DIR)/$(KUBECTL_BIN)-$(KUBECTL_VER)

Expand Down Expand Up @@ -140,7 +140,7 @@ endif
# Build time versioning details.
LDFLAGS := $(shell hack/version.sh)

GOLANG_VERSION := 1.20.6
GOLANG_VERSION := 1.20.8

# CI
CAPG_WORKER_CLUSTER_KUBECONFIG ?= "/tmp/kubeconfig"
Expand Down
2 changes: 1 addition & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ settings = {
"kind_cluster_name": "capg",
"capi_version": "v1.5.0",
"cert_manager_version": "v1.11.0",
"kubernetes_version": "v1.26.1",
"kubernetes_version": "v1.27.3",
}

keys = ["GCP_B64ENCODED_CREDENTIALS"]
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/developers/cluster-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For creating a cluster with clusterctl, checkout our [Cluster API Quick Start](h
export GCP_NETWORK_NAME=default
export GCP_B64ENCODED_CREDENTIALS=$( cat /path/to/gcp_credentials.json | base64 | tr -d '\n' )
export CLUSTER_NAME="capg-test"
export IMAGE_ID=projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2004-v1-20-9-nightly
export IMAGE_ID=projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2204-v1-27-3-nightly
```

You can check for other images to set the `IMAGE_ID` of your choice.
Expand Down
18 changes: 9 additions & 9 deletions scripts/ci-conformance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ export GCP_NETWORK_NAME=${GCP_NETWORK_NAME:-"${TEST_NAME}-mynetwork"}
GCP_B64ENCODED_CREDENTIALS=$(base64 -w0 "$GOOGLE_APPLICATION_CREDENTIALS")
export GCP_B64ENCODED_CREDENTIALS
export KUBERNETES_MAJOR_VERSION="1"
export KUBERNETES_MINOR_VERSION="25"
export KUBERNETES_PATCH_VERSION="7"
export KUBERNETES_MINOR_VERSION="27"
export KUBERNETES_PATCH_VERSION="3"
export KUBERNETES_VERSION="v${KUBERNETES_MAJOR_VERSION}.${KUBERNETES_MINOR_VERSION}.${KUBERNETES_PATCH_VERSION}"
# using prebuilt image from image-builder project the image is built everyday and the job is available here https://prow.k8s.io/?job=periodic-image-builder-gcp-all-nightly
export IMAGE_ID="projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2004-${KUBERNETES_VERSION//[.+]/-}-nightly"
export IMAGE_ID="projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2204-${KUBERNETES_VERSION//[.+]/-}-nightly"

init_image() {
if [[ "${REUSE_OLD_IMAGES:-false}" == "true" ]]; then
image=$(gcloud compute images list --project "$GCP_PROJECT" \
--no-standard-images --filter="family:capi-ubuntu-2004-k8s-v${KUBERNETES_MAJOR_VERSION}-${KUBERNETES_MINOR_VERSION}" --format="table[no-heading](name)")
--no-standard-images --filter="family:capi-ubuntu-2204-k8s-v${KUBERNETES_MAJOR_VERSION}-${KUBERNETES_MINOR_VERSION}" --format="table[no-heading](name)")
if [[ -n "$image" ]]; then
return
fi
Expand All @@ -77,8 +77,8 @@ EOF
"build_timestamp": "0",
"kubernetes_series": "v${KUBERNETES_MAJOR_VERSION}.${KUBERNETES_MINOR_VERSION}",
"kubernetes_semver": "${KUBERNETES_VERSION}",
"kubernetes_deb_version": "${KUBERNETES_MAJOR_VERSION}.${KUBERNETES_MINOR_VERSION}.${KUBERNETES_PATCH_VERSION}-00",
"kubernetes_rpm_version": "${KUBERNETES_MAJOR_VERSION}.${KUBERNETES_MINOR_VERSION}.${KUBERNETES_PATCH_VERSION}-0"
"kubernetes_deb_version": "${KUBERNETES_MAJOR_VERSION}.${KUBERNETES_MINOR_VERSION}.${KUBERNETES_PATCH_VERSION}-1.1",
"kubernetes_rpm_version": "${KUBERNETES_MAJOR_VERSION}.${KUBERNETES_MINOR_VERSION}.${KUBERNETES_PATCH_VERSION}"
}
EOF
fi
Expand All @@ -88,17 +88,17 @@ EOF
GCP_PROJECT_ID=$GCP_PROJECT \
GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS \
PACKER_VAR_FILES=override.json \
make deps-gce build-gce-ubuntu-2004)
make deps-gce build-gce-ubuntu-2204)
else
# assume we are running in the CI environment as root
# Add a user for ansible to work properly
groupadd -r packer && useradd -m -s /bin/bash -r -g packer packer
chown -R packer:packer /home/prow/go/src/sigs.k8s.io/image-builder
# use the packer user to run the build
su - packer -c "bash -c 'cd /home/prow/go/src/sigs.k8s.io/image-builder/images/capi && PATH=$PATH:~packer/.local/bin:/home/prow/go/src/sigs.k8s.io/image-builder/images/capi/.local/bin GCP_PROJECT_ID=$GCP_PROJECT GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS PACKER_VAR_FILES=override.json make deps-gce build-gce-ubuntu-2004'"
su - packer -c "bash -c 'cd /home/prow/go/src/sigs.k8s.io/image-builder/images/capi && PATH=$PATH:~packer/.local/bin:/home/prow/go/src/sigs.k8s.io/image-builder/images/capi/.local/bin GCP_PROJECT_ID=$GCP_PROJECT GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS PACKER_VAR_FILES=override.json make deps-gce build-gce-ubuntu-2204'"
fi

filter="name~cluster-api-ubuntu-2004-${KUBERNETES_VERSION//[.+]/-}"
filter="name~cluster-api-ubuntu-2204-${KUBERNETES_VERSION//[.+]/-}"
image_id=$(gcloud compute images list --project "$GCP_PROJECT" \
--no-standard-images --filter="${filter}" --format="table[no-heading](name)")
if [[ -z "$image_id" ]]; then
Expand Down
6 changes: 3 additions & 3 deletions scripts/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ export GCP_NETWORK_NAME=${GCP_NETWORK_NAME:-"${TEST_NAME}-mynetwork"}
GCP_B64ENCODED_CREDENTIALS=$(base64 "$GOOGLE_APPLICATION_CREDENTIALS" | tr -d '\n')
export GCP_B64ENCODED_CREDENTIALS
export KUBERNETES_MAJOR_VERSION="1"
export KUBERNETES_MINOR_VERSION="25"
export KUBERNETES_PATCH_VERSION="7"
export KUBERNETES_MINOR_VERSION="27"
export KUBERNETES_PATCH_VERSION="3"
export KUBERNETES_VERSION="v${KUBERNETES_MAJOR_VERSION}.${KUBERNETES_MINOR_VERSION}.${KUBERNETES_PATCH_VERSION}"
# using prebuilt image from image-builder project the image is built everyday and the job is available here https://prow.k8s.io/?job=periodic-image-builder-gcp-all-nightly
export IMAGE_ID="projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2004-${KUBERNETES_VERSION//[.+]/-}-nightly"
export IMAGE_ID="projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2204-${KUBERNETES_VERSION//[.+]/-}-nightly"

init_image() {
if [[ "${REUSE_OLD_IMAGES:-false}" == "true" ]]; then
Expand Down
12 changes: 7 additions & 5 deletions test/e2e/config/gcp-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,22 @@ providers:
- sourcePath: "${PWD}/test/e2e/data/infrastructure-gcp/cluster-template-ci-gke-autopilot.yaml"

variables:
KUBERNETES_VERSION: "${KUBERNETES_VERSION:-v1.25.7}"
KUBERNETES_VERSION: "${KUBERNETES_VERSION:-v1.27.3}"
KUBERNETES_VERSION_MANAGEMENT: "v1.27.3"
ETCD_VERSION_UPGRADE_TO: "3.5.1-0"
COREDNS_VERSION_UPGRADE_TO: "v1.8.6"
KUBERNETES_IMAGE_UPGRADE_FROM: "projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2004-v1-24-11-nightly"
KUBERNETES_IMAGE_UPGRADE_TO: "projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2004-v1-25-7-nightly"
KUBERNETES_IMAGE_UPGRADE_FROM: "projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2204-v1-26-6-nightly"
KUBERNETES_IMAGE_UPGRADE_TO: "projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2204-v1-27-3-nightly"
CONTROL_PLANE_MACHINE_TEMPLATE_UPGRADE_TO: "cp-k8s-upgrade-and-conformance"
WORKERS_MACHINE_TEMPLATE_UPGRADE_TO: "worker-k8s-upgrade-and-conformance"
KUBERNETES_VERSION_UPGRADE_TO: "${KUBERNETES_VERSION_UPGRADE_TO:-v1.25.7}"
KUBERNETES_VERSION_UPGRADE_FROM: "${KUBERNETES_VERSION_UPGRADE_FROM:-v1.24.11}"
KUBERNETES_VERSION_UPGRADE_TO: "${KUBERNETES_VERSION_UPGRADE_TO:-v1.27.3}"
KUBERNETES_VERSION_UPGRADE_FROM: "${KUBERNETES_VERSION_UPGRADE_FROM:-v1.26.6}"
EXP_CLUSTER_RESOURCE_SET: "true"
CLUSTER_TOPOLOGY: "true"
# Cluster Addons
CNI: "${PWD}/test/e2e/data/cni/calico/calico.yaml"
CCM: "${PWD}/test/e2e/data/ccm/gce-cloud-controller-manager.yaml"

GCP_CONTROL_PLANE_MACHINE_TYPE: n1-standard-2
GCP_NODE_MACHINE_TYPE: n1-standard-2
CONFORMANCE_WORKER_MACHINE_COUNT: "2"
Expand Down
1 change: 1 addition & 0 deletions test/e2e/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ var _ = Describe("Conformance Tests", func() {
Expect(e2eConfig.Variables).To(HaveKey(KubernetesVersion))
Expect(e2eConfig.Variables).To(HaveKey(capi_e2e.KubernetesVersion))
Expect(e2eConfig.Variables).To(HaveKey(capi_e2e.CNIPath))
Expect(e2eConfig.Variables).To(HaveKey(CCMPath))

clusterName = fmt.Sprintf("capg-conf-%s", util.RandomString(6))

Expand Down
Loading
Loading