Skip to content

Commit

Permalink
Merge pull request #318 from sighupio/feat/release-v1.28.5
Browse files Browse the repository at this point in the history
Feat/release v1.28.5
  • Loading branch information
nutellinoit authored Nov 29, 2024
2 parents 95568d5 + e8c68cb commit dfac8ad
Show file tree
Hide file tree
Showing 248 changed files with 20,429 additions and 11,993 deletions.
101 changes: 44 additions & 57 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ clone:

steps:
- name: license-check
image: quay.io/sighup/golang:1.21.5
image: quay.io/sighup/golang:1.23.3
pull: always
commands:
- make license-check

- name: schema-check
image: quay.io/sighup/golang:1.21.5
image: quay.io/sighup/golang:1.23.3
pull: always
commands:
- |-
Expand Down Expand Up @@ -49,39 +49,52 @@ steps:
- license-check
- schema-check

- name: lint-go
image: quay.io/sighup/golang:1.21.5
pull: always
commands:
- make lint-go
depends_on:
- license-check
- schema-check
# - name: lint-go
# image: quay.io/sighup/golang:1.23.3
# pull: always
# commands:
# - make lint-go
# depends_on:
# - license-check
# - schema-check

- name: test-schema
# KUBECTL 1.25.3 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
image: quay.io/sighup/e2e-testing:1.1.0_0.9.0_3.1.1_1.9.4_1.25.3_3.5.3_4.21.1
image: quay.io/sighup/e2e-testing:1.1.0_1.30.5_3.10.0_4.33.3
pull: always
depends_on:
- license-check
- schema-check
environment:
JV_VERSION: 6.0.1
commands:
# we need to download `jv` for running the JSON Schemas tests.
- curl -L https://github.com/santhosh-tekuri/jsonschema/releases/download/v$${JV_VERSION}/jv-v$${JV_VERSION}-linux-amd64.tar.gz | tar zx --directory /usr/local/bin/
- bats -t tests/schema.sh

- name: render
# KUBECTL 1.25.3 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
image: quay.io/sighup/e2e-testing:1.1.0_0.9.0_3.1.1_1.9.4_1.25.3_3.5.3_4.21.1
image: quay.io/sighup/e2e-testing:1.1.0_1.30.5_3.10.0_4.33.3
pull: always
commands:
- echo $${NETRC_FILE} > /root/.netrc
- furyctl vendor -H
- kustomize build . > distribution.yml
environment:
NETRC_FILE:
from_secret: NETRC_FILE
depends_on:
- license-check
- schema-check
environment:
NETRC_FILE:
from_secret: NETRC_FILE
FURYCTL_VERSION: v0.30.1
FURYCTL_CONFIG: tests/e2e/kfddistribution/furyctl-init-cluster.yaml
FURYCTL_DISTRO_LOCATION: ./
FURYCTL_OUTDIR: ./
FURYCTL_DISABLE_ANALYTICS: "true"
KUBECONFIG: ./dummy
commands:
- echo $${NETRC_FILE} > /root/.netrc
- echo "Installing furyctl version $${FURYCTL_VERSION}..."
- curl -L "https://github.com/sighupio/furyctl/releases/download/$${FURYCTL_VERSION}/furyctl-$(uname -s)-amd64.tar.gz" | tar xz -C /usr/local/bin/
- furyctl download dependencies && furyctl dump template
# Move the folder with the manifests generated from the templates into the right path
- mv distribution $${FURYTCL_OUTDIR}.furyctl/$$(yq .metadata.name $FURYCTL_CONFIG)
# Build the whole distribution
- kustomize build $${FURYTCL_OUTDIR}.furyctl/$$(yq .metadata.name $FURYCTL_CONFIG)/distribution/manifests > distribution.yml

- name: check-deprecated-apis
image: us-docker.pkg.dev/fairwinds-ops/oss/pluto:v5
Expand Down Expand Up @@ -116,7 +129,7 @@ trigger:

steps:
- name: create Kind cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.24.0_1.30.5_3.10.0
pull: always
volumes:
- name: dockersock
Expand Down Expand Up @@ -148,16 +161,15 @@ steps:
- kind get kubeconfig --name $${CLUSTER_NAME} > $${KUBECONFIG}

- name: e2e-kfddistribution
# KUBECTL_KUSTOMIZE_HELM_YQ_ISTIOCTL_FURYCTL_BATS
image: quay.io/sighup/e2e-testing:1.1.0_0.11.0_3.1.1_1.9.4_1.26.3_3.5.3_4.33.3
image: quay.io/sighup/e2e-testing:1.1.0_1.30.5_3.10.0_4.33.3
pull: always
# we need to use host network to access Kind API port that is listening on the worker's loopback
# beacuse we mount the host's Docker socket to run Kind.
network_mode: host
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}
KUBECONFIG: /drone/src/kubeconfig
FURYCTL_VERSION: v0.29.7-rc.0
FURYCTL_VERSION: v0.30.1
depends_on: [create Kind cluster]
commands:
- export KUBECONFIG=/drone/src/kubeconfig
Expand All @@ -175,7 +187,7 @@ steps:
- tests/e2e-kfddistribution.sh

- name: delete-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.24.0_1.30.5_3.10.0
volumes:
- name: dockersock
path: /var/run/docker.sock
Expand All @@ -196,7 +208,7 @@ volumes:
host:
path: /var/run/docker.sock
---
name: e2e-kubernetes-1.28.0-1.28.1-1.28.2-1.28.3-1.28.4
name: e2e-kubernetes-1.28.4-to-1.28.5
kind: pipeline
type: docker

Expand All @@ -220,7 +232,7 @@ trigger:

steps:
- name: create Kind cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.24.0_1.30.5_3.10.0
pull: always
volumes:
- name: dockersock
Expand Down Expand Up @@ -252,16 +264,15 @@ steps:
- kind get kubeconfig --name $${CLUSTER_NAME} > $${KUBECONFIG}

- name: e2e-kfddistribution
# KUBECTL_KUSTOMIZE_HELM_YQ_ISTIOCTL_FURYCTL_BATS
image: quay.io/sighup/e2e-testing:1.1.0_0.11.0_3.1.1_1.9.4_1.26.3_3.5.3_4.33.3
image: quay.io/sighup/e2e-testing:1.1.0_1.30.5_3.10.0_4.33.3
pull: always
# we need to use host network to access Kind API port that is listening on the worker's loopback
# beacuse we mount the host's Docker socket to run Kind.
network_mode: host
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-upgrades
KUBECONFIG: /drone/src/kubeconfig-upgrades
FURYCTL_VERSION: v0.29.7-rc.0
FURYCTL_VERSION: v0.30.1
depends_on: [create Kind cluster]
commands:
- export KUBECONFIG=/drone/src/kubeconfig-upgrades
Expand All @@ -279,7 +290,7 @@ steps:
- tests/e2e-kfddistribution-upgrades.sh

- name: delete-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.24.0_1.30.5_3.10.0
volumes:
- name: dockersock
path: /var/run/docker.sock
Expand All @@ -306,7 +317,7 @@ type: docker

depends_on:
- e2e-kubernetes-1.28
- e2e-kubernetes-1.28.0-1.28.1-1.28.2-1.28.3-1.28.4
- e2e-kubernetes-1.28.4-to-1.28.5

platform:
os: linux
Expand All @@ -320,22 +331,6 @@ trigger:
- refs/tags/**-docs*

steps:
- name: prepare-release-manifests
image: quay.io/sighup/e2e-testing:1.1.0_0.7.0_3.1.1_1.9.4_1.24.1_3.8.7_4.21.1
pull: always
depends_on: [clone]
environment:
RELEASE_MANIFESTS_PATH: fury-distribution-${DRONE_TAG}.yml
commands:
- furyctl vendor -H
- kustomize build . > $${RELEASE_MANIFESTS_PATH}
when:
ref:
include:
- refs/tags/**
exclude:
- refs/tags/**-docs*

- name: prepare-release-notes
image: quay.io/sighup/fury-release-notes-plugin:3.7_2.8.4
depends_on: [clone]
Expand All @@ -352,16 +347,12 @@ steps:
image: plugins/github-release
pull: always
depends_on:
- prepare-release-manifests
- prepare-release-notes
settings:
api_key:
from_secret: github_token
file_exists: skip
files:
- fury-distribution-${DRONE_TAG}.yml
- Furyfile.yaml
- kustomization.yaml
- kfd.yaml
prerelease: true
overwrite: true
Expand All @@ -381,16 +372,12 @@ steps:
image: plugins/github-release
pull: always
depends_on:
- prepare-release-manifests
- prepare-release-notes
settings:
api_key:
from_secret: github_token
file_exists: skip
files:
- fury-distribution-${DRONE_TAG}.yml
- Furyfile.yaml
- kustomization.yaml
- kfd.yaml
prerelease: false
overwrite: true
Expand Down
10 changes: 5 additions & 5 deletions .rules/.markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
###############
# Rules by id #
###############
MD004: false # Unordered list style
MD004: false # Unordered list style
MD007:
indent: 2 # Unordered list indentation
indent: 2 # Unordered list indentation
MD013:
line_length: 808 # Line length
MD024: false # Multiple headers with the same content
line_length: 808 # Line length
MD024: false # Multiple headers with the same content
MD026:
punctuation: ".,;:!。,;:" # List of not allowed
MD029: false # Ordered list item prefix
Expand All @@ -39,4 +39,4 @@ MD041: false
#################
# Rules by tags #
#################
blank_lines: false # Error on blank lines
blank_lines: false # Error on blank lines
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bats 1.9.0
drone 1.7.0
golang 1.21.5
golangci-lint 1.55.2
golang 1.23.3
golangci-lint 1.62.0
yq 4.33.3
jq 1.6
make 4.4.1
31 changes: 0 additions & 31 deletions Furyfile.yaml

This file was deleted.

90 changes: 90 additions & 0 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Kubernetes Fury Distribution Maintenance Guide

In this document you can find the steps needed to cook a new release of KFD.

Some things to know before starting:

- We maintain the latest 3 "minor" versions of KFD so, when you release a new version, you usually need to actually release 3 new versions. See the [versioning](docs/VERSIONING.md) file for more details if you are not familiar with KFD's versioning.
- Each release of KFD is tightly coupled with a release of `furyctl`. So you'll need to be able to update furyctl too, or ask for help from somebody that can.

Usually, a new release of KFD is triggered by one of these events:

- One or more core modules have been updated (new versions have been released), could be a bug fix or a simple bump of version to add new features.
- A new version with a bug fix or new features of one or more of the installers (on-premises, EKS, etc.) has been released.
- A new feature or a bug fix has been introduced into the template files of the distribution.
- A new release of Kubernetes is out and must be supported (usually triggers all the 3 previous points).

The release is needed to render this updates available to KFD's user base.

## Process

The update process usually involves going back and forward between KFD (this repo) and furyctl.

> [!NOTE]
> Some of the following steps may not apply in some specific cases, for example if you are only releasing a patch version that fixes an issue on the templates, maybe you can skip some steps.
With no further ado, the steps to release a new version are:

### fury-distribution

> [!WARNING]
> If you are releasing a new `x.y.0` version create a `release-vX.<y-1>` branch for the previous release.
1. Create a new branch `feat/vx.y.z` (`v1.29.4`, for example) where to work on.
2. Create the PRs fixing the issues or adding new features to the templates or other files of fury-distribution, test them and merge them.
3. Update the `kfd.yaml` and `Furyfile.yaml` files, bumping the distribution version, adjusting the modules and installers versions where needed.
4. If the distribution schemas have been changed:
1. If you haven't already, install the needed tools with `make tools-go`.
2. Generate the new docs with `make generate-docs`.
3. Generate the go models with `make generate-go-models`
5. Update the CI and e2e tests to point to the new version:
1. `.drone.yaml`
2. `tests/e2e-kfddistribution-*.yaml`
3. `tests/e2e-kfddistribution-upgrades.sh`
4. `tests/e2e/kfddistribution-upgrades/furyctl-init-cluster-1.29.4.yaml`
6. Update the documentation:
1. `README.md`
2. `docs/COMPATIBILITY_MATRIX.md`
3. `docs/VERSIONING.md`
4. Write the release notes for the new version (`docs/releases/vx.y.z.md`)
7. Tag a release candidate to trigger all the e2e tests and fix eventual problems

At this point, you'll need to switch to pushing some changes in furyctl

### furyctl

8. Create a new branch for the WIP release like `feat/vx.y.z` (`v0.29.8`, for example)
9. Add the new versions to the `internal/distribution/compatibility.go` file.
10. Add the migration paths to the corresponding kinds in `configs/upgrades/{onpremises,kfddistribution,ekscluster}/`, creating the needed folders for each new version.
11. Update the documentation:
1. `README.md`.
2. `docs/COMPATIBLITY_MATRIX.md`.
12. Update the compatibility unit tests with the new versions (`internal/distribution/compatibility_test.go`)
13. Bump the version to the new `fury-distribution` go library that has been released as RC in step `7`.

```bash
go get -u github.com/sighupio/fury-distribution@v1.29.4
go mod tidy
```

14. Tag a release candidate with the changes. This will be used in the e2e tests of the distribution.

### Back to fury-distribution

15. Update the CI's `.drone.yaml` file to use the release candidate for furyctl that you released in step `14`.
16. Update the e2e tests with the new upgrade paths.
17. Tag a new release candidate of the distribution to run the e2e tests using the new upgrade paths and furyctl's RC.
18. After the CI passes and the PR has been approved, merge into `main`
19. Tag the final release and let the CI run again and do the release.
20. **Repeat all the process for the other 2 "minor" versions that need to be updated**, but targeting `release-vx.y` branches instead of `main`.

### Back to furyctl

21. Once KFD new releases are live and the PR with the update to furyctl has been approved, merge and tag the final release.

### Other changes

After the release of the distribution and furyctl have been done, there are some other places that need to be updated to reflect the new releases, in no particular order:

1. Update the quick-start guides in https://github.com/sighupio/fury-getting-started/
2. Update KFD's documentation site with the new versions https://github.com/sighupio/kfd-docs/
Loading

0 comments on commit dfac8ad

Please sign in to comment.