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

15-fix-ci-and-e2e-test #46

Merged
merged 6 commits into from
Feb 3, 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
261 changes: 250 additions & 11 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,260 @@
# Copyright (c) 2017-present SIGHUP s.r.l All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

# FIXME: Skipping for the moment, we need to add the license header to all the files.
# name: license
# kind: pipeline
# type: docker

# steps:
# - name: check
# image: docker.io/library/golang:1.16
# pull: always
# commands:
# - go get -u github.com/google/addlicense
# - addlicense -c "SIGHUP s.r.l" -v -l bsd -y "2017-present" --check .

# ---
name: policeman
kind: pipeline
type: docker

# FIXME: enable me when license check gets enabled.
# depends_on:
# - license

platform:
os: linux
arch: amd64

steps:
- name: lint
image: quay.io/sighup/policeman
pull: always
environment:
# Identifies false positives like missing 'selector'.
# Doing this is valid for Kustomize patches
VALIDATE_KUBERNETES_KUBEVAL: "false"
# Some duplicated code is intended.
VALIDATE_JSCPD: "false"
# hadolint already validated dockerfiles
VALIDATE_DOCKERFILE: "false"
# Disable natural language checks
VALIDATE_NATURAL_LANGUAGE: "false"
# Shellcheck gets confused with Jinja2 tempalates. Skipping all of them
FILTER_REGEX_EXCLUDE: (roles/.*/templates/.*j2)
depends_on:
- clone

- name: render
image: quay.io/sighup/e2e-testing:1.1.0_0.2.2_2.16.1_1.9.4_1.20.7_3.8.7_2.4.1
pull: always
depends_on:
- clone
commands:
- kustomize build katalog/vsphere-cm > vsphere-cm.yaml
- kustomize build katalog/vsphere-csi > vsphere-csi.yaml

- name: check-deprecated-apis
image: us-docker.pkg.dev/fairwinds-ops/oss/pluto:v5
pull: always
depends_on:
- render
commands:
# we use --ignore-deprecations because we don't want the CI to fail when the API has not been removed yet.
- /pluto detect vsphere-cm.yaml --target-versions=k8s=v1.25.0 --ignore-deprecations
- /pluto detect vsphere-csi.yaml --target-versions=k8s=v1.25.0 --ignore-deprecations

# FIXME: Add E2E tests
# ---
# name: e2e-kubernetes-1.25
# kind: pipeline
# type: docker

# depends_on:
# - policeman

# node:
# runner: internal

# platform:
# os: linux
# arch: amd64

# trigger:
# ref:
# include:
# - refs/heads/master
# - refs/heads/main
# - refs/tags/**

# steps:
# - name: init
# image: quay.io/sighup/e2e-testing-drone-plugin:v1.25.3
# pull: always
# volumes:
# - name: shared
# path: /shared
# depends_on: [clone]
# settings:
# action: custom-cluster-125
# pipeline_id: cluster-125
# local_kind_config_path: katalog/tests/kind/config.yml
# cluster_version: "1.25.3"
# instance_path: /shared
# aws_default_region:
# from_secret: aws_region
# aws_access_key_id:
# from_secret: aws_access_key_id
# aws_secret_access_key:
# from_secret: aws_secret_access_key
# terraform_tf_states_bucket_name:
# from_secret: terraform_tf_states_bucket_name
# vsphere_server:
# from_secret: vsphere_server
# vsphere_password:
# from_secret: vsphere_password
# vsphere_user:
# from_secret: vsphere_user
# dockerhub_username:
# from_secret: dockerhub_username
# dockerhub_password:
# from_secret: dockerhub_password

# - name: e2e
# # 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
# pull: always
# volumes:
# - name: shared
# path: /shared
# depends_on: [init]
# commands:
# - export KUBECONFIG=/shared/kube/kubeconfig-125
# - bats -t katalog/tests/gatekeeper.sh

# - name: destroy
# image: quay.io/sighup/e2e-testing-drone-plugin:v1.25.3
# pull: always
# depends_on: [e2e]
# settings:
# action: destroy
# pipeline_id: cluster-125
# aws_default_region:
# from_secret: aws_region
# aws_access_key_id:
# from_secret: aws_access_key_id
# aws_secret_access_key:
# from_secret: aws_secret_access_key
# terraform_tf_states_bucket_name:
# from_secret: terraform_tf_states_bucket_name
# vsphere_server:
# from_secret: vsphere_server
# vsphere_password:
# from_secret: vsphere_password
# vsphere_user:
# from_secret: vsphere_user
# dockerhub_username:
# from_secret: dockerhub_username
# dockerhub_password:
# from_secret: dockerhub_password
# when:
# status:
# - success
# - failure

# volumes:
# - name: shared
# temp: {}

---
name: release
kind: pipeline
name: test
type: docker

# FIXME: enable when we have e2e working
# depends_on:
# - e2e-kubernetes-1.25

platform:
os: linux
arch: amd64

trigger:
ref:
include:
- refs/tags/**

steps:
- name: katalog
image: python:3
- name: prepare-tar-gz
image: alpine:latest
pull: always
depends_on: [clone]
commands:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl
- curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/v1.0.10/kustomize_1.0.10_linux_amd64 -o /usr/local/bin/kustomize && chmod +x /usr/local/bin/kustomize && kustomize version
- pip install -rkatalog/tests/test-requirements.txt
- flake8 --ignore=E501 katalog/tests/test.py
- bash katalog/tests/pytest.sh
- rm -rf .pytest_cache katalog/tests/__pycache__
- tar -zcvf fury-kubernetes-on-premises-${DRONE_TAG}.tar.gz katalog/ roles/ LICENSE README.md
when:
ref:
include:
- refs/tags/**

- name: prepare-release-notes
image: quay.io/sighup/fury-release-notes-plugin:3.7_2.8.4
pull: always
depends_on: [clone]
settings:
release_notes_file_path: release-notes.md
when:
ref:
include:
- refs/tags/**

- name: publish-prerelease
image: plugins/github-release
pull: always
depends_on:
- prepare-tar-gz
- prepare-release-notes
settings:
api_key:
from_secret: github_token
file_exists: overwrite
files:
- fury-kubernetes-on-premises-${DRONE_TAG}.tar.gz
prerelease: true
overwrite: true
title: "Preview ${DRONE_TAG}"
note: release-notes.md
checksum:
- md5
- sha256
when:
ref:
include:
- refs/tags/v**-rc**

- name: publish-stable
image: plugins/github-release
pull: always
depends_on:
- prepare-tar-gz
- prepare-release-notes
settings:
api_key:
from_secret: github_token
file_exists: overwrite
files:
- fury-kubernetes-on-premises-${DRONE_TAG}.tar.gz
prerelease: false
overwrite: true
title: "Release ${DRONE_TAG}"
note: release-notes.md
checksum:
- md5
- sha256
when:
event:
- push
ref:
exclude:
- refs/tags/v**-rc**
include:
- refs/tags/v**
23 changes: 12 additions & 11 deletions docs/COMPATIBILITY_MATRIX.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# Compatibility Matrix

| Module Version / Kubernetes Version | 1.15.X | 1.19.X | 1.20.15 | 1.21.14 | 1.22.13 | 1.23.12 | 1.24.7 |
|-------------------------------------------|:------------------:|:------------------:|:------------------:|:------------------:|:------------------:|:------------------:|:------------------:|
| v1.15.4 | :white_check_mark: | | | | | | |
| v1.19.7 | | :white_check_mark: | | | | | |
| v1.20.15 | | | :white_check_mark: | | | | |
| v1.21.14 | | | :white_check_mark: | :white_check_mark: | | | |
| v1.22.13 | | | | :warning: | :warning: | | |
| v1.23.12 | | | | :warning: | :warning: | :warning: | |
| v1.23.12-rev.1 | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| v1.24.7 | | | | | | :white_check_mark: | :white_check_mark: |
| Module Version / Kubernetes Version | 1.15.X | 1.19.X | 1.20.15 | 1.21.14 | 1.22.13 | 1.23.12 | 1.24.7 |
| ----------------------------------- | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: |
| v1.15.4 | :white_check_mark: | | | | | | |
| v1.19.7 | | :white_check_mark: | | | | | |
| v1.20.15 | | | :white_check_mark: | | | | |
| v1.21.14 | | | :white_check_mark: | :white_check_mark: | | | |
| v1.22.13 | | | | :warning: | :warning: | | |
| v1.23.12 | | | | :warning: | :warning: | :warning: | |
| v1.23.12-rev.1 | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| v1.24.7 | | | | | | :white_check_mark: | :white_check_mark: |

- :white_check_mark: Compatible
- :warning: Has issues
- :x: Incompatible

Notes:
- `v1.23.12-rev.1` fixes an issue with yum-versionlock on RHEL systems, Ansible Roles can be used with `1.21.14`, `1.22.13` and `1.23.12` Kubernetes versions.

- `v1.23.12-rev.1` fixes an issue with yum-versionlock on RHEL systems, Ansible Roles can be used with `1.21.14`, `1.22.13` and `1.23.12` Kubernetes versions.
31 changes: 14 additions & 17 deletions docs/releases/v1.20.15.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ SIGHUP.
⚠️ This minor relases consolidates the repository adding enhanced capabilities like the addition of the `containerd` ansible role.
Docker installation was also removed from `kube-node-common` ansible role and moved to a dedicated `docker` ansible role.


## Package Versions 🚢

| Package | Supported Version | Previous Version |
|------------------------------------------------------|-------------------|-------------------|
| [vmware-cm](katalog/vmware-cm) | `1.2.1` | `Updated` |
| [vmware-csi](katalog/vmware-csi) | `2.1.0` | `Updated` |
| [etcd](roles/etcd) | `3.4.7` | `No update` |
| [haproxy](roles/haproxy) | `2.2` | `No update` |
| [containerd](roles/containerd) | `1.5.8` | `New Package` |
| [docker](roles/docker) | `19.X` | `Updated` |
| [kube-node-common](roles/kube-node-common) | `1.20.15` | `Updated` |
| [kube-control-plane](roles/kube-control-plane) | `1.20.15` | `Updated` |
| [kube-worker](roles/kube-worker) | `1.20.15` | `Updated` |
| Package | Supported Version | Previous Version |
| ---------------------------------------------- | ----------------- | ---------------- |
| [vmware-cm](katalog/vmware-cm) | `1.2.1` | `Updated` |
| [vmware-csi](katalog/vmware-csi) | `2.1.0` | `Updated` |
| [etcd](roles/etcd) | `3.4.7` | `No update` |
| [haproxy](roles/haproxy) | `2.2` | `No update` |
| [containerd](roles/containerd) | `1.5.8` | `New Package` |
| [docker](roles/docker) | `19.X` | `Updated` |
| [kube-node-common](roles/kube-node-common) | `1.20.15` | `Updated` |
| [kube-control-plane](roles/kube-control-plane) | `1.20.15` | `Updated` |
| [kube-worker](roles/kube-worker) | `1.20.15` | `Updated` |

## Removed packages 🚮

Expand Down Expand Up @@ -48,10 +47,11 @@ kustomize build <your-project-path-including-dex-as-base> | kubectl apply -f -

## vsphere-cm

The vSphere controller manager update can be executed before upgrading the cluster version to v1.20.x.
The vSphere controller manager update can be executed before upgrading the cluster version to v1.20.x.
The current versions is compatible with Kubernetes 1.20.x and it's standard skew versions.

Due to some changes on the manifests, you need to change the patch on the secrets used by the vsphere controller manager:

- rename Secret `vsphere-credentials` to `vsphere-cloud-secret`
- rename Secret `cloud-config` to `vsphere-cloud-config`

Expand All @@ -69,8 +69,7 @@ kustomize build <your-project-path-including-vmware-cm-as-base> | kubectl apply

## vsphere-csi

The vSphere CSI driver update is a little bit more complicated. In this version the CSI driver DaemonSet and Deployment
are moved to a new dedicated namespace `vmware-system-csi`. To address this we need to first delete the current CSI driver from the cluster:
The vSphere CSI driver update is a little bit more complicated. In this version the CSI driver DaemonSet and Deployment are moved to a new dedicated namespace `vmware-system-csi`. To address this we need to first delete the current CSI driver from the cluster:

```yaml
kubectl delete -f katalog/vsphere-csi/vsphere-csi-controller-deployment.yaml
Expand All @@ -85,5 +84,3 @@ and apply the new version:
```yaml
kustomize build <your-project-path-including-vmware-csi-as-base> | kubectl apply -f -
```


4 changes: 1 addition & 3 deletions docs/releases/v1.21.14.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ This minor release adds the compatibility with Kubernetes 1.21.14 and some gener
| [kube-control-plane](roles/kube-control-plane) | `-` | `Updated` |
| [kube-worker](roles/kube-worker) | `-` | `Updated` |


## New features 🚀

This release adds some new features to the ansible roles:
Expand All @@ -42,8 +41,7 @@ In this guide, we will try to summarize the update process from `v1.20.15` to th

## vsphere-cm

The vSphere controller manager update can be executed before upgrading the cluster version to v1.21.14.
The current version is compatible with Kubernetes 1.21.x and its standard skew versions.
The vSphere controller manager update can be executed before upgrading the cluster version to v1.21.14. The current version is compatible with Kubernetes 1.21.x and its standard skew versions.

To upgrade, please run the following command:

Expand Down
Loading