Skip to content

Commit

Permalink
Merge pull request #783 from cprivitere/release-0.9.0
Browse files Browse the repository at this point in the history
Release-0.9.0
  • Loading branch information
k8s-ci-robot authored Jul 18, 2024
2 parents c9867b5 + 1a39e5f commit 8ff0b6e
Show file tree
Hide file tree
Showing 16 changed files with 116 additions and 209 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
run:
timeout: 10m
go: "1.22"
go: "1.21"
build-tags:
- tools
- e2e
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.

# Build the manager binary
ARG GOVER=1.22.5
ARG GOVER=1.21.12
FROM golang:${GOVER} as builder

WORKDIR /workspace
Expand Down
2 changes: 1 addition & 1 deletion clusterctl-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "infrastructure-packet",
"config": {
"componentsFile": "infrastructure-components.yaml",
"nextVersion": "v0.8.99"
"nextVersion": "v0.9.99"
}
}

26 changes: 19 additions & 7 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@ This is normally performed by our CI system. However, there are important steps

In order to cut a release, you must:

1. If this is a new major or minor version - but **not** just a patch change - update [metadata.yaml](../metadata.yaml) to add it, and map it to the correct cluster-api contract version
1. Update [packet-ci-actions.yaml](../test/e2e/config/packet-ci-actions.yaml) and [packet-ci.yaml](../test/e2e/config/packet-ci.yaml) to use the new version number for the current and/or new contract version of the packet InfrastructureProvider.
1. If this is a new major or minor version - but **not** just a patch chagne - update [packet-ci-actions.yaml](../test/e2e/config/packet-ci-actions.yaml) and [packet-ci.yaml](../test/e2e/config/packet-ci.yaml) to have a new "next" version number for the latest contract version of the packet InfrastructureProvider.
1. Update [packet-ci-actions.yaml](../test/e2e/config/packet-ci-actions.yaml) and [packet-ci.yaml](../test/e2e/config/packet-ci.yaml) to use the new version number for the current and/or new contract version of the packet InfrastructureProvider. (ie. v0.9.1)
1. If this is a new major or minor version - but **not** just a patch change:

- Update [metadata.yaml](../metadata.yaml) to add it, and map it to the correct cluster-api contract version

```yaml
- major: 0
minor: 10
contract: v1beta1
```
- Update [packet-ci-actions.yaml](../test/e2e/config/packet-ci-actions.yaml) and [packet-ci.yaml](../test/e2e/config/packet-ci.yaml) to have a new "next" version number for the latest contract version of the packet InfrastructureProvider (ie. v0.11.99).
- Update clusterctl-settings.json to have the new "next" version number for the latest contract version of the packet InfrastructureProvider (ie. v0.11.99).
1. Review and update the versions of installed deployments like CPEM and kube-vip inside the templates.
1. Commit the changes.
1. Push out your branch, open a PR and merge the changes
1. Wait for the Continuous Integration github action to finish running
Expand All @@ -21,7 +33,7 @@ In order to cut a release, you must:

## How A Release Happens

* GitHub Actions detects a new tag has been pushed
* CI builds docker images for each supported architecture as well as a multi-arch manifest, and tags it with the semver tag of the release, e.g. `v0.4.0`
* CI creates the release in `out/release`, the equivalent of `make release`
* CI copies the artifacts in `out/release/*` to the github releases
- GitHub Actions detects a new tag has been pushed
- CI builds docker images for each supported architecture as well as a multi-arch manifest, and tags it with the semver tag of the release, e.g. `v0.4.0`
- CI creates the release in `out/release`, the equivalent of `make release`
- CI copies the artifacts in `out/release/*` to the github releases
4 changes: 2 additions & 2 deletions hack/ensure-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -o pipefail
verify_go_version() {
if [[ -z "$(command -v go)" ]]; then
if [[ "${INSTALL_GO:-"true"}" == "true" ]]; then
curl -sSL https://golang.org/dl/go${GO_VERSION:-"1.22"}.linux-amd64.tar.gz | tar -C /usr/local -xzf -
curl -sSL https://golang.org/dl/go${GO_VERSION:-"1.21"}.linux-amd64.tar.gz | tar -C /usr/local -xzf -
export PATH=/usr/local/go/bin:$PATH
export PATH=$(go env GOPATH)/bin:$PATH
else
Expand All @@ -37,7 +37,7 @@ EOF
local go_version
IFS=" " read -ra go_version <<< "$(go version)"
local minimum_go_version
minimum_go_version=go1.22
minimum_go_version=go1.21
if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
cat <<EOF
Detected go version: ${go_version[*]}.
Expand Down
3 changes: 3 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3
kind: Metadata
releaseSeries:
- major: 0
minor: 9
contract: v1beta1
- major: 0
minor: 8
contract: v1beta1
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/packet/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func (p *Client) EnsureNodeBGPEnabled(ctx context.Context, id string) error {
_, response, err := p.DevicesApi.CreateBgpSession(ctx, id).BGPSessionInput(req).Execute() //nolint:bodyclose // see https://github.com/timakin/bodyclose/issues/42
// if we already had one, then we can ignore the error
// this really should be a 409, but 422 is what is returned
if response != nil && response.StatusCode == 422 && strings.Contains(err.Error(), "already has session") {
if response != nil && response.StatusCode == http.StatusUnprocessableEntity && strings.Contains(err.Error(), "already has session") {
err = nil
}
return err
Expand Down
2 changes: 1 addition & 1 deletion templates/cluster-template-emlb-crs-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ spec:
echo "complete -o default -F __start_kubectl k" >> $HOME/.bashrc
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
export KUBECONFIG=/etc/kubernetes/admin.conf
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/${CPEM_VERSION:=v3.8.0}/deployment.yaml
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/${CPEM_VERSION:=v3.8.1}/deployment.yaml
export SECRET_DATA='cloud-sa.json=''{"apiKey": "{{ .apiKey }}","projectID": "${PROJECT_ID}"}'''
kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}" || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}") || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}")
kubectl apply -f $${CPEM_YAML} || (sleep 1 && kubectl apply -f $${CPEM_YAML}) || (sleep 1 && kubectl apply -f $${CPEM_YAML})
Expand Down
2 changes: 1 addition & 1 deletion templates/cluster-template-emlb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ spec:
echo "complete -o default -F __start_kubectl k" >> $HOME/.bashrc
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
export KUBECONFIG=/etc/kubernetes/admin.conf
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/${CPEM_VERSION:=v3.8.0}/deployment.yaml
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/${CPEM_VERSION:=v3.8.1}/deployment.yaml
export SECRET_DATA='cloud-sa.json=''{"apiKey": "{{ .apiKey }}","projectID": "${PROJECT_ID}"}'''
kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}" || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}") || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}")
kubectl apply -f $${CPEM_YAML} || (sleep 1 && kubectl apply -f $${CPEM_YAML}) || (sleep 1 && kubectl apply -f $${CPEM_YAML})
Expand Down
6 changes: 4 additions & 2 deletions templates/cluster-template-kube-vip-crs-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,10 @@ spec:
kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}" || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}") || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}")
kubectl apply -f $${CPEM_YAML} || (sleep 1 && kubectl apply -f $${CPEM_YAML}) || (sleep 1 && kubectl apply -f $${CPEM_YAML})
else
KVVERSION="${KUBE_VIP_VERSION:=v0.6.4}"
KVVERSION="${KUBE_VIP_VERSION:=v0.8.1}"
ctr image pull ghcr.io/kube-vip/kube-vip:$${KVVERSION}
ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:$KVVERSION vip /kube-vip manifest pod \
--cidr 32 \
--interface "lo" \
--vip "{{ .controlPlaneEndpoint }}" \
--controlplane \
Expand Down Expand Up @@ -225,9 +226,10 @@ spec:
done
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
ip addr add {{ .controlPlaneEndpoint }} dev lo
KVVERSION="${KUBE_VIP_VERSION:=v0.6.4}"
KVVERSION="${KUBE_VIP_VERSION:=v0.8.1}"
ctr image pull ghcr.io/kube-vip/kube-vip:$${KVVERSION}
ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:$KVVERSION vip /kube-vip manifest pod \
--cidr 32 \
--interface "lo" \
--vip "{{ .controlPlaneEndpoint }}" \
--controlplane \
Expand Down
6 changes: 4 additions & 2 deletions templates/cluster-template-kube-vip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ spec:
kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}" || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}") || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}")
kubectl apply -f $${CPEM_YAML} || (sleep 1 && kubectl apply -f $${CPEM_YAML}) || (sleep 1 && kubectl apply -f $${CPEM_YAML})
else
KVVERSION="${KUBE_VIP_VERSION:=v0.6.4}"
KVVERSION="${KUBE_VIP_VERSION:=v0.8.1}"
ctr image pull ghcr.io/kube-vip/kube-vip:$${KVVERSION}
ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:$KVVERSION vip /kube-vip manifest pod \
--cidr 32 \
--interface "lo" \
--vip "{{ .controlPlaneEndpoint }}" \
--controlplane \
Expand Down Expand Up @@ -204,9 +205,10 @@ spec:
done
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
ip addr add {{ .controlPlaneEndpoint }} dev lo
KVVERSION="${KUBE_VIP_VERSION:=v0.6.4}"
KVVERSION="${KUBE_VIP_VERSION:=v0.8.1}"
ctr image pull ghcr.io/kube-vip/kube-vip:$${KVVERSION}
ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:$KVVERSION vip /kube-vip manifest pod \
--cidr 32 \
--interface "lo" \
--vip "{{ .controlPlaneEndpoint }}" \
--controlplane \
Expand Down
2 changes: 1 addition & 1 deletion templates/experimental-emlb/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ patches:
echo "complete -o default -F __start_kubectl k" >> $HOME/.bashrc
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
export KUBECONFIG=/etc/kubernetes/admin.conf
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/${CPEM_VERSION:=v3.8.0}/deployment.yaml
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/${CPEM_VERSION:=v3.8.1}/deployment.yaml
export SECRET_DATA='cloud-sa.json=''{"apiKey": "{{ .apiKey }}","projectID": "${PROJECT_ID}"}'''
kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}" || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}") || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}")
kubectl apply -f $${CPEM_YAML} || (sleep 1 && kubectl apply -f $${CPEM_YAML}) || (sleep 1 && kubectl apply -f $${CPEM_YAML})
Expand Down
6 changes: 4 additions & 2 deletions templates/experimental-kube-vip/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ patches:
done
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
ip addr add {{ .controlPlaneEndpoint }} dev lo
KVVERSION="${KUBE_VIP_VERSION:=v0.6.4}"
KVVERSION="${KUBE_VIP_VERSION:=v0.8.1}"
ctr image pull ghcr.io/kube-vip/kube-vip:$${KVVERSION}
ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:$KVVERSION vip /kube-vip manifest pod \
--cidr 32 \
--interface "lo" \
--vip "{{ .controlPlaneEndpoint }}" \
--controlplane \
Expand All @@ -91,9 +92,10 @@ patches:
kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}" || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}") || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}")
kubectl apply -f $${CPEM_YAML} || (sleep 1 && kubectl apply -f $${CPEM_YAML}) || (sleep 1 && kubectl apply -f $${CPEM_YAML})
else
KVVERSION="${KUBE_VIP_VERSION:=v0.6.4}"
KVVERSION="${KUBE_VIP_VERSION:=v0.8.1}"
ctr image pull ghcr.io/kube-vip/kube-vip:$${KVVERSION}
ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:$KVVERSION vip /kube-vip manifest pod \
--cidr 32 \
--interface "lo" \
--vip "{{ .controlPlaneEndpoint }}" \
--controlplane \
Expand Down
Loading

0 comments on commit 8ff0b6e

Please sign in to comment.