Skip to content

Commit

Permalink
Merge pull request #346 from mamercad/k3s-channel-coverage
Browse files Browse the repository at this point in the history
CI: Cover the three most recent Kubernetes versions in Minikube and the single most recent in K3s
  • Loading branch information
arm4b authored Jan 6, 2023
2 parents 1efc1b8 + cf4dcb1 commit aced661
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
38 changes: 23 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,29 @@ orbs:

jobs:
# Spin up minikube K8s cluster and run Helm chart & e2e tests on it
e2e-minikube:
e2e-k8s:
parameters:
kubernetes-version:
type: string
# 'large' 4 vCPUs & 15GB RAM CircleCI machine executor
# required to deploy heavy 'stackstorm-ha' Helm release with RabbitMQ, MongoDB, Redis clusters and 25+ st2 Pods.
# https://circleci.com/docs/2.0/configuration-reference/#machine-executor-linux
resource_class: large
machine:
# Available images https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
image: ubuntu-2204:2022.04.1
image: ubuntu-2204:2022.10.2
steps:
- checkout
- kubernetes/install
- minikube/minikube-install:
# https://github.com/kubernetes/minikube/releases
version: v1.15.1
- run:
name: Install dependencies
command: |
sudo apt update || true
# K8s 1.18 requires conntrack
# See: https://github.com/kubernetes/minikube/issues/7179
sudo apt install -y conntrack
version: v1.28.0
- run:
name: Install Helm v3
command: curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- run:
name: Create new K8s cluster
command: sudo -E minikube start --vm-driver=none
environment:
CHANGE_MINIKUBE_NONE_USER: true
command: minikube start --vm-driver=docker --memory 8192 --cpus 4 --kubernetes-version=<< parameters.kubernetes-version >>
- run:
name: Update stackstorm-ha chart dependencies
command: helm dependency update
Expand All @@ -64,11 +58,25 @@ workflows:
version: 2
e2e:
jobs:
- e2e-minikube
- e2e-k8s:
matrix:
parameters:
# https://kubernetes.io/releases
kubernetes-version:
- "v1.25.5"
- "v1.24.9"
- "v1.23.15"
# Run periodic nightly Helm tests to ensure there are no regressions
e2e-nightly:
jobs:
- e2e-minikube
- e2e-k8s:
matrix:
parameters:
# https://kubernetes.io/releases
kubernetes-version:
- "v1.25.5"
- "v1.24.9"
- "v1.23.15"
triggers:
- schedule:
cron: "0 1 * * *"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ jobs:
matrix:
# TODO: Document which versions we support and cover them.
# https://github.com/StackStorm/stackstorm-k8s/issues/342
# https://github.com/k3s-io/k3s/releases
k3s-channel:
- "v1.25.4+k3s1"
- "v1.26.0+k3s1"
steps:
- name: Checkout source
uses: actions/checkout@v3
Expand Down Expand Up @@ -55,7 +56,7 @@ jobs:
- name: Helm upgrade with RBAC enabled
run: |
helm upgrade --set st2.rbac.enabled=true \
--timeout 5m0s --debug --wait stackstorm-ha .
--timeout 10m0s --debug --wait stackstorm-ha .
- name: Helm test
run: |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## In Development
* Cover the three most recent Kubernetes versions in Minikube and the single most recent in K3s. (#342) (by @mamercad)
* Update the GitHub badges. (#345) (by @mamercad)
* Reorganizing and renaming the CI workflows and jobs. (#344) (by @mamercad)
* Add support for providing `ingressClassName`. (#336) (by @mamercad)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RabbitMQ HA, MongoDB HA Replicaset and Redis cluster that st2 replies on for MQ,
It's more than welcome to fine-tune each component settings to fit specific availability/scalability demands.

## Requirements
* [Kubernetes](https://kubernetes.io/docs/setup/pick-right-solution/) cluster
* [Supported](https://kubernetes.io/releases/) [Kubernetes](https://kubernetes.io/docs/setup/) cluster
* [Helm](https://docs.helm.sh/using_helm/#install-helm) `v3.5` or greater

## Usage
Expand Down

0 comments on commit aced661

Please sign in to comment.