Skip to content

Commit

Permalink
Merge pull request #309 from syself/cluster-api-1-2-3
Browse files Browse the repository at this point in the history
🌱 update to clusterctl 1.2.3
  • Loading branch information
batistein authored Oct 11, 2022
2 parents 2a3e684 + f505117 commit 3e7c92d
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 29 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test and coverage

on:
push:
branches:
- main
- "releases/**"
paths:
- "**.go"
- "**go.mod"
- "**go.sum"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: ./.github/actions/setup-go
- name: Run coverage
run: make test-cover
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: out/coverage.txt
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ CI_KIND ?= true
#
# Binaries.
#
MINIMUM_CLUSTERCTL_VERSION=1.2.2 # https://github.com/kubernetes-sigs/cluster-api/releases
MINIMUM_CLUSTERCTL_VERSION=1.2.3 # https://github.com/kubernetes-sigs/cluster-api/releases
MINIMUM_CTLPTL_VERSION=0.8.8 # https://github.com/tilt-dev/ctlptl/releases
MINIMUM_GO_VERSION=go$(GO_VERSION) # Check current project go version
MINIMUM_HCLOUD_VERSION=1.30.3 # https://github.com/hetznercloud/cli/releases
Expand Down Expand Up @@ -490,9 +490,7 @@ test-verbose: ## Run tests with verbose settings

.PHONY: test-cover
test-cover: $(RELEASE_DIR) ## Run tests with code coverage and code generate reports
$(MAKE) test TEST_ARGS="$(TEST_ARGS) -coverprofile=out/coverage.out -covermode=atomic"
go tool cover -func=out/coverage.out -o $(RELEASE_DIR)/coverage.txt
go tool cover -html=out/coverage.out -o $(RELEASE_DIR)/coverage.html
$(MAKE) test TEST_ARGS="$(TEST_ARGS) -coverprofile=out/coverage.txt -covermode=atomic"

.PHONY: test-junit
test-junit: $(SETUP_ENVTEST) $(GOTESTSUM) ## Run tests with verbose setting and generate a junit report
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 = {
"deploy_observability": False,
"preload_images_for_kind": True,
"kind_cluster_name": "caph",
"capi_version": "v1.2.2",
"capi_version": "v1.2.3",
"cabpt_version": "v0.5.4",
"cacppt_version": "v0.4.6",
"cert_manager_version": "v1.9.1",
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/tilt.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"deploy_observability": False,
"preload_images_for_kind": True,
"kind_cluster_name": "caph",
"capi_version": "v1.2.2",
"capi_version": "v1.2.3",
"cabpt_version": "v0.5.2",
"cacppt_version": "v0.4.5",
"cert_manager_version": "v1.9.1",
Expand All @@ -34,7 +34,7 @@
| deploy_observability | bool | false | no | If true, installs grafana, loki and promtail in the dev cluster. Grafana UI will be accessible via a link in the tilt console. Important! This feature requires the `helm` command to be available in the user's path |
| preload_images_for_kind | bool | true | no | If set to true, uses `kind load docker-image` to preload images into a kind cluster |
| kind_cluster_name | []object | "caph" | no | The name of the kind cluster to use when preloading images |
| capi_version | string | "v1.2.2" | no | Version of CAPI |
| capi_version | string | "v1.2.3" | no | Version of CAPI |
| cabpt_version | string | "v0.5.4" | no | Version of Cluster API Bootstrap Provider Talos |
| cacppt_version | string | "v0.4.6" | no | Version of Cluster API Control Plane Provider Talos |
| cert_manager_version | string | "v1.9.1" | no | Version of cert manager |
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/syself/cluster-api-provider-hetzner

go 1.19

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.2.2
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.2.3

require (
github.com/blang/semver v3.5.1+incompatible
Expand All @@ -24,8 +24,8 @@ require (
k8s.io/klog/v2 v2.80.1
k8s.io/kubectl v0.25.2
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
sigs.k8s.io/cluster-api v1.2.2
sigs.k8s.io/cluster-api/test v1.2.2
sigs.k8s.io/cluster-api v1.2.3
sigs.k8s.io/cluster-api/test v1.2.3
sigs.k8s.io/controller-runtime v0.12.3
sigs.k8s.io/kind v0.16.0
)
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1141,10 +1141,10 @@ k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/cluster-api v1.2.2 h1:acx31Eyv5s4xeublsbxWpRFjcQ5h4BmDPI0glm3sEoE=
sigs.k8s.io/cluster-api v1.2.2/go.mod h1:oiuV+mlCV1QxDnuI+PfElFlAfuXHo9ZGVBojoihVtHY=
sigs.k8s.io/cluster-api/test v1.2.2 h1:DUVmlCVQ0H7zY1doxzS1JuooUjXxTN80i9swc16tZd0=
sigs.k8s.io/cluster-api/test v1.2.2/go.mod h1:JdMqpv9rEOFWQVQ8danpBduqxoQkZMiOvpIGJ7v8qjw=
sigs.k8s.io/cluster-api v1.2.3 h1:NWtaadQHhl/H1hWp6Z6jXJwZU8o6SDRgN5stkVqk5L8=
sigs.k8s.io/cluster-api v1.2.3/go.mod h1:YaLJOC9mSsIOpdbh7BpthGmC8uxIJADzrMMIGpgahfM=
sigs.k8s.io/cluster-api/test v1.2.3 h1:B8UKXBwLrEl0GTlzZrHtpQDiZXWXHRKbSHsHI3gYrmI=
sigs.k8s.io/cluster-api/test v1.2.3/go.mod h1:C+UT2CXWNu3eAoeI0HHI19ex90pAdzAqR6YjhxRNHyM=
sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio=
sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0=
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY=
Expand Down
1 change: 0 additions & 1 deletion hack/ensure-boilerplate.sh

This file was deleted.

78 changes: 78 additions & 0 deletions hack/ensure-boilerplate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

if [ "$(uname)" = 'Darwin' ]; then
readlinkf(){ perl -MCwd -e 'print Cwd::abs_path shift' "$1";}
else
readlinkf(){ readlink -f "$1"; }
fi

# shellcheck disable=SC2128
SCRIPT_DIR="$(cd "$(dirname "$(readlinkf "$BASH_SOURCE")")" ; pwd)"

# We assume the link to the script ( {ensure,verify}-boilerplate.sh ) to be
# in a directory 2 levels down from the repo root, e.g. in
# <root>/repo-infra/verify/verify-boilerplate.sh
# Alternatively, you can set the project root by setting the variable
# `REPO_ROOT`.
#
# shellcheck disable=SC2128
: "${REPO_ROOT:="$(cd "${SCRIPT_DIR}/.." ; pwd)"}"

boilerDir="${SCRIPT_DIR}/boilerplate/"
boiler="${boilerDir}/boilerplate.py"

verify() {
# shellcheck disable=SC2207
files_need_boilerplate=(
$( "$boiler" --rootdir="$REPO_ROOT" --boilerplate-dir="$boilerDir" "$@")
)

# Run boilerplate check
if [[ ${#files_need_boilerplate[@]} -gt 0 ]]; then
for file in "${files_need_boilerplate[@]}"; do
echo "Boilerplate header is wrong for: ${file}" >&2
done

return 1
fi
}

ensure() {
"$boiler" --rootdir="$REPO_ROOT" --boilerplate-dir="$boilerDir" --ensure "$@"
}

case "$0" in
*/ensure-boilerplate.sh)
ensure "$@"
;;
*/verify-boilerplate.sh)
verify "$@"
;;
*)
{
echo "unknown command '$0'"
echo ""
echo "Call the script as either 'verify-boilerplate.sh' or 'ensure-boilerplate.sh'"
} >&2

exit 1
;;
esac
14 changes: 7 additions & 7 deletions test/e2e/config/hetzner-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ providers:
- name: cluster-api
type: CoreProvider
versions:
- name: v1.2.2 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.2/core-components.yaml"
- name: v1.2.3 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.3/core-components.yaml"
type: "url"
contract: v1beta1
files:
Expand All @@ -30,8 +30,8 @@ providers:
- name: kubeadm
type: BootstrapProvider
versions:
- name: v1.2.2 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.2/bootstrap-components.yaml"
- name: v1.2.3 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.3/bootstrap-components.yaml"
type: "url"
contract: "v1beta1"
files:
Expand All @@ -47,8 +47,8 @@ providers:
- name: kubeadm
type: ControlPlaneProvider
versions:
- name: v1.2.2 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.2/control-plane-components.yaml"
- name: v1.2.3 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.3/control-plane-components.yaml"
type: "url"
files:
- sourcePath: "../data/shared/v1beta1/metadata.yaml"
Expand Down Expand Up @@ -158,7 +158,7 @@ variables:

intervals:
default/wait-cluster: ["20m", "10s"]
default/wait-control-plane: ["20m", "10s"]
default/wait-control-plane: ["25m", "10s"]
default/wait-worker-nodes: ["15m", "10s"]
default/wait-controllers: ["5m", "10s"]
default/wait-delete-cluster: ["20m", "10s"]
Expand Down
14 changes: 7 additions & 7 deletions test/e2e/config/hetzner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ providers:
- name: cluster-api
type: CoreProvider
versions:
- name: v1.2.2 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.2/core-components.yaml"
- name: v1.2.3 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.3/core-components.yaml"
type: "url"
contract: v1beta1
files:
Expand All @@ -30,8 +30,8 @@ providers:
- name: kubeadm
type: BootstrapProvider
versions:
- name: v1.2.2 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.2/bootstrap-components.yaml"
- name: v1.2.3 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.3/bootstrap-components.yaml"
type: "url"
contract: "v1beta1"
files:
Expand All @@ -47,8 +47,8 @@ providers:
- name: kubeadm
type: ControlPlaneProvider
versions:
- name: v1.2.2 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.2/control-plane-components.yaml"
- name: v1.2.3 # latest published release in the v1beta1 series; this is used for v1beta1
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.3/control-plane-components.yaml"
type: "url"
files:
- sourcePath: "../data/shared/v1beta1/metadata.yaml"
Expand Down Expand Up @@ -164,7 +164,7 @@ variables:

intervals:
default/wait-cluster: ["20m", "10s"]
default/wait-control-plane: ["20m", "10s"]
default/wait-control-plane: ["25m", "10s"]
default/wait-worker-nodes: ["15m", "10s"]
default/wait-controllers: ["5m", "10s"]
default/wait-delete-cluster: ["20m", "10s"]
Expand Down

0 comments on commit 3e7c92d

Please sign in to comment.